From 0057af293aa4e6055278cad5497ecf12cd9d58fb Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 29 Nov 2018 17:29:53 -0500 Subject: [PATCH 01/59] deps: cherry-pick http_parser_set_max_header_size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds http_parser_set_max_header_size() to the http-parser for overriding the compile time maximum HTTP header size. PR-URL: https://github.com/nodejs/node/pull/24811 Fixes: https://github.com/nodejs/node/issues/24692 Refs: https://github.com/nodejs/http-parser/pull/453 Reviewed-By: Anna Henningsen Reviewed-By: Matteo Collina Reviewed-By: Myles Borins Reviewed-By: Michael Dawson Reviewed-By: Сковорода Никита Андреевич Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- deps/http_parser/http_parser.c | 15 +++++++++++---- deps/http_parser/http_parser.h | 3 +++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/deps/http_parser/http_parser.c b/deps/http_parser/http_parser.c index 6522618671d09c..46764bced09478 100644 --- a/deps/http_parser/http_parser.c +++ b/deps/http_parser/http_parser.c @@ -25,6 +25,8 @@ #include #include +static uint32_t max_header_size = HTTP_MAX_HEADER_SIZE; + #ifndef ULLONG_MAX # define ULLONG_MAX ((uint64_t) -1) /* 2^64-1 */ #endif @@ -137,20 +139,20 @@ do { \ } while (0) /* Don't allow the total size of the HTTP headers (including the status - * line) to exceed HTTP_MAX_HEADER_SIZE. This check is here to protect + * line) to exceed max_header_size. This check is here to protect * embedders against denial-of-service attacks where the attacker feeds * us a never-ending header that the embedder keeps buffering. * * This check is arguably the responsibility of embedders but we're doing * it on the embedder's behalf because most won't bother and this way we - * make the web a little safer. HTTP_MAX_HEADER_SIZE is still far bigger + * make the web a little safer. max_header_size is still far bigger * than any reasonable request or response so this should never affect * day-to-day operation. */ #define COUNT_HEADER_SIZE(V) \ do { \ parser->nread += (V); \ - if (UNLIKELY(parser->nread > (HTTP_MAX_HEADER_SIZE))) { \ + if (UNLIKELY(parser->nread > max_header_size)) { \ SET_ERRNO(HPE_HEADER_OVERFLOW); \ goto error; \ } \ @@ -1471,7 +1473,7 @@ size_t http_parser_execute (http_parser *parser, const char* p_lf; size_t limit = data + len - p; - limit = MIN(limit, HTTP_MAX_HEADER_SIZE); + limit = MIN(limit, max_header_size); p_cr = (const char*) memchr(p, CR, limit); p_lf = (const char*) memchr(p, LF, limit); @@ -2437,3 +2439,8 @@ http_parser_version(void) { HTTP_PARSER_VERSION_MINOR * 0x00100 | HTTP_PARSER_VERSION_PATCH * 0x00001; } + +void +http_parser_set_max_header_size(uint32_t size) { + max_header_size = size; +} diff --git a/deps/http_parser/http_parser.h b/deps/http_parser/http_parser.h index 1fbf30e2b4740b..ea7bafef2c3178 100644 --- a/deps/http_parser/http_parser.h +++ b/deps/http_parser/http_parser.h @@ -427,6 +427,9 @@ void http_parser_pause(http_parser *parser, int paused); /* Checks if this is the final chunk of the body. */ int http_body_is_final(const http_parser *parser); +/* Change the maximum header size provided at compile time. */ +void http_parser_set_max_header_size(uint32_t size); + #ifdef __cplusplus } #endif From c80ac7fae317e915d08ea0635faede30d1ab98db Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Tue, 18 Dec 2018 12:12:21 +0100 Subject: [PATCH 02/59] src: add kUInteger parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds support for uint64_t option parsing. PR-URL: https://github.com/nodejs/node/pull/24811 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Myles Borins Reviewed-By: Michael Dawson Reviewed-By: Сковорода Никита Андреевич Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- lib/internal/print_help.js | 1 + src/node_options-inl.h | 16 ++++++++++++++++ src/node_options.cc | 4 ++++ src/node_options.h | 5 +++++ 4 files changed, 26 insertions(+) diff --git a/lib/internal/print_help.js b/lib/internal/print_help.js index c3e984dd9f4987..fdec7bd09bd87e 100644 --- a/lib/internal/print_help.js +++ b/lib/internal/print_help.js @@ -69,6 +69,7 @@ function getArgDescription(type) { case 'kHostPort': return '[host:]port'; case 'kInteger': + case 'kUInteger': case 'kString': case 'kStringList': return '...'; diff --git a/src/node_options-inl.h b/src/node_options-inl.h index 8aaa62524b8ee6..cfa3cdc9bbe33d 100644 --- a/src/node_options-inl.h +++ b/src/node_options-inl.h @@ -39,6 +39,19 @@ void OptionsParser::AddOption(const std::string& name, help_text}); } +template +void OptionsParser::AddOption(const std::string& name, + const std::string& help_text, + uint64_t Options::* field, + OptionEnvvarSettings env_setting) { + options_.emplace( + name, + OptionInfo{kUInteger, + std::make_shared>(field), + env_setting, + help_text}); +} + template void OptionsParser::AddOption(const std::string& name, const std::string& help_text, @@ -401,6 +414,9 @@ void OptionsParser::Parse( case kInteger: *Lookup(info.field, options) = std::atoll(value.c_str()); break; + case kUInteger: + *Lookup(info.field, options) = std::stoull(value.c_str()); + break; case kString: *Lookup(info.field, options) = value; break; diff --git a/src/node_options.cc b/src/node_options.cc index f75010b64e83ed..7f3d69bbd7b367 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -422,6 +422,9 @@ void GetOptions(const FunctionCallbackInfo& args) { case kInteger: value = Number::New(isolate, *parser.Lookup(field, opts)); break; + case kUInteger: + value = Number::New(isolate, *parser.Lookup(field, opts)); + break; case kString: if (!ToV8Value(context, *parser.Lookup(field, opts)) .ToLocal(&value)) { @@ -509,6 +512,7 @@ void Initialize(Local target, NODE_DEFINE_CONSTANT(types, kV8Option); NODE_DEFINE_CONSTANT(types, kBoolean); NODE_DEFINE_CONSTANT(types, kInteger); + NODE_DEFINE_CONSTANT(types, kUInteger); NODE_DEFINE_CONSTANT(types, kString); NODE_DEFINE_CONSTANT(types, kHostPort); NODE_DEFINE_CONSTANT(types, kStringList); diff --git a/src/node_options.h b/src/node_options.h index a62293286ceb6a..4dbd537ed1042b 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -203,6 +203,7 @@ enum OptionType { kV8Option, kBoolean, kInteger, + kUInteger, kString, kHostPort, kStringList, @@ -229,6 +230,10 @@ class OptionsParser { const std::string& help_text, bool Options::* field, OptionEnvvarSettings env_setting = kDisallowedInEnvironment); + void AddOption(const std::string& name, + const std::string& help_text, + uint64_t Options::* field, + OptionEnvvarSettings env_setting = kDisallowedInEnvironment); void AddOption(const std::string& name, const std::string& help_text, int64_t Options::* field, From edd8bd0ee0ea6852f166f12632e8a3e1c6775cb2 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 3 Dec 2018 12:27:46 -0500 Subject: [PATCH 03/59] cli: add --max-http-header-size flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow the maximum size of HTTP headers to be overridden from the command line. co-authored-by: Matteo Collina PR-URL: https://github.com/nodejs/node/pull/24811 Fixes: https://github.com/nodejs/node/issues/24692 Reviewed-By: Anna Henningsen Reviewed-By: Myles Borins Reviewed-By: Michael Dawson Reviewed-By: Сковорода Никита Андреевич Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- doc/api/cli.md | 8 ++ doc/node.1 | 3 + src/node_http_parser_impl.h | 18 ++- src/node_options.cc | 4 + src/node_options.h | 1 + test/sequential/test-http-max-http-headers.js | 69 +++++++---- .../test-set-http-max-http-headers.js | 109 ++++++++++++++++++ 7 files changed, 184 insertions(+), 28 deletions(-) create mode 100644 test/sequential/test-set-http-max-http-headers.js diff --git a/doc/api/cli.md b/doc/api/cli.md index a4757c1d26ab60..cd171d9e3467b3 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -197,6 +197,13 @@ added: v9.0.0 Specify the `file` of the custom [experimental ECMAScript Module][] loader. +### `--max-http-header-size=size` + + +Specify the maximum size, in bytes, of HTTP headers. Defaults to 8KB. + ### `--napi-modules` ```js const { Writable } = require('stream'); @@ -1547,6 +1548,7 @@ changes: * `autoDestroy` {boolean} Whether this stream should automatically call `.destroy()` on itself after ending. **Default:** `false`. + ```js const { Writable } = require('stream'); @@ -1718,11 +1720,6 @@ required elements of a custom [`Writable`][] stream instance: const { Writable } = require('stream'); class MyWritable extends Writable { - constructor(options) { - super(options); - // ... - } - _write(chunk, encoding, callback) { if (chunk.toString().indexOf('a') >= 0) { callback(new Error('chunk is invalid')); @@ -1806,6 +1803,7 @@ changes: * `autoDestroy` {boolean} Whether this stream should automatically call `.destroy()` on itself after ending. **Default:** `false`. + ```js const { Readable } = require('stream'); @@ -2064,6 +2062,7 @@ changes: * `writableHighWaterMark` {number} Sets `highWaterMark` for the writable side of the stream. Has no effect if `highWaterMark` is provided. + ```js const { Duplex } = require('stream'); @@ -2218,6 +2217,7 @@ output on the `Readable` side is not consumed. * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush] method. + ```js const { Transform } = require('stream'); diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js index 1086c4b5199f16..5862e35d738058 100644 --- a/lib/perf_hooks.js +++ b/lib/perf_hooks.js @@ -143,8 +143,6 @@ function getMilestoneTimestamp(milestoneIdx) { } class PerformanceNodeTiming { - constructor() {} - get name() { return 'node'; } diff --git a/lib/v8.js b/lib/v8.js index 3d75cf75847876..1cf80adfb78233 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -172,10 +172,6 @@ class DefaultSerializer extends Serializer { } class DefaultDeserializer extends Deserializer { - constructor(buffer) { - super(buffer); - } - _readHostObject() { const typeIndex = this.readUint32(); const ctor = arrayBufferViewTypes[typeIndex]; diff --git a/test/parallel/test-stream-writable-null.js b/test/parallel/test-stream-writable-null.js index 63e122a3b496e1..dc0f569ee6c58c 100644 --- a/test/parallel/test-stream-writable-null.js +++ b/test/parallel/test-stream-writable-null.js @@ -5,10 +5,6 @@ const assert = require('assert'); const stream = require('stream'); class MyWritable extends stream.Writable { - constructor(opt) { - super(opt); - } - _write(chunk, encoding, callback) { assert.notStrictEqual(chunk, null); callback(); From 30b61554f64478935894dad7016df4de8b4aa278 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Thu, 13 Dec 2018 13:39:26 -0800 Subject: [PATCH 12/59] test: merge test with unnecessary child process Test didn't require child process creation. While this test has not been unstable, child process creation is slower and can be flaky in ci, so test directly for the segfault regression. PR-URL: https://github.com/nodejs/node/pull/25025 Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau --- test/parallel/test-crypto-hash.js | 11 ++++++++ test/parallel/test-crypto-hmac.js | 10 +++++++ .../parallel/test-crypto-tostring-segfault.js | 27 ------------------- 3 files changed, 21 insertions(+), 27 deletions(-) delete mode 100644 test/parallel/test-crypto-tostring-segfault.js diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js index ec35cad7e8960c..5cc622b48c76c4 100644 --- a/test/parallel/test-crypto-hash.js +++ b/test/parallel/test-crypto-hash.js @@ -111,6 +111,17 @@ assert.throws(function() { crypto.createHash('xyzzy'); }, /Digest method not supported/); +// Issue https://github.com/nodejs/node/issues/9819: throwing encoding used to +// segfault. +common.expectsError( + () => crypto.createHash('sha256').digest({ + toString: () => { throw new Error('boom'); }, + }), + { + type: Error, + message: 'boom' + }); + // Default UTF-8 encoding const hutf8 = crypto.createHash('sha512').update('УТФ-8 text').digest('hex'); assert.strictEqual( diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js index 223b5c3c077251..f21db29d36107f 100644 --- a/test/parallel/test-crypto-hmac.js +++ b/test/parallel/test-crypto-hmac.js @@ -21,6 +21,16 @@ common.expectsError( message: 'The "hmac" argument must be of type string. Received type object' }); +// This used to segfault. See: https://github.com/nodejs/node/issues/9819 +common.expectsError( + () => crypto.createHmac('sha256', 'key').digest({ + toString: () => { throw new Error('boom'); }, + }), + { + type: Error, + message: 'boom' + }); + common.expectsError( () => crypto.createHmac('sha1', null), { diff --git a/test/parallel/test-crypto-tostring-segfault.js b/test/parallel/test-crypto-tostring-segfault.js deleted file mode 100644 index b2c95117d3b1f8..00000000000000 --- a/test/parallel/test-crypto-tostring-segfault.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -const common = require('../common'); -if (!common.hasCrypto) - common.skip('missing crypto'); - -// This test ensures that node doesn't SEGFAULT when either of -// `crypto.createHash` or `crypto.createHmac` are given an object that defines -// a throwing `toString`. -// https://github.com/nodejs/node/issues/9819 - -const assert = require('assert'); -const execFile = require('child_process').execFile; - -const setup = 'const enc = { toString: () => { throw new Error("xyz"); } };'; - -const scripts = [ - 'crypto.createHash("sha256").digest(enc)', - 'crypto.createHmac("sha256", "msg").digest(enc)' -]; - -scripts.forEach((script) => { - const node = process.execPath; - const code = `${setup};${script}`; - execFile(node, [ '-e', code ], common.mustCall((err, stdout, stderr) => { - assert(stderr.includes('Error: xyz'), 'digest crashes'); - })); -}); From 4513516f5e362935e84ee9908b65f98e32031314 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 13 Dec 2018 12:10:34 +0100 Subject: [PATCH 13/59] build: add a space to clarify skipping crypto msg This commit adds a space to the message that is displayed for tests that are skipped when node was built --without-ssl. For example, this is what is currently displayed: "release test-https-agent-additional-optionsSkipping as node was compiled without crypto support" After this change this will be: "release test-https-agent-additional-options: Skipping as node was compiled without crypto support" PR-URL: https://github.com/nodejs/node/pull/25011 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Richard Lau Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca --- test/testpy/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testpy/__init__.py b/test/testpy/__init__.py index 7d23c47214eedb..2bd976bbbdca5c 100644 --- a/test/testpy/__init__.py +++ b/test/testpy/__init__.py @@ -78,13 +78,13 @@ def GetCommand(self): # failure so such tests are also skipped. if (any(flag.startswith('--inspect') for flag in flags) and not self.context.v8_enable_inspector): - print('Skipping as node was compiled without inspector support') + print(': Skipping as node was compiled without inspector support') elif (('--use-bundled-ca' in flags or '--use-openssl-ca' in flags or '--tls-v1.0' in flags or '--tls-v1.1' in flags) and not self.context.node_has_crypto): - print('Skipping as node was compiled without crypto support') + print(': Skipping as node was compiled without crypto support') else: result += flags files_match = FILES_PATTERN.search(source); From 2516e9cfd0c9d4f94945a0a16f8d89041aed51ee Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Mon, 10 Dec 2018 13:27:32 +0100 Subject: [PATCH 14/59] doc,lib,test: capitalize comment sentences This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma Reviewed-By: Anna Henningsen Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell --- .eslintrc.js | 4 +- benchmark/_benchmark_progress.js | 2 +- benchmark/napi/function_args/index.js | 2 +- benchmark/napi/function_call/index.js | 2 +- benchmark/net/net-pipe.js | 2 +- benchmark/net/tcp-raw-c2s.js | 6 +-- benchmark/net/tcp-raw-pipe.js | 6 +-- benchmark/net/tcp-raw-s2c.js | 6 +-- benchmark/tls/tls-connect.js | 2 +- doc/api/async_hooks.md | 2 +- doc/api/cluster.md | 2 +- doc/api/domain.md | 4 +- doc/api/esm.md | 2 +- doc/api/events.md | 2 +- doc/api/path.md | 4 +- doc/api/perf_hooks.md | 2 +- doc/api/stream.md | 14 +++---- doc/api/tracing.md | 2 +- doc/api/vm.md | 2 +- doc/api/zlib.md | 2 +- doc/guides/writing-and-running-benchmarks.md | 2 +- lib/_http_client.js | 2 +- lib/_http_common.js | 4 +- lib/_http_incoming.js | 2 +- lib/_http_server.js | 2 +- lib/_stream_duplex.js | 8 ++-- lib/_stream_readable.js | 38 +++++++++---------- lib/_stream_transform.js | 6 +-- lib/_stream_writable.js | 24 ++++++------ lib/async_hooks.js | 2 +- lib/console.js | 2 +- lib/dgram.js | 2 +- lib/domain.js | 10 ++--- lib/events.js | 2 +- lib/fs.js | 12 +++--- lib/internal/bootstrap/node.js | 2 +- lib/internal/child_process.js | 4 +- lib/internal/console/constructor.js | 2 +- lib/internal/fs/streams.js | 12 +++--- lib/internal/http2/compat.js | 2 +- lib/internal/http2/core.js | 4 +- lib/internal/modules/cjs/loader.js | 6 +-- lib/internal/modules/esm/loader.js | 4 +- lib/internal/process/next_tick.js | 2 +- lib/internal/process/stdio.js | 4 +- lib/internal/streams/destroy.js | 2 +- lib/internal/timers.js | 2 +- lib/net.js | 10 ++--- lib/readline.js | 10 ++--- lib/repl.js | 4 +- lib/timers.js | 2 +- lib/url.js | 8 ++-- test/async-hooks/test-callback-error.js | 2 +- test/async-hooks/test-getaddrinforeqwrap.js | 2 +- test/async-hooks/test-getnameinforeqwrap.js | 2 +- test/async-hooks/test-querywrap.js | 2 +- test/async-hooks/test-udpsendwrap.js | 2 +- test/async-hooks/verify-graph.js | 6 +-- test/common/index.js | 4 +- test/js-native-api/test_constructor/test.js | 2 +- .../test_general/testInstanceOf.js | 2 +- .../js-native-api/test_general/testNapiRun.js | 2 +- .../test-async-wrap-tlssocket-asyncreset.js | 2 +- test/parallel/test-buffer-alloc.js | 16 ++++---- test/parallel/test-buffer-bytelength.js | 2 +- test/parallel/test-buffer-copy.js | 8 ++-- test/parallel/test-buffer-includes.js | 2 +- test/parallel/test-buffer-indexof.js | 2 +- test/parallel/test-buffer-read.js | 4 +- test/parallel/test-buffer-slow.js | 2 +- test/parallel/test-buffer-tostring-range.js | 4 +- .../parallel/test-child-process-disconnect.js | 6 +-- .../test-child-process-validate-stdio.js | 2 +- test/parallel/test-cli-syntax-piped-good.js | 4 +- test/parallel/test-cluster-disconnect.js | 2 +- test/parallel/test-cluster-eaccess.js | 4 +- test/parallel/test-cluster-worker-no-exit.js | 2 +- .../test-cluster-worker-wait-server-close.js | 2 +- test/parallel/test-console.js | 6 +-- test/parallel/test-crypto-authenticated.js | 4 +- test/parallel/test-crypto-cipher-decipher.js | 2 +- test/parallel/test-crypto-from-binary.js | 2 +- test/parallel/test-crypto.js | 2 +- .../parallel/test-dgram-close-in-listening.js | 2 +- .../test-dgram-close-is-not-callback.js | 2 +- test/parallel/test-domain-ee-implicit.js | 2 +- test/parallel/test-domain-implicit-fs.js | 2 +- test/parallel/test-domain-multi.js | 2 +- test/parallel/test-fs-append-file-sync.js | 2 +- test/parallel/test-fs-append-file.js | 16 ++++---- .../test-fs-non-number-arguments-throw.js | 2 +- test/parallel/test-fs-null-bytes.js | 4 +- .../test-fs-promises-file-handle-chmod.js | 6 +-- test/parallel/test-fs-promises.js | 2 +- .../test-fs-realpath-on-substed-drive.js | 2 +- test/parallel/test-fs-realpath.js | 4 +- test/parallel/test-fs-utimes.js | 2 +- test/parallel/test-fs-whatwg-url.js | 4 +- test/parallel/test-handle-wrap-isrefed.js | 2 +- .../test-http-addrequest-localaddress.js | 2 +- .../test-http-agent-destroyed-socket.js | 4 +- test/parallel/test-http-client-pipe-end.js | 2 +- .../test-http-client-spurious-aborted.js | 2 +- .../test-http-client-timeout-agent.js | 2 +- test/parallel/test-http-connect-req-res.js | 2 +- test/parallel/test-http-outgoing-finish.js | 2 +- .../test-http-remove-header-stays-removed.js | 2 +- ...test-http-request-dont-override-options.js | 2 +- .../test-http-response-multiheaders.js | 2 +- .../test-http-server-multiheaders2.js | 2 +- .../test-http-server-response-standalone.js | 2 +- test/parallel/test-http-url.parse-basic.js | 2 +- test/parallel/test-http-wget.js | 2 +- test/parallel/test-http-write-callbacks.js | 2 +- test/parallel/test-http-zero-length-write.js | 2 +- test/parallel/test-http2-altsvc.js | 2 +- .../test-http2-client-set-priority.js | 4 +- ...test-http2-compat-expect-continue-check.js | 2 +- .../test-http2-compat-serverrequest-pause.js | 2 +- .../test-http2-compat-serverrequest-pipe.js | 2 +- test/parallel/test-http2-compat-socket.js | 4 +- test/parallel/test-http2-connect.js | 2 +- test/parallel/test-http2-dont-override.js | 2 +- test/parallel/test-http2-pipe.js | 2 +- test/parallel/test-http2-respond-file-304.js | 2 +- test/parallel/test-http2-timeouts.js | 2 +- .../test-https-agent-create-connection.js | 2 +- .../test-https-argument-of-creating.js | 2 +- test/parallel/test-https-client-get-url.js | 2 +- test/parallel/test-https-slow-headers.js | 2 +- test/parallel/test-https-strict.js | 2 +- test/parallel/test-https-truncate.js | 2 +- .../test-listen-fd-detached-inherit.js | 4 +- test/parallel/test-listen-fd-detached.js | 2 +- test/parallel/test-module-version.js | 2 +- .../test-net-connect-immediate-finish.js | 2 +- .../test-net-connect-options-allowhalfopen.js | 2 +- test/parallel/test-net-timeout-no-handle.js | 2 +- .../test-next-tick-intentional-starvation.js | 2 +- test/parallel/test-path.js | 2 +- test/parallel/test-preload.js | 2 +- test/parallel/test-process-emitwarning.js | 2 +- .../test-process-env-allowed-flags.js | 2 +- test/parallel/test-process-env.js | 2 +- .../test-promises-unhandled-rejections.js | 2 +- test/parallel/test-querystring.js | 2 +- test/parallel/test-readline-interface.js | 6 +-- test/parallel/test-repl-tab-complete.js | 4 +- test/parallel/test-repl-underscore.js | 2 +- test/parallel/test-repl-use-global.js | 2 +- test/parallel/test-repl.js | 8 ++-- test/parallel/test-setproctitle.js | 2 +- test/parallel/test-stdio-pipe-stderr.js | 4 +- test/parallel/test-stream-big-push.js | 2 +- test/parallel/test-stream-duplex-destroy.js | 2 +- test/parallel/test-stream-pipe-after-end.js | 4 +- .../test-stream-readable-async-iterators.js | 2 +- test/parallel/test-stream-readable-destroy.js | 2 +- test/parallel/test-stream-readable-event.js | 2 +- .../test-stream-readable-flow-recursion.js | 4 +- test/parallel/test-stream-readable-hwm-0.js | 2 +- ...est-stream-readable-reading-readingMore.js | 8 ++-- .../test-stream-readable-resumeScheduled.js | 4 +- .../test-stream-unshift-empty-chunk.js | 2 +- test/parallel/test-stream-writable-destroy.js | 2 +- ...est-stream-writable-write-writev-finish.js | 2 +- test/parallel/test-stream2-basic.js | 4 +- test/parallel/test-stream2-transform.js | 4 +- test/parallel/test-stream3-cork-end.js | 2 +- test/parallel/test-stream3-pause-then-read.js | 2 +- test/parallel/test-stringbytes-external.js | 6 +-- test/parallel/test-timers-immediate-unref.js | 2 +- ...st-timers-reset-process-domain-on-throw.js | 2 +- test/parallel/test-timers.js | 2 +- test/parallel/test-tls-client-mindhsize.js | 2 +- test/parallel/test-tls-socket-close.js | 2 +- test/parallel/test-url-format.js | 4 +- test/parallel/test-url-parse-format.js | 2 +- test/parallel/test-v8-coverage.js | 6 +-- .../test-whatwg-url-custom-properties.js | 2 +- .../test-worker-uncaught-exception-async.js | 2 +- .../test-worker-uncaught-exception.js | 2 +- .../parallel/test-zlib-convenience-methods.js | 2 +- test/parallel/test-zlib-destroy-pipe.js | 2 +- test/parallel/test-zlib-flush-drain.js | 2 +- .../test-zlib-from-concatenated-gzip.js | 2 +- ...st-zlib-from-gzip-with-trailing-garbage.js | 2 +- test/parallel/test-zlib-from-string.js | 2 +- test/parallel/test-zlib-truncated.js | 6 +-- test/parallel/test-zlib-write-after-flush.js | 2 +- test/parallel/test-zlib.js | 6 +-- .../test-async-wrap-getasyncid-tty.js | 2 +- .../test-handle-wrap-isrefed-tty.js | 2 +- test/pummel/test-exec.js | 2 +- test/pummel/test-process-hrtime.js | 2 +- .../test-cli-syntax-file-not-found.js | 2 +- test/sequential/test-fs-watch.js | 2 +- test/sequential/test-module-loading.js | 8 ++-- test/sequential/test-next-tick-error-spin.js | 2 +- ...set-interval-excludes-callback-duration.js | 2 +- tools/doc/html.js | 2 +- 201 files changed, 348 insertions(+), 348 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 74787e2815599a..e793f8567455c1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -60,9 +60,9 @@ module.exports = { 'brace-style': ['error', '1tbs', { allowSingleLine: true }], 'capitalized-comments': ['error', 'always', { line: { - // Ignore all lines that have less characters than 62 and all lines that + // Ignore all lines that have less characters than 50 and all lines that // start with something that looks like a variable name or code. - ignorePattern: '^.{0,62}$|^ [a-z]+ ?[0-9A-Z_.(/=:-]', + ignorePattern: '^.{0,50}$|^ [a-z]+ ?[0-9A-Z_.(/=:[#-]', ignoreInlineComments: true, ignoreConsecutiveComments: true }, diff --git a/benchmark/_benchmark_progress.js b/benchmark/_benchmark_progress.js index 24bb95dcd19f38..935b1f24d49673 100644 --- a/benchmark/_benchmark_progress.js +++ b/benchmark/_benchmark_progress.js @@ -40,7 +40,7 @@ class BenchmarkProgress { this.completedConfig = 0; // Total number of configurations for the current file this.scheduledConfig = 0; - this.interval = 0; // result of setInterval for updating the elapsed time + this.interval; // Updates the elapsed time. } startQueue(index) { diff --git a/benchmark/napi/function_args/index.js b/benchmark/napi/function_args/index.js index df567dcfcc55bc..8f13454944772e 100644 --- a/benchmark/napi/function_args/index.js +++ b/benchmark/napi/function_args/index.js @@ -1,4 +1,4 @@ -// show the difference between calling a V8 binding C++ function +// Show the difference between calling a V8 binding C++ function // relative to a comparable N-API C++ function, // in various types/numbers of arguments. // Reports n of calls per second. diff --git a/benchmark/napi/function_call/index.js b/benchmark/napi/function_call/index.js index e7d9fe46e54636..b63d805fe309cc 100644 --- a/benchmark/napi/function_call/index.js +++ b/benchmark/napi/function_call/index.js @@ -1,4 +1,4 @@ -// show the difference between calling a short js function +// Show the difference between calling a short js function // relative to a comparable C++ function. // Reports n of calls per second. // Note that JS speed goes up, while cxx speed stays about the same. diff --git a/benchmark/net/net-pipe.js b/benchmark/net/net-pipe.js index e0b2842fd1de98..e02f1d3816ab5a 100644 --- a/benchmark/net/net-pipe.js +++ b/benchmark/net/net-pipe.js @@ -48,7 +48,7 @@ function main({ dur, len, type }) { socket.pipe(writer); setTimeout(function() { - // multiply by 2 since we're sending it first one way + // Multiply by 2 since we're sending it first one way // then then back again. const bytes = writer.received * 2; const gbits = (bytes * 8) / (1024 * 1024 * 1024); diff --git a/benchmark/net/tcp-raw-c2s.js b/benchmark/net/tcp-raw-c2s.js index 116cf57a234393..745a664e00acf9 100644 --- a/benchmark/net/tcp-raw-c2s.js +++ b/benchmark/net/tcp-raw-c2s.js @@ -47,12 +47,12 @@ function main({ dur, len, type }) { }, dur * 1000); clientHandle.onread = function(buffer) { - // we're not expecting to ever get an EOF from the client. - // just lots of data forever. + // We're not expecting to ever get an EOF from the client. + // Just lots of data forever. if (!buffer) fail('read'); - // don't slice the buffer. the point of this is to isolate, not + // Don't slice the buffer. The point of this is to isolate, not // simulate real traffic. bytes += buffer.byteLength; }; diff --git a/benchmark/net/tcp-raw-pipe.js b/benchmark/net/tcp-raw-pipe.js index 7144c237af21b4..65a7d05f4b8ce0 100644 --- a/benchmark/net/tcp-raw-pipe.js +++ b/benchmark/net/tcp-raw-pipe.js @@ -44,8 +44,8 @@ function main({ dur, len, type }) { fail(err, 'connect'); clientHandle.onread = function(buffer) { - // we're not expecting to ever get an EOF from the client. - // just lots of data forever. + // We're not expecting to ever get an EOF from the client. + // Just lots of data forever. if (!buffer) fail('read'); @@ -105,7 +105,7 @@ function main({ dur, len, type }) { clientHandle.readStart(); setTimeout(function() { - // multiply by 2 since we're sending it first one way + // Multiply by 2 since we're sending it first one way // then then back again. bench.end(2 * (bytes * 8) / (1024 * 1024 * 1024)); process.exit(0); diff --git a/benchmark/net/tcp-raw-s2c.js b/benchmark/net/tcp-raw-s2c.js index fbb7d2520cfe3b..4dd1ad6ee82e55 100644 --- a/benchmark/net/tcp-raw-s2c.js +++ b/benchmark/net/tcp-raw-s2c.js @@ -110,12 +110,12 @@ function main({ dur, len, type }) { connectReq.oncomplete = function() { var bytes = 0; clientHandle.onread = function(buffer) { - // we're not expecting to ever get an EOF from the client. - // just lots of data forever. + // We're not expecting to ever get an EOF from the client. + // Just lots of data forever. if (!buffer) fail('read'); - // don't slice the buffer. the point of this is to isolate, not + // Don't slice the buffer. The point of this is to isolate, not // simulate real traffic. bytes += buffer.byteLength; }; diff --git a/benchmark/tls/tls-connect.js b/benchmark/tls/tls-connect.js index 524d7468d000a1..fd7ea89b3b2c0a 100644 --- a/benchmark/tls/tls-connect.js +++ b/benchmark/tls/tls-connect.js @@ -59,7 +59,7 @@ function makeConnection() { function done() { running = false; - // it's only an established connection if they both saw it. + // It's only an established connection if they both saw it. // because we destroy the server somewhat abruptly, these // don't always match. Generally, serverConn will be // the smaller number, but take the min just to be sure. diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 587a74c3d06caa..e7ce3007104b5a 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -69,7 +69,7 @@ function before(asyncId) { } // After is called just after the resource's callback has finished. function after(asyncId) { } -// destroy is called when an AsyncWrap instance is destroyed. +// Destroy is called when an AsyncWrap instance is destroyed. function destroy(asyncId) { } // promiseResolve is called only for promise resources, when the diff --git a/doc/api/cluster.md b/doc/api/cluster.md index a84e301d0e352a..879f4af793e79c 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -322,7 +322,7 @@ if (cluster.isMaster) { process.on('message', (msg) => { if (msg === 'shutdown') { - // initiate graceful close of any connections to server + // Initiate graceful close of any connections to server } }); } diff --git a/doc/api/domain.md b/doc/api/domain.md index 3a1027f07b8afa..5ed1de4a4a23ca 100644 --- a/doc/api/domain.md +++ b/doc/api/domain.md @@ -248,7 +248,7 @@ const serverDomain = domain.create(); serverDomain.run(() => { // server is created in the scope of serverDomain http.createServer((req, res) => { - // req and res are also created in the scope of serverDomain + // Req and res are also created in the scope of serverDomain // however, we'd prefer to have a separate domain for each request. // create it first thing, and add req and res to it. const reqd = domain.create(); @@ -316,7 +316,7 @@ const d = domain.create(); function readSomeFile(filename, cb) { fs.readFile(filename, 'utf8', d.bind((er, data) => { - // if this throws, it will also be passed to the domain + // If this throws, it will also be passed to the domain return cb(er, data ? JSON.parse(data) : null); })); } diff --git a/doc/api/esm.md b/doc/api/esm.md index 459f87771815cc..bed1dd7b922f11 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -242,7 +242,7 @@ export async function dynamicInstantiate(url) { return { exports: ['customExportName'], execute: (exports) => { - // get and set functions provided for pre-allocated export names + // Get and set functions provided for pre-allocated export names exports.customExportName.set('value'); } }; diff --git a/doc/api/events.md b/doc/api/events.md index 4fcaeb3211c4f2..612b5aa04ecdfb 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -641,7 +641,7 @@ const logFnWrapper = listeners[0]; // Logs "log once" to the console and does not unbind the `once` event logFnWrapper.listener(); -// logs "log once" to the console and removes the listener +// Logs "log once" to the console and removes the listener logFnWrapper(); emitter.on('log', () => console.log('log persistently')); diff --git a/doc/api/path.md b/doc/api/path.md index 4cfa4fa8ae37d5..0248d5dbb59e79 100644 --- a/doc/api/path.md +++ b/doc/api/path.md @@ -299,7 +299,7 @@ path.join('/foo', 'bar', 'baz/asdf', 'quux', '..'); // Returns: '/foo/bar/baz/asdf' path.join('foo', {}, 'bar'); -// throws 'TypeError: Path must be a string. Received {}' +// Throws 'TypeError: Path must be a string. Received {}' ``` A [`TypeError`][] is thrown if any of the path segments is not a string. @@ -495,7 +495,7 @@ path.resolve('/foo/bar', '/tmp/file/'); // Returns: '/tmp/file' path.resolve('wwwroot', 'static_files/png/', '../gif/image.gif'); -// if the current working directory is /home/myself/node, +// If the current working directory is /home/myself/node, // this returns '/home/myself/node/wwwroot/static_files/gif/image.gif' ``` diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index f16a217bbea6ef..a891e875b5ab80 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -331,7 +331,7 @@ const { } = require('perf_hooks'); const obs = new PerformanceObserver((list, observer) => { - // called three times synchronously. list contains one item + // Called three times synchronously. list contains one item }); obs.observe({ entryTypes: ['mark'] }); diff --git a/doc/api/stream.md b/doc/api/stream.md index 5a9e304dc0e368..e6b4ffcc245d39 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -118,8 +118,8 @@ that implements an HTTP server: const http = require('http'); const server = http.createServer((req, res) => { - // req is an http.IncomingMessage, which is a Readable Stream - // res is an http.ServerResponse, which is a Writable Stream + // `req` is an http.IncomingMessage, which is a Readable Stream + // `res` is an http.ServerResponse, which is a Writable Stream let body = ''; // Get the data as utf8 strings. @@ -1195,7 +1195,7 @@ function parseHeader(stream, callback) { stream.removeListener('readable', onReadable); if (buf.length) stream.unshift(buf); - // now the body of the message can be read from the stream. + // Now the body of the message can be read from the stream. callback(null, header, stream); } else { // still reading the header. @@ -1930,7 +1930,7 @@ pause/resume mechanism, and a data callback, the low-level source can be wrapped by the custom `Readable` instance: ```js -// source is an object with readStop() and readStart() methods, +// `_source` is an object with readStop() and readStart() methods, // and an `ondata` member that gets called when it has data, and // an `onend` member that gets called when the data is over. @@ -1938,11 +1938,11 @@ class SourceWrapper extends Readable { constructor(options) { super(options); - this._source = getLowlevelSourceObject(); + this._source = getLowLevelSourceObject(); // Every time there's data, push it into the internal buffer. this._source.ondata = (chunk) => { - // if push() returns false, then stop reading from source + // If push() returns false, then stop reading from source if (!this.push(chunk)) this._source.readStop(); }; @@ -2391,7 +2391,7 @@ For example, consider the following code: // WARNING! BROKEN! net.createServer((socket) => { - // we add an 'end' listener, but never consume the data + // We add an 'end' listener, but never consume the data socket.on('end', () => { // It will never get here. socket.end('The message was received but was not processed.\n'); diff --git a/doc/api/tracing.md b/doc/api/tracing.md index 502998c7b6fc01..e09455d6437b73 100644 --- a/doc/api/tracing.md +++ b/doc/api/tracing.md @@ -133,7 +133,7 @@ t2.enable(); // Prints 'node,node.perf,v8' console.log(trace_events.getEnabledCategories()); -t2.disable(); // will only disable emission of the 'node.perf' category +t2.disable(); // Will only disable emission of the 'node.perf' category // Prints 'node,v8' console.log(trace_events.getEnabledCategories()); diff --git a/doc/api/vm.md b/doc/api/vm.md index f5b43df61a12c2..4c1c7d7cf5f106 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -33,7 +33,7 @@ const sandbox = { x: 2 }; vm.createContext(sandbox); // Contextify the sandbox. const code = 'x += 40; var y = 17;'; -// x and y are global variables in the sandboxed environment. +// `x` and `y` are global variables in the sandboxed environment. // Initially, x has the value 2 because that is the value of sandbox.x. vm.runInContext(code, sandbox); diff --git a/doc/api/zlib.md b/doc/api/zlib.md index b9d506c9e494f0..7b8f9187efb774 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -81,7 +81,7 @@ request.on('response', (response) => { const output = fs.createWriteStream('example.com_index.html'); switch (response.headers['content-encoding']) { - // or, just use zlib.createUnzip() to handle both cases + // Or, just use zlib.createUnzip() to handle both cases case 'gzip': response.pipe(zlib.createGunzip()).pipe(output); break; diff --git a/doc/guides/writing-and-running-benchmarks.md b/doc/guides/writing-and-running-benchmarks.md index 693107f4c22668..f0d6d289fa49ae 100644 --- a/doc/guides/writing-and-running-benchmarks.md +++ b/doc/guides/writing-and-running-benchmarks.md @@ -397,7 +397,7 @@ const options = { flags: ['--zero-fill-buffers'] }; -// main and configs are required, options is optional. +// `main` and `configs` are required, `options` is optional. const bench = common.createBenchmark(main, configs, options); // Note that any code outside main will be run twice, diff --git a/lib/_http_client.js b/lib/_http_client.js index 059c4a34d757ac..5dd75090361c7e 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -556,7 +556,7 @@ function parserOnIncomingClient(res, shouldKeepAlive) { req.res = res; res.req = req; - // add our listener first, so that we guarantee socket cleanup + // Add our listener first, so that we guarantee socket cleanup res.on('end', responseOnEnd); req.on('prefinish', requestOnPrefinish); var handled = req.emit('response', res); diff --git a/lib/_http_common.js b/lib/_http_common.js index 9188e9c7ca5e37..7ecef8b83d412b 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -116,11 +116,11 @@ function parserOnHeadersComplete(versionMajor, versionMinor, headers, method, function parserOnBody(b, start, len) { const stream = this.incoming; - // if the stream has already been removed, then drop it. + // If the stream has already been removed, then drop it. if (stream === null) return; - // pretend this was the result of a stream._read call. + // Pretend this was the result of a stream._read call. if (len > 0 && !stream._dumped) { var slice = b.slice(start, start + len); var ret = stream.push(slice); diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index 23ac4d54be1ec5..d220ede8a4e9be 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -68,7 +68,7 @@ function IncomingMessage(socket) { this.client = socket; this._consuming = false; - // flag for when we decide that this message cannot possibly be + // Flag for when we decide that this message cannot possibly be // read by the user, so there's no point continuing to handle it. this._dumped = false; } diff --git a/lib/_http_server.js b/lib/_http_server.js index 1dc44a4ce4c8b3..cfcaf9f34c2ca1 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -570,7 +570,7 @@ function resOnFinish(req, res, socket, state, server) { state.incoming.shift(); - // if the user never called req.read(), and didn't pipe() or + // If the user never called req.read(), and didn't pipe() or // .resume() or .on('data'), then we call req._dump() so that the // bytes will be pulled off the wire. if (!req._consuming && !req._readableState.resumeScheduled) diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js index 7059757dbd44b1..2854bdb58743d1 100644 --- a/lib/_stream_duplex.js +++ b/lib/_stream_duplex.js @@ -67,7 +67,7 @@ function Duplex(options) { } Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -77,7 +77,7 @@ Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { }); Object.defineProperty(Duplex.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -87,7 +87,7 @@ Object.defineProperty(Duplex.prototype, 'writableBuffer', { }); Object.defineProperty(Duplex.prototype, 'writableLength', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -112,7 +112,7 @@ function onEndNT(self) { } Object.defineProperty(Duplex.prototype, 'destroyed', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 297c8190c2b36f..2f8e5db65c43c3 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -78,7 +78,7 @@ function ReadableState(options, stream, isDuplex) { if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Stream.Duplex; - // object stream flag. Used to make read(n) ignore n and to + // Object stream flag. Used to make read(n) ignore n and to // make all the buffer merging and length checks go away this.objectMode = !!options.objectMode; @@ -108,7 +108,7 @@ function ReadableState(options, stream, isDuplex) { // not happen before the first read call. this.sync = true; - // whenever we return null, then we set a flag to say + // Whenever we return null, then we set a flag to say // that we're awaiting a 'readable' event emission. this.needReadable = false; this.emittedReadable = false; @@ -171,7 +171,7 @@ function Readable(options) { } Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -322,7 +322,7 @@ Readable.prototype.setEncoding = function(enc) { if (!StringDecoder) StringDecoder = require('string_decoder').StringDecoder; this._readableState.decoder = new StringDecoder(enc); - // if setEncoding(null), decoder.encoding equals utf8 + // If setEncoding(null), decoder.encoding equals utf8 this._readableState.encoding = this._readableState.decoder.encoding; return this; }; @@ -383,7 +383,7 @@ Readable.prototype.read = function(n) { if (n !== 0) state.emittedReadable = false; - // if we're doing read(0) to trigger a readable event, but we + // If we're doing read(0) to trigger a readable event, but we // already have a bunch of data in the buffer, then just trigger // the 'readable' event and move on. if (n === 0 && @@ -402,7 +402,7 @@ Readable.prototype.read = function(n) { n = howMuchToRead(n, state); - // if we've ended, and we're now clear, then finish it up. + // If we've ended, and we're now clear, then finish it up. if (n === 0 && state.ended) { if (state.length === 0) endReadable(this); @@ -505,12 +505,12 @@ function onEofChunk(stream, state) { state.ended = true; if (state.sync) { - // if we are sync, wait until next tick to emit the data. + // If we are sync, wait until next tick to emit the data. // Otherwise we risk emitting data in the flow() // the readable code triggers during a read() call emitReadable(stream); } else { - // emit 'readable' now to make sure it gets picked up. + // Emit 'readable' now to make sure it gets picked up. state.needReadable = false; if (!state.emittedReadable) { state.emittedReadable = true; @@ -655,7 +655,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { dest.end(); } - // when the dest drains, it reduces the awaitDrain counter + // When the dest drains, it reduces the awaitDrain counter // on the source. This would be more elegant with a .once() // handler in flow(), but adding and removing repeatedly is // too slow. @@ -677,7 +677,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { cleanedUp = true; - // if the reader is waiting for a drain event from this + // If the reader is waiting for a drain event from this // specific writer, then it would cause it to never start // flowing again. // So, if this is awaiting a drain, then we just call it now. @@ -707,8 +707,8 @@ Readable.prototype.pipe = function(dest, pipeOpts) { } } - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. + // If the dest has an error, then stop piping into it. + // However, don't suppress the throwing behavior for this. function onerror(er) { debug('onerror', er); unpipe(); @@ -827,7 +827,7 @@ Readable.prototype.on = function(ev, fn) { const state = this._readableState; if (ev === 'data') { - // update readableListening so that resume() may be a no-op + // Update readableListening so that resume() may be a no-op // a few lines down. This is needed to support once('readable'). state.readableListening = this.listenerCount('readable') > 0; @@ -957,7 +957,7 @@ function flow(stream) { while (state.flowing && stream.read() !== null); } -// wrap an old-style stream as the async data source. +// Wrap an old-style stream as the async data source. // This is *not* part of the readable stream interface. // It is an ugly unfortunate mess of history. Readable.prototype.wrap = function(stream) { @@ -1010,7 +1010,7 @@ Readable.prototype.wrap = function(stream) { stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); } - // when we try to consume some more bytes, simply unpause the + // When we try to consume some more bytes, simply unpause the // underlying stream. this._read = (n) => { debug('wrapped _read', n); @@ -1033,7 +1033,7 @@ Readable.prototype[Symbol.asyncIterator] = function() { }; Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -1043,7 +1043,7 @@ Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { }); Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -1053,7 +1053,7 @@ Object.defineProperty(Readable.prototype, 'readableBuffer', { }); Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -1071,7 +1071,7 @@ Object.defineProperty(Readable.prototype, 'readableFlowing', { Readable._fromList = fromList; Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index af7f5347a52110..0b4f845e4c1503 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -88,7 +88,7 @@ function afterTransform(er, data) { ts.writechunk = null; ts.writecb = null; - if (data != null) // single equals check for both `null` and `undefined` + if (data != null) // Single equals check for both `null` and `undefined` this.push(data); cb(er); @@ -189,7 +189,7 @@ Transform.prototype._read = function(n) { ts.transforming = true; this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); } else { - // mark that we need a transform, so that any data that comes in + // Mark that we need a transform, so that any data that comes in // will get processed, now that we've asked for it. ts.needTransform = true; } @@ -207,7 +207,7 @@ function done(stream, er, data) { if (er) return stream.emit('error', er); - if (data != null) // single equals check for both `null` and `undefined` + if (data != null) // Single equals check for both `null` and `undefined` stream.push(data); // TODO(BridgeAR): Write a test for these two error cases diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 0b013a01dd6196..71be4ffe381624 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -62,7 +62,7 @@ function WritableState(options, stream, isDuplex) { if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Stream.Duplex; - // object stream flag to indicate whether or not this stream + // Object stream flag to indicate whether or not this stream // contains buffers or objects. this.objectMode = !!options.objectMode; @@ -101,15 +101,15 @@ function WritableState(options, stream, isDuplex) { // Everything else in the universe uses 'utf8', though. this.defaultEncoding = options.defaultEncoding || 'utf8'; - // not an actual buffer we keep track of, but a measurement + // Not an actual buffer we keep track of, but a measurement // of how much we're waiting to get pushed to some underlying // socket or file. this.length = 0; - // a flag to see when we're in the middle of a write. + // A flag to see when we're in the middle of a write. this.writing = false; - // when true all writes will be buffered until .uncork() call + // When true all writes will be buffered until .uncork() call this.corked = 0; // A flag to be able to tell if the onwrite cb is called immediately, @@ -129,7 +129,7 @@ function WritableState(options, stream, isDuplex) { // The callback that the user supplies to write(chunk,encoding,cb) this.writecb = null; - // the amount that is being written when _write is called. + // The amount that is being written when _write is called. this.writelen = 0; this.bufferedRequest = null; @@ -331,7 +331,7 @@ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { }; Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -350,7 +350,7 @@ function decodeChunk(state, chunk, encoding) { } Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -359,7 +359,7 @@ Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { } }); -// if we're already writing something, then just put this +// If we're already writing something, then just put this // in the queue, and wait our turn. Otherwise, call _write // If we return false, then we need a drain event, so set that flag. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { @@ -420,7 +420,7 @@ function onwriteError(stream, state, sync, er, cb) { --state.pendingcb; if (sync) { - // defer the callback if we are being called synchronously + // Defer the callback if we are being called synchronously // to avoid piling up things on the stack process.nextTick(cb, er); // this can emit finish, and it will always happen @@ -496,7 +496,7 @@ function onwriteDrain(stream, state) { } } -// if there's something in the buffer waiting, then process it +// If there's something in the buffer waiting, then process it function clearBuffer(stream, state) { state.bufferProcessing = true; var entry = state.bufferedRequest; @@ -597,7 +597,7 @@ Writable.prototype.end = function(chunk, encoding, cb) { }; Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, @@ -686,7 +686,7 @@ function onCorkedFinish(corkReq, state, err) { } Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable + // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in // userland will fail enumerable: false, diff --git a/lib/async_hooks.js b/lib/async_hooks.js index 7d160707415a44..7ba5f40f18ebc4 100644 --- a/lib/async_hooks.js +++ b/lib/async_hooks.js @@ -157,7 +157,7 @@ class AsyncResource { this[async_id_symbol] = newAsyncId(); this[trigger_async_id_symbol] = triggerAsyncId; - // this prop name (destroyed) has to be synchronized with C++ + // This prop name (destroyed) has to be synchronized with C++ this[destroyedSymbol] = { destroyed: false }; emitInit( diff --git a/lib/console.js b/lib/console.js index 570515aefe0b62..59c51b368a819d 100644 --- a/lib/console.js +++ b/lib/console.js @@ -124,7 +124,7 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) { Object.defineProperty(this, kGroupIndent, { writable: true }); this[kGroupIndent] = ''; - // bind the prototype functions to this Console instance + // Bind the prototype functions to this Console instance var keys = Object.keys(Console.prototype); for (var v = 0; v < keys.length; v++) { var k = keys[v]; diff --git a/lib/dgram.js b/lib/dgram.js index 27c38191735f38..49c41982ff1b5c 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -514,7 +514,7 @@ function doSend(ex, self, ip, list, address, port, callback) { !!callback); if (err && callback) { - // don't emit as error, dgram_legacy.js compatibility + // Don't emit as error, dgram_legacy.js compatibility const ex = exceptionWithHostPort(err, 'send', address, port); process.nextTick(callback, ex); } diff --git a/lib/domain.js b/lib/domain.js index 899978cf7069d2..bd59a709298345 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -52,7 +52,7 @@ const pairing = new Map(); const asyncHook = createHook({ init(asyncId, type, triggerAsyncId, resource) { if (process.domain !== null && process.domain !== undefined) { - // if this operation is created while in a domain, let's mark it + // If this operation is created while in a domain, let's mark it pairing.set(asyncId, process.domain); resource.domain = process.domain; if (resource.promise !== undefined && @@ -187,7 +187,7 @@ exports.create = exports.createDomain = function createDomain() { return new Domain(); }; -// the active domain is always the one that we're currently in. +// The active domain is always the one that we're currently in. exports.active = null; Domain.prototype.members = undefined; @@ -226,7 +226,7 @@ Domain.prototype._errorHandler = function(er) { } } } else { - // wrap this in a try/catch so we don't get infinite throwing + // Wrap this in a try/catch so we don't get infinite throwing try { // One of three things will happen here. // @@ -266,7 +266,7 @@ Domain.prototype._errorHandler = function(er) { Domain.prototype.enter = function() { - // note that this might be a no-op, but we still need + // Note that this might be a no-op, but we still need // to push it onto the stack so that we can pop it later. exports.active = process.domain = this; stack.push(this); @@ -275,7 +275,7 @@ Domain.prototype.enter = function() { Domain.prototype.exit = function() { - // don't do anything if this domain is not on the stack. + // Don't do anything if this domain is not on the stack. var index = stack.lastIndexOf(this); if (index === -1) return; diff --git a/lib/events.js b/lib/events.js index 3fce38f881b9fb..6c5b699faa0685 100644 --- a/lib/events.js +++ b/lib/events.js @@ -380,7 +380,7 @@ EventEmitter.prototype.removeAllListeners = return this; } - // emit removeListener for all listeners on all events + // Emit removeListener for all listeners on all events if (arguments.length === 0) { var keys = Object.keys(events); var key; diff --git a/lib/fs.js b/lib/fs.js index 5a951d1f767640..57b3bed1e6e883 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1238,7 +1238,7 @@ function appendFile(path, data, options, callback) { // Don't make changes directly on options object options = copyObject(options); - // force append behavior when using a supplied file descriptor + // Force append behavior when using a supplied file descriptor if (!options.flag || isFd(path)) options.flag = 'a'; @@ -1251,7 +1251,7 @@ function appendFileSync(path, data, options) { // Don't make changes directly on options object options = copyObject(options); - // force append behavior when using a supplied file descriptor + // Force append behavior when using a supplied file descriptor if (!options.flag || isFd(path)) options.flag = 'a'; @@ -1419,11 +1419,11 @@ function realpathSync(p, options) { // current character position in p let pos; - // the partial path so far, including a trailing slash if any + // The partial path so far, including a trailing slash if any let current; // The partial path without a trailing slash (except when pointing at a root) let base; - // the partial path scanned in the previous round, with slash + // The partial path scanned in the previous round, with slash let previous; // Skip over roots @@ -1559,11 +1559,11 @@ function realpath(p, options, callback) { // current character position in p let pos; - // the partial path so far, including a trailing slash if any + // The partial path so far, including a trailing slash if any let current; // The partial path without a trailing slash (except when pointing at a root) let base; - // the partial path scanned in the previous round, with slash + // The partial path scanned in the previous round, with slash let previous; current = base = splitRoot(p); diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 3b9e20b2635817..d7e8ff5016f763 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -121,7 +121,7 @@ const browserGlobals = !process._noBrowserGlobals; if (browserGlobals) { - // we are setting this here to forward it to the inspector later + // We are setting this here to forward it to the inspector later perThreadSetup.originalConsole = global.console; setupGlobalTimeouts(); setupGlobalConsole(); diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index b6f9ca96296adb..0c93b4d0e6fe80 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -105,7 +105,7 @@ const handleConversion = { var firstTime = !this.channel.sockets.send[message.key]; var socketList = getSocketList('send', this, message.key); - // the server should no longer expose a .connection property + // The server should no longer expose a .connection property // and when asked to close it should query the socket status from // the workers if (firstTime) socket.server._setupWorker(socketList); @@ -254,7 +254,7 @@ function ChildProcess() { this.emit('exit', this.exitCode, this.signalCode); } - // if any of the stdio streams have not been touched, + // If any of the stdio streams have not been touched, // then pull all the data through so that it can get the // eof and emit a 'close' event. // Do it on nextTick so that the user has one last chance diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index d3c5ed74367b8a..6ed173210387a4 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -87,7 +87,7 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) { if (typeof colorMode !== 'boolean' && colorMode !== 'auto') throw new ERR_INVALID_ARG_VALUE('colorMode', colorMode); - // bind the prototype functions to this Console instance + // Bind the prototype functions to this Console instance var keys = Object.keys(Console.prototype); for (var v = 0; v < keys.length; v++) { var k = keys[v]; diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js index ea274eaf2fed50..c311fb59c825da 100644 --- a/lib/internal/fs/streams.js +++ b/lib/internal/fs/streams.js @@ -41,17 +41,17 @@ function ReadStream(path, options) { if (!(this instanceof ReadStream)) return new ReadStream(path, options); - // a little bit bigger buffer and water marks by default + // A little bit bigger buffer and water marks by default options = copyObject(getOptions(options, {})); if (options.highWaterMark === undefined) options.highWaterMark = 64 * 1024; - // for backwards compat do not emit close on destroy. + // For backwards compat do not emit close on destroy. options.emitClose = false; Readable.call(this, options); - // path will be ignored when fd is specified, so it can be falsy + // Path will be ignored when fd is specified, so it can be falsy this.path = toPathIfFileURL(path); this.fd = options.fd === undefined ? null : options.fd; this.flags = options.flags === undefined ? 'r' : options.flags; @@ -197,7 +197,7 @@ ReadStream.prototype._read = function(n) { } }); - // move the pool positions, and internal position for reading. + // Move the pool positions, and internal position for reading. if (this.pos !== undefined) this.pos += toRead; pool.used += toRead; @@ -238,12 +238,12 @@ function WriteStream(path, options) { options = copyObject(getOptions(options, {})); - // for backwards compat do not emit close on destroy. + // For backwards compat do not emit close on destroy. options.emitClose = false; Writable.call(this, options); - // path will be ignored when fd is specified, so it can be falsy + // Path will be ignored when fd is specified, so it can be falsy this.path = toPathIfFileURL(path); this.fd = options.fd === undefined ? null : options.fd; this.flags = options.flags === undefined ? 'w' : options.flags; diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index 1783a48ada814c..927504621d0a1d 100644 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -440,7 +440,7 @@ class Http2ServerResponse extends Stream { } get socket() { - // this is compatible with http1 which removes socket reference + // This is compatible with http1 which removes socket reference // only from ServerResponse but not IncomingMessage if (this[kState].closed) return; diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index b15e15f64fa2f7..887a234758b044 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -564,7 +564,7 @@ function requestOnConnect(headers, options) { if (options.waitForTrailers) streamOptions |= STREAM_OPTION_GET_TRAILERS; - // ret will be either the reserved stream ID (if positive) + // `ret` will be either the reserved stream ID (if positive) // or an error code (if negative) const ret = session[kHandle].request(headers, streamOptions, @@ -2082,7 +2082,7 @@ function startFilePipe(self, fd, offset, length) { pipe.onunpipe = onFileUnpipe; pipe.start(); - // exact length of the file doesn't matter here, since the + // Exact length of the file doesn't matter here, since the // stream is closing anyway - just use 1 to signify that // a write does exist trackWriteState(self, 1); diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index d79f375ba60b44..83ca0699773fa8 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -219,7 +219,7 @@ function tryExtensions(p, exts, isMain) { return false; } -// find the longest (possibly multi-dot) extension registered in +// Find the longest (possibly multi-dot) extension registered in // Module._extensions function findLongestRegisteredExtension(filename) { const name = path.basename(filename); @@ -596,7 +596,7 @@ Module._resolveFilename = function(request, parent, isMain, options) { paths = Module._resolveLookupPaths(request, parent, true); } - // look up the filename first, since that's the cache key. + // Look up the filename first, since that's the cache key. var filename = Module._findPath(request, paths, isMain); if (!filename) { // eslint-disable-next-line no-restricted-syntax @@ -695,7 +695,7 @@ Module.prototype._compile = function(content, filename) { var inspectorWrapper = null; if (process._breakFirstLine && process._eval == null) { if (!resolvedArgv) { - // we enter the repl if we're not given a filename argument. + // We enter the repl if we're not given a filename argument. if (process.argv[1]) { resolvedArgv = Module._resolveFilename(process.argv[1], null, false); } else { diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js index 820b593446ca79..a1a16219090e90 100644 --- a/lib/internal/modules/esm/loader.js +++ b/lib/internal/modules/esm/loader.js @@ -25,11 +25,11 @@ const debug = require('util').debuglog('esm'); * the main module and everything in its dependency graph. */ class Loader { constructor() { - // methods which translate input code or other information + // Methods which translate input code or other information // into es modules this.translators = translators; - // registry of loaded modules, akin to `require.cache` + // Registry of loaded modules, akin to `require.cache` this.moduleMap = new ModuleMap(); // The resolver has the signature diff --git a/lib/internal/process/next_tick.js b/lib/internal/process/next_tick.js index 046449d6581dbf..cb0274367ad4c5 100644 --- a/lib/internal/process/next_tick.js +++ b/lib/internal/process/next_tick.js @@ -81,7 +81,7 @@ function setupNextTick(_setupNextTick, _setupPromises) { class TickObject { constructor(callback, args, triggerAsyncId) { - // this must be set to null first to avoid function tracking + // This must be set to null first to avoid function tracking // on the hidden class, revisit in V8 versions after 6.2 this.callback = null; this.callback = callback; diff --git a/lib/internal/process/stdio.js b/lib/internal/process/stdio.js index b769ea2bca04b9..a52bbb7b1d204c 100644 --- a/lib/internal/process/stdio.js +++ b/lib/internal/process/stdio.js @@ -94,8 +94,8 @@ function getMainThreadStdio() { // For supporting legacy API we put the FD here. stdin.fd = fd; - // stdin starts out life in a paused state, but node doesn't - // know yet. Explicitly to readStop() it to put it in the + // `stdin` starts out life in a paused state, but node doesn't + // know yet. Explicitly to readStop() it to put it in the // not-reading state. if (stdin._handle && stdin._handle.readStop) { stdin._handle.reading = false; diff --git a/lib/internal/streams/destroy.js b/lib/internal/streams/destroy.js index de6bcf9cdb1b9a..0c652be9dd0b4d 100644 --- a/lib/internal/streams/destroy.js +++ b/lib/internal/streams/destroy.js @@ -1,6 +1,6 @@ 'use strict'; -// undocumented cb() API, needed for core, not for public API +// Undocumented cb() API, needed for core, not for public API function destroy(err, cb) { const readableDestroyed = this._readableState && this._readableState.destroyed; diff --git a/lib/internal/timers.js b/lib/internal/timers.js index fc9979e4b54e65..3eb7192e2b0a5d 100644 --- a/lib/internal/timers.js +++ b/lib/internal/timers.js @@ -69,7 +69,7 @@ function Timeout(callback, after, args, isRepeat) { this._idlePrev = this; this._idleNext = this; this._idleStart = null; - // this must be set to null first to avoid function tracking + // This must be set to null first to avoid function tracking // on the hidden class, revisit in V8 versions after 6.2 this._onTimeout = null; this._onTimeout = callback; diff --git a/lib/net.js b/lib/net.js index 942a187ba54e20..c5ff6182989efd 100644 --- a/lib/net.js +++ b/lib/net.js @@ -311,7 +311,7 @@ function Socket(options) { // handle strings directly this._writableState.decodeStrings = false; - // if we have a handle, then start the flow of data into the + // If we have a handle, then start the flow of data into the // buffer. if not, then this will happen when we connect if (this._handle && options.readable !== false) { if (options.pauseOnCreate) { @@ -343,7 +343,7 @@ Socket.prototype._unrefTimer = function _unrefTimer() { }; -// the user has called .end(), and all the bytes have been +// The user has called .end(), and all the bytes have been // sent out to the other side. Socket.prototype._final = function(cb) { // If still connecting - defer handling `_final` until 'connect' will happen @@ -454,7 +454,7 @@ Socket.prototype.setNoDelay = function(enable) { return this; } - // backwards compatibility: assume true when `enable` is omitted + // Backwards compatibility: assume true when `enable` is omitted if (this._handle.setNoDelay) this._handle.setNoDelay(enable === undefined ? true : !!enable); @@ -756,7 +756,7 @@ protoGetter('bytesWritten', function bytesWritten() { }); if (Array.isArray(data)) { - // was a writev, iterate over chunks to get total length + // Was a writev, iterate over chunks to get total length for (var i = 0; i < data.length; i++) { const chunk = data[i]; @@ -1147,7 +1147,7 @@ function toNumber(x) { return (x = Number(x)) >= 0 ? x : false; } // Returns handle if it can be created, or error code if it can't function createServerHandle(address, port, addressType, fd, flags) { var err = 0; - // assign handle in listen, and clean up if bind or listen fails + // Assign handle in listen, and clean up if bind or listen fails var handle; var isTCP = false; diff --git a/lib/readline.js b/lib/readline.js index 10cd583f162407..52dff98e05c07a 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -134,7 +134,7 @@ function Interface(input, output, completer, terminal) { throw new ERR_INVALID_OPT_VALUE.RangeError('historySize', historySize); } - // backwards compat; check the isTTY prop of the output stream + // Backwards compat; check the isTTY prop of the output stream // when `terminal` was not specified if (terminal === undefined && !(output === null || output === undefined)) { terminal = !!output.isTTY; @@ -440,7 +440,7 @@ Interface.prototype._normalWrite = function(b) { if (newPartContainsEnding) { this._sawReturnAt = string.endsWith('\r') ? Date.now() : 0; - // got one or more newlines; process into "line" events + // Got one or more newlines; process into "line" events var lines = string.split(lineEnding); // Either '' or (conceivably) the unfinished portion of the next line string = lines.pop(); @@ -448,7 +448,7 @@ Interface.prototype._normalWrite = function(b) { for (var n = 0; n < lines.length; n++) this._onLine(lines[n]); } else if (string) { - // no newlines this time, save what we have for next time + // No newlines this time, save what we have for next time this._line_buffer = string; } }; @@ -868,7 +868,7 @@ Interface.prototype._ttyWrite = function(s, key) { self.pause(); self.emit('SIGCONT'); } - // explicitly re-enable "raw mode" and move the cursor to + // Explicitly re-enable "raw mode" and move the cursor to // the correct position. // See https://github.com/joyent/node/issues/3295. self._setRawMode(true); @@ -1077,7 +1077,7 @@ function emitKeypressEvents(stream, iface) { ); } } catch (err) { - // if the generator throws (it could happen in the `keypress` + // If the generator throws (it could happen in the `keypress` // event), we need to restart it. stream[ESCAPE_DECODER] = emitKeys(stream); stream[ESCAPE_DECODER].next(); diff --git a/lib/repl.js b/lib/repl.js index 4d0921ad889aa0..3e9a933e214efa 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -752,7 +752,7 @@ exports.REPLServer = REPLServer; exports.REPL_MODE_SLOPPY = Symbol('repl-sloppy'); exports.REPL_MODE_STRICT = Symbol('repl-strict'); -// prompt is a string to print on each line for the prompt, +// Prompt is a string to print on each line for the prompt, // source is a stream to use for I/O, defaulting to stdin/stdout. exports.start = function(prompt, source, @@ -1357,7 +1357,7 @@ function _memory(cmd) { }()); } - // it is possible to determine a syntax error at this point. + // It is possible to determine a syntax error at this point. // if the REPL still has a bufferedCommand and // self.lines.level.length === 0 // TODO? keep a log of level so that any syntax breaking lines can diff --git a/lib/timers.js b/lib/timers.js index 4f2fef449db211..0937e73c4abd80 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -654,7 +654,7 @@ const Immediate = class Immediate { constructor(callback, args) { this._idleNext = null; this._idlePrev = null; - // this must be set to null first to avoid function tracking + // This must be set to null first to avoid function tracking // on the hidden class, revisit in V8 versions after 6.2 this._onImmediate = null; this._onImmediate = callback; diff --git a/lib/url.js b/lib/url.js index c34eee638cdf0b..9755cf430af924 100644 --- a/lib/url.js +++ b/lib/url.js @@ -78,7 +78,7 @@ const hostPattern = /^\/\/[^@/]+@[^@/]+/; const simplePathPattern = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/; const hostnameMaxLen = 255; -// protocols that can allow "unsafe" and "unwise" chars. +// Protocols that can allow "unsafe" and "unwise" chars. const unsafeProtocol = new SafeSet([ 'javascript', 'javascript:' @@ -434,7 +434,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) { this.query = querystring.parse(this.query); } } else if (parseQueryString) { - // no query string, but parseQueryString still requested + // No query string, but parseQueryString still requested this.search = null; this.query = Object.create(null); } @@ -863,7 +863,7 @@ Url.prototype.resolveObject = function resolveObject(relative) { return result; } - // if a url ENDs in . or .., then it must get a trailing slash. + // If a url ENDs in . or .., then it must get a trailing slash. // however, if it ends in anything else non-slashy, // then it must NOT get a trailing slash. var last = srcPath.slice(-1)[0]; @@ -871,7 +871,7 @@ Url.prototype.resolveObject = function resolveObject(relative) { (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === ''); - // strip single dots, resolve double dots to parent dir + // Strip single dots, resolve double dots to parent dir // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = srcPath.length - 1; i >= 0; i--) { diff --git a/test/async-hooks/test-callback-error.js b/test/async-hooks/test-callback-error.js index 07ed274342fd06..b52823c930677c 100644 --- a/test/async-hooks/test-callback-error.js +++ b/test/async-hooks/test-callback-error.js @@ -80,7 +80,7 @@ assert.ok(!arg); assert.strictEqual(signal, null); } else { assert.strictEqual(code, null); - // most posix systems will show 'SIGABRT', but alpine34 does not + // Most posix systems will show 'SIGABRT', but alpine34 does not if (signal !== 'SIGABRT') { console.log(`parent received signal ${signal}\nchild's stderr:`); console.log(stderr); diff --git a/test/async-hooks/test-getaddrinforeqwrap.js b/test/async-hooks/test-getaddrinforeqwrap.js index f2a978d7640677..7291ea8a301954 100644 --- a/test/async-hooks/test-getaddrinforeqwrap.js +++ b/test/async-hooks/test-getaddrinforeqwrap.js @@ -15,7 +15,7 @@ const hooks = initHooks(); hooks.enable(); dns.lookup('www.google.com', 4, common.mustCall(onlookup)); function onlookup() { - // we don't care about the error here in order to allow + // We don't care about the error here in order to allow // tests to run offline (lookup will fail in that case and the err be set); const as = hooks.activitiesOfTypes('GETADDRINFOREQWRAP'); diff --git a/test/async-hooks/test-getnameinforeqwrap.js b/test/async-hooks/test-getnameinforeqwrap.js index 9e06cbf9cbf174..c7a3937ff3ceef 100644 --- a/test/async-hooks/test-getnameinforeqwrap.js +++ b/test/async-hooks/test-getnameinforeqwrap.js @@ -15,7 +15,7 @@ const hooks = initHooks(); hooks.enable(); dns.lookupService('127.0.0.1', 80, common.mustCall(onlookupService)); function onlookupService() { - // we don't care about the error here in order to allow + // We don't care about the error here in order to allow // tests to run offline (lookup will fail in that case and the err be set) const as = hooks.activitiesOfTypes('GETNAMEINFOREQWRAP'); diff --git a/test/async-hooks/test-querywrap.js b/test/async-hooks/test-querywrap.js index f6e7e12e81e9c0..5ddb2fe700efde 100644 --- a/test/async-hooks/test-querywrap.js +++ b/test/async-hooks/test-querywrap.js @@ -11,7 +11,7 @@ const dns = require('dns'); const hooks = initHooks(); hooks.enable(); -// uses cares for queryA which in turn uses QUERYWRAP +// Uses cares for queryA which in turn uses QUERYWRAP dns.resolve('localhost', common.mustCall(onresolved)); function onresolved() { diff --git a/test/async-hooks/test-udpsendwrap.js b/test/async-hooks/test-udpsendwrap.js index d8ab77730f4921..25b7eb6103d6f5 100644 --- a/test/async-hooks/test-udpsendwrap.js +++ b/test/async-hooks/test-udpsendwrap.js @@ -21,7 +21,7 @@ function onlistening() { Buffer.alloc(2), 0, 2, sock.address().port, undefined, common.mustCall(onsent)); - // init not called synchronously because dns lookup always wraps + // Init not called synchronously because dns lookup always wraps // callback in a next tick even if no lookup is needed // TODO (trevnorris) submit patch to fix creation of tick objects and instead // create the send wrap synchronously. diff --git a/test/async-hooks/verify-graph.js b/test/async-hooks/verify-graph.js index 95c55c15958b2c..42a45d3f504640 100644 --- a/test/async-hooks/verify-graph.js +++ b/test/async-hooks/verify-graph.js @@ -14,7 +14,7 @@ function findInGraph(graph, type, n) { } function pruneTickObjects(activities) { - // remove one TickObject on each pass until none is left anymore + // Remove one TickObject on each pass until none is left anymore // not super efficient, but simplest especially to handle // multiple TickObjects in a row let foundTickObject = true; @@ -31,7 +31,7 @@ function pruneTickObjects(activities) { if (tickObjectIdx >= 0) { foundTickObject = true; - // point all triggerAsyncIds that point to the tickObject + // Point all triggerAsyncIds that point to the tickObject // to its triggerAsyncId and finally remove it from the activities const tickObject = activities[tickObjectIdx]; const newTriggerId = tickObject.triggerAsyncId; @@ -48,7 +48,7 @@ function pruneTickObjects(activities) { module.exports = function verifyGraph(hooks, graph) { pruneTickObjects(hooks); - // map actual ids to standin ids defined in the graph + // Map actual ids to standin ids defined in the graph const idtouid = {}; const uidtoid = {}; const typeSeen = {}; diff --git a/test/common/index.js b/test/common/index.js index 33089e69af6072..aea33b4c7f078d 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -78,7 +78,7 @@ if (process.env.NODE_TEST_WITH_ASYNC_HOOKS) { const async_wrap = internalBinding('async_wrap'); process.on('exit', () => { - // iterate through handles to make sure nothing crashes + // Iterate through handles to make sure nothing crashes for (const k in initHandles) util.inspect(initHandles[k]); }); @@ -788,7 +788,7 @@ module.exports = { // use external command opensslCli = 'openssl'; } else { - // use command built from sources included in Node.js repository + // Use command built from sources included in Node.js repository opensslCli = path.join(path.dirname(process.execPath), 'openssl-cli'); } diff --git a/test/js-native-api/test_constructor/test.js b/test/js-native-api/test_constructor/test.js index 616ba6c2a2927e..990e70a0a78ca4 100644 --- a/test/js-native-api/test_constructor/test.js +++ b/test/js-native-api/test_constructor/test.js @@ -44,7 +44,7 @@ assert.strictEqual(test_object.readonlyAccessor2, 2); assert.throws(() => { test_object.readonlyAccessor2 = 3; }, /^TypeError: Cannot assign to read only property 'readonlyAccessor2' of object '#'$/); -// validate that static properties are on the class as opposed +// Validate that static properties are on the class as opposed // to the instance assert.strictEqual(TestConstructor.staticReadonlyAccessor1, 10); assert.strictEqual(test_object.staticReadonlyAccessor1, undefined); diff --git a/test/js-native-api/test_general/testInstanceOf.js b/test/js-native-api/test_general/testInstanceOf.js index 53455a0025a0e2..562152caa6bd1f 100644 --- a/test/js-native-api/test_general/testInstanceOf.js +++ b/test/js-native-api/test_general/testInstanceOf.js @@ -4,7 +4,7 @@ const fs = require('fs'); const common = require('../../common'); const assert = require('assert'); -// addon is referenced through the eval expression in testFile +// Addon is referenced through the eval expression in testFile // eslint-disable-next-line no-unused-vars const addon = require(`./build/${common.buildType}/test_general`); const path = require('path'); diff --git a/test/js-native-api/test_general/testNapiRun.js b/test/js-native-api/test_general/testNapiRun.js index af9f89fa29d53d..e322d899ed1ca9 100644 --- a/test/js-native-api/test_general/testNapiRun.js +++ b/test/js-native-api/test_general/testNapiRun.js @@ -3,7 +3,7 @@ const common = require('../../common'); const assert = require('assert'); -// addon is referenced through the eval expression in testFile +// `addon` is referenced through the eval expression in testFile // eslint-disable-next-line no-unused-vars const addon = require(`./build/${common.buildType}/test_general`); diff --git a/test/parallel/test-async-wrap-tlssocket-asyncreset.js b/test/parallel/test-async-wrap-tlssocket-asyncreset.js index 37160741fcd8e7..983bce3b0239f2 100644 --- a/test/parallel/test-async-wrap-tlssocket-asyncreset.js +++ b/test/parallel/test-async-wrap-tlssocket-asyncreset.js @@ -41,7 +41,7 @@ server.listen( res.on('error', (err) => assert.fail(err)); res.socket.on('error', (err) => assert.fail(err)); res.resume(); - // drain the socket and wait for it to be free to reuse + // Drain the socket and wait for it to be free to reuse res.socket.once('free', () => { // This is the pain point. Internally the Agent will call // `socket._handle.asyncReset()` and if the _handle does not implement diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js index cee87994965493..8257a221c98e4a 100644 --- a/test/parallel/test-buffer-alloc.js +++ b/test/parallel/test-buffer-alloc.js @@ -84,7 +84,7 @@ const outOfRangeError = { type: RangeError }; -// try to write a 0-length string beyond the end of b +// Try to write a 0-length string beyond the end of b common.expectsError(() => b.write('', 2048), outOfBoundsError); // throw when writing to negative offset @@ -96,14 +96,14 @@ common.expectsError(() => b.write('a', 2048), outOfBoundsError); // throw when writing to negative offset common.expectsError(() => b.write('a', -1), outOfBoundsError); -// try to copy 0 bytes worth of data into an empty buffer +// Try to copy 0 bytes worth of data into an empty buffer b.copy(Buffer.alloc(0), 0, 0, 0); -// try to copy 0 bytes past the end of the target buffer +// Try to copy 0 bytes past the end of the target buffer b.copy(Buffer.alloc(0), 1, 1, 1); b.copy(Buffer.alloc(1), 1, 1, 1); -// try to copy 0 bytes from past the end of the source buffer +// Try to copy 0 bytes from past the end of the source buffer b.copy(Buffer.alloc(1), 0, 2048, 2048); // Testing for smart defaults and ability to pass string values as offset @@ -183,7 +183,7 @@ Buffer.alloc(1).write('', 1, 0); } { - // make sure only top level parent propagates from allocPool + // Make sure only top level parent propagates from allocPool const b = Buffer.allocUnsafe(5); const c = b.slice(0, 4); const d = c.slice(0, 2); @@ -331,13 +331,13 @@ assert.strictEqual((Buffer.from('Man')).toString('base64'), 'TWFu'); assert.strictEqual(quote.length, bytesWritten); assert.strictEqual(quote, b.toString('ascii', 0, quote.length)); - // check that the base64 decoder on the constructor works + // Check that the base64 decoder on the constructor works // even in the presence of whitespace. b = Buffer.from(expectedWhite, 'base64'); assert.strictEqual(quote.length, b.length); assert.strictEqual(quote, b.toString('ascii', 0, quote.length)); - // check that the base64 decoder ignores illegal chars + // Check that the base64 decoder ignores illegal chars const expectedIllegal = expected.slice(0, 60) + ' \x80' + expected.slice(60, 120) + ' \xff' + expected.slice(120, 180) + ' \x00' + @@ -723,7 +723,7 @@ assert.strictEqual(x.inspect(), ''); } { - // test unmatched surrogates not producing invalid utf8 output + // Test unmatched surrogates not producing invalid utf8 output // ef bf bd = utf-8 representation of unicode replacement character // see https://codereview.chromium.org/121173009/ const buf = Buffer.from('ab\ud800cd', 'utf8'); diff --git a/test/parallel/test-buffer-bytelength.js b/test/parallel/test-buffer-bytelength.js index 45bd4cf3dfd393..06cdda0b2feba9 100644 --- a/test/parallel/test-buffer-bytelength.js +++ b/test/parallel/test-buffer-bytelength.js @@ -78,7 +78,7 @@ assert.strictEqual(Buffer.byteLength('𠝹𠱓𠱸', 'UTF8'), 12); assert.strictEqual(Buffer.byteLength('hey there'), 9); assert.strictEqual(Buffer.byteLength('𠱸挶νξ#xx :)'), 17); assert.strictEqual(Buffer.byteLength('hello world', ''), 11); -// it should also be assumed with unrecognized encoding +// It should also be assumed with unrecognized encoding assert.strictEqual(Buffer.byteLength('hello world', 'abc'), 11); assert.strictEqual(Buffer.byteLength('ßœ∑≈', 'unkn0wn enc0ding'), 10); diff --git a/test/parallel/test-buffer-copy.js b/test/parallel/test-buffer-copy.js index e9f789a88623e7..86b1bbebcb7548 100644 --- a/test/parallel/test-buffer-copy.js +++ b/test/parallel/test-buffer-copy.js @@ -48,7 +48,7 @@ let cntr = 0; } { - // copy longer buffer b to shorter c without targetStart + // Copy longer buffer b to shorter c without targetStart b.fill(++cntr); c.fill(++cntr); const copied = b.copy(c); @@ -73,7 +73,7 @@ let cntr = 0; } { - // try to copy 513 bytes, and check we don't overrun c + // Try to copy 513 bytes, and check we don't overrun c b.fill(++cntr); c.fill(++cntr); const copied = b.copy(c, 0, 0, 513); @@ -94,7 +94,7 @@ let cntr = 0; } } -// copy string longer than buffer length (failure will segfault) +// Copy string longer than buffer length (failure will segfault) const bb = Buffer.allocUnsafe(10); bb.fill('hello crazy world'); @@ -121,7 +121,7 @@ common.expectsError( common.expectsError( () => b.copy(c, 0, -1), errorProperty); -// when sourceStart is greater than sourceEnd, zero copied +// When sourceStart is greater than sourceEnd, zero copied assert.strictEqual(b.copy(c, 0, 100, 10), 0); // when targetStart > targetLength, zero copied diff --git a/test/parallel/test-buffer-includes.js b/test/parallel/test-buffer-includes.js index 50f0d469b649eb..006961173d2b0a 100644 --- a/test/parallel/test-buffer-includes.js +++ b/test/parallel/test-buffer-includes.js @@ -193,7 +193,7 @@ for (let i = 66; i < 76; i++) { // from 'B' to 'K' const longBufferString = Buffer.from(longString); -// pattern of 15 chars, repeated every 16 chars in long +// Pattern of 15 chars, repeated every 16 chars in long let pattern = 'ABACABADABACABA'; for (let i = 0; i < longBufferString.length - pattern.length; i += 7) { const includes = longBufferString.includes(pattern, i); diff --git a/test/parallel/test-buffer-indexof.js b/test/parallel/test-buffer-indexof.js index 3647d115b0dc5b..32176fe03c93dc 100644 --- a/test/parallel/test-buffer-indexof.js +++ b/test/parallel/test-buffer-indexof.js @@ -248,7 +248,7 @@ for (let i = 66; i < 76; i++) { // from 'B' to 'K' const longBufferString = Buffer.from(longString); -// pattern of 15 chars, repeated every 16 chars in long +// Pattern of 15 chars, repeated every 16 chars in long let pattern = 'ABACABADABACABA'; for (let i = 0; i < longBufferString.length - pattern.length; i += 7) { const index = longBufferString.indexOf(pattern, i); diff --git a/test/parallel/test-buffer-read.js b/test/parallel/test-buffer-read.js index 94e198fedca7b1..4c9f92259d3a7b 100644 --- a/test/parallel/test-buffer-read.js +++ b/test/parallel/test-buffer-read.js @@ -32,7 +32,7 @@ read(buf, 'readInt16LE', [1], 0x48fd); read(buf, 'readInt32BE', [1], -45552945); read(buf, 'readInt32LE', [1], -806729475); -// testing basic functionality of readIntBE() and readIntLE() +// Testing basic functionality of readIntBE() and readIntLE() read(buf, 'readIntBE', [1, 1], -3); read(buf, 'readIntLE', [2, 1], 0x48); @@ -47,7 +47,7 @@ read(buf, 'readUInt16LE', [2], 0xea48); read(buf, 'readUInt32BE', [1], 0xfd48eacf); read(buf, 'readUInt32LE', [1], 0xcfea48fd); -// testing basic functionality of readUIntBE() and readUIntLE() +// Testing basic functionality of readUIntBE() and readUIntLE() read(buf, 'readUIntBE', [2, 2], 0x48ea); read(buf, 'readUIntLE', [2, 2], 0xea48); diff --git a/test/parallel/test-buffer-slow.js b/test/parallel/test-buffer-slow.js index e41dd1dd0fd3a0..cfea22b02cfd12 100644 --- a/test/parallel/test-buffer-slow.js +++ b/test/parallel/test-buffer-slow.js @@ -43,7 +43,7 @@ try { assert.strictEqual(SlowBuffer('6').length, 6); assert.strictEqual(SlowBuffer(true).length, 1); -// should create zero-length buffer if parameter is not a number +// Should create zero-length buffer if parameter is not a number assert.strictEqual(SlowBuffer().length, 0); assert.strictEqual(SlowBuffer(NaN).length, 0); assert.strictEqual(SlowBuffer({}).length, 0); diff --git a/test/parallel/test-buffer-tostring-range.js b/test/parallel/test-buffer-tostring-range.js index 436414e1b7da55..a06163bac2df9a 100644 --- a/test/parallel/test-buffer-tostring-range.js +++ b/test/parallel/test-buffer-tostring-range.js @@ -5,7 +5,7 @@ const assert = require('assert'); const rangeBuffer = Buffer.from('abc'); -// if start >= buffer's length, empty string will be returned +// If start >= buffer's length, empty string will be returned assert.strictEqual(rangeBuffer.toString('ascii', 3), ''); assert.strictEqual(rangeBuffer.toString('ascii', +Infinity), ''); assert.strictEqual(rangeBuffer.toString('ascii', 3.14, 3), ''); @@ -25,7 +25,7 @@ assert.strictEqual(rangeBuffer.toString('ascii', '-1', 3), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', '-1.99', 3), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', '-Infinity', 3), 'abc'); -// if start is an invalid integer, start will be taken as zero +// If start is an invalid integer, start will be taken as zero assert.strictEqual(rangeBuffer.toString('ascii', 'node.js', 3), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', {}, 3), 'abc'); assert.strictEqual(rangeBuffer.toString('ascii', [], 3), 'abc'); diff --git a/test/parallel/test-child-process-disconnect.js b/test/parallel/test-child-process-disconnect.js index e1b2c2de016d66..a1aebf1e08a7cd 100644 --- a/test/parallel/test-child-process-disconnect.js +++ b/test/parallel/test-child-process-disconnect.js @@ -48,7 +48,7 @@ if (process.argv[2] === 'child') { socket.end((process.connected).toString()); }); - // when the socket is closed, we will close the server + // When the socket is closed, we will close the server // allowing the process to self terminate socket.on('end', function() { server.close(); @@ -77,14 +77,14 @@ if (process.argv[2] === 'child') { parentFlag = child.connected; })); - // the process should also self terminate without using signals + // The process should also self terminate without using signals child.on('exit', common.mustCall()); // when child is listening child.on('message', function(obj) { if (obj && obj.msg === 'ready') { - // connect to child using TCP to know if disconnect was emitted + // Connect to child using TCP to know if disconnect was emitted const socket = net.connect(obj.port); socket.on('data', function(data) { diff --git a/test/parallel/test-child-process-validate-stdio.js b/test/parallel/test-child-process-validate-stdio.js index 26e4c297672ef6..5e23a098841ed7 100644 --- a/test/parallel/test-child-process-validate-stdio.js +++ b/test/parallel/test-child-process-validate-stdio.js @@ -8,7 +8,7 @@ const _validateStdio = require('internal/child_process')._validateStdio; const expectedError = common.expectsError({ code: 'ERR_INVALID_OPT_VALUE', type: TypeError }, 2); -// should throw if string and not ignore, pipe, or inherit +// Should throw if string and not ignore, pipe, or inherit assert.throws(() => _validateStdio('foo'), expectedError); // should throw if not a string or array diff --git a/test/parallel/test-cli-syntax-piped-good.js b/test/parallel/test-cli-syntax-piped-good.js index 7e0cfbc89a491a..79716fcf394f56 100644 --- a/test/parallel/test-cli-syntax-piped-good.js +++ b/test/parallel/test-cli-syntax-piped-good.js @@ -12,8 +12,8 @@ const syntaxArgs = [ ['--check'] ]; -// should not execute code piped from stdin with --check -// loop each possible option, `-c` or `--check` +// Should not execute code piped from stdin with --check. +// Loop each possible option, `-c` or `--check`. syntaxArgs.forEach(function(args) { const stdin = 'throw new Error("should not get run");'; const c = spawnSync(node, args, { encoding: 'utf8', input: stdin }); diff --git a/test/parallel/test-cluster-disconnect.js b/test/parallel/test-cluster-disconnect.js index 219c084a7e7073..1528233eb32df0 100644 --- a/test/parallel/test-cluster-disconnect.js +++ b/test/parallel/test-cluster-disconnect.js @@ -68,7 +68,7 @@ if (cluster.isWorker) { } }; - // start two workers and execute callback when both is listening + // Start two workers and execute callback when both is listening const startCluster = (cb) => { const workers = 8; let online = 0; diff --git a/test/parallel/test-cluster-eaccess.js b/test/parallel/test-cluster-eaccess.js index 346eb26110c12f..d6cccca5f3b2cd 100644 --- a/test/parallel/test-cluster-eaccess.js +++ b/test/parallel/test-cluster-eaccess.js @@ -45,7 +45,7 @@ if (cluster.isMaster && process.argv.length !== 3) { worker.on('online', common.mustCall()); worker.on('message', common.mustCall(function(err) { - // disconnect first, so that we will not leave zombies + // Disconnect first, so that we will not leave zombies worker.disconnect(); assert.strictEqual(err.code, 'EADDRINUSE'); })); @@ -54,7 +54,7 @@ if (cluster.isMaster && process.argv.length !== 3) { const PIPE_NAME = process.env.PIPE_NAME; const cp = fork(__filename, [PIPE_NAME], { stdio: 'inherit' }); - // message from the child indicates it's ready and listening + // Message from the child indicates it's ready and listening cp.on('message', common.mustCall(function() { const server = net.createServer().listen(PIPE_NAME, function() { // message child process so that it can exit diff --git a/test/parallel/test-cluster-worker-no-exit.js b/test/parallel/test-cluster-worker-no-exit.js index ecd7c47f5aa568..d3ee67994bd474 100644 --- a/test/parallel/test-cluster-worker-no-exit.js +++ b/test/parallel/test-cluster-worker-no-exit.js @@ -68,7 +68,7 @@ if (cluster.isMaster) { }); } else { process.on('message', function(msg) { - // we shouldn't exit, not while a network connection exists + // We shouldn't exit, not while a network connection exists net.connect(msg.port); }); } diff --git a/test/parallel/test-cluster-worker-wait-server-close.js b/test/parallel/test-cluster-worker-wait-server-close.js index b8183afb06ae18..849591e5734af9 100644 --- a/test/parallel/test-cluster-worker-wait-server-close.js +++ b/test/parallel/test-cluster-worker-wait-server-close.js @@ -39,7 +39,7 @@ if (cluster.isWorker) { socket.on('connect', function() { socket.on('data', function() { console.log('got data from client'); - // socket definitely connected to worker if we got data + // Socket definitely connected to worker if we got data worker.disconnect(); socket.end(); }); diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js index f781d619946e1a..7448d62208e65f 100644 --- a/test/parallel/test-console.js +++ b/test/parallel/test-console.js @@ -149,7 +149,7 @@ console.trace('This is a %j %d', { formatted: 'trace' }, 10, 'foo'); console.time('label'); console.timeEnd('label'); -// verify that Object.prototype properties can be used as labels +// Verify that Object.prototype properties can be used as labels console.time('__proto__'); console.timeEnd('__proto__'); console.time('constructor'); @@ -202,7 +202,7 @@ assert.strictEqual(errStrings.length, process.stderr.writeTimes); restoreStdout(); restoreStderr(); -// verify that console.timeEnd() doesn't leave dead links +// Verify that console.timeEnd() doesn't leave dead links const timesMapSize = console._times.size; console.time('label1'); console.time('label2'); @@ -268,7 +268,7 @@ assert.strictEqual(strings.length, 0); assert.strictEqual(errStrings.shift().split('\n').shift(), 'Trace: This is a {"formatted":"trace"} 10 foo'); -// hijack stderr to catch `process.emitWarning` which is using +// Hijack stderr to catch `process.emitWarning` which is using // `process.nextTick` hijackStderr(common.mustCall(function(data) { restoreStderr(); diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js index b62ce1a5b088bc..4f382eae6e849e 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -153,7 +153,7 @@ for (const test of TEST_CASES) { msg += decrypt.final(outputEncoding); assert.strictEqual(msg, test.plain); } else { - // assert that final throws if input data could not be verified! + // Assert that final throws if input data could not be verified! assert.throws(function() { decrypt.final('hex'); }, errMessages.auth); } } @@ -192,7 +192,7 @@ for (const test of TEST_CASES) { msg += decrypt.final('ascii'); assert.strictEqual(msg, test.plain); } else { - // assert that final throws if input data could not be verified! + // Assert that final throws if input data could not be verified! assert.throws(function() { decrypt.final('ascii'); }, errMessages.auth); } } diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js index ed387c3c999026..12fa98f3b27228 100644 --- a/test/parallel/test-crypto-cipher-decipher.js +++ b/test/parallel/test-crypto-cipher-decipher.js @@ -238,7 +238,7 @@ testCipher2(Buffer.from('0123456789abcdef')); assert.strictEqual(decipher.setAAD(aadbuf), decipher); } -// error throwing in setAAD/setAuthTag/getAuthTag/setAutoPadding +// Error throwing in setAAD/setAuthTag/getAuthTag/setAutoPadding { const key = '0123456789'; const aadbuf = Buffer.from('aadbuf'); diff --git a/test/parallel/test-crypto-from-binary.js b/test/parallel/test-crypto-from-binary.js index 435e0d82da5396..70bac93a9961cf 100644 --- a/test/parallel/test-crypto-from-binary.js +++ b/test/parallel/test-crypto-from-binary.js @@ -33,7 +33,7 @@ const crypto = require('crypto'); const EXTERN_APEX = 0xFBEE9; -// manually controlled string for checking binary output +// Manually controlled string for checking binary output let ucs2_control = 'a\u0000'; // grow the strings to proper length diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js index 1f02c07b02eb2f..10a8f529ddfd58 100644 --- a/test/parallel/test-crypto.js +++ b/test/parallel/test-crypto.js @@ -235,7 +235,7 @@ assert.throws(function() { // Then open private_key.pem and change its header and footer. const sha1_privateKey = fixtures.readSync('test_bad_rsa_privkey.pem', 'ascii'); - // this would inject errors onto OpenSSL's error stack + // This would inject errors onto OpenSSL's error stack crypto.createSign('sha1').sign(sha1_privateKey); }, (err) => { // Throws crypto error, so there is an opensslErrorStack property. diff --git a/test/parallel/test-dgram-close-in-listening.js b/test/parallel/test-dgram-close-in-listening.js index 902384e7e082d0..16432d85d6f345 100644 --- a/test/parallel/test-dgram-close-in-listening.js +++ b/test/parallel/test-dgram-close-in-listening.js @@ -16,7 +16,7 @@ socket.on('listening', function() { // get a random port for send const portGetter = dgram.createSocket('udp4') .bind(0, 'localhost', common.mustCall(() => { - // adds a listener to 'listening' to send the data when + // Adds a listener to 'listening' to send the data when // the socket is available socket.send(buf, 0, buf.length, portGetter.address().port, diff --git a/test/parallel/test-dgram-close-is-not-callback.js b/test/parallel/test-dgram-close-is-not-callback.js index 70700a16c6a798..69c166f42f3151 100644 --- a/test/parallel/test-dgram-close-is-not-callback.js +++ b/test/parallel/test-dgram-close-is-not-callback.js @@ -13,7 +13,7 @@ const portGetter = dgram.createSocket('udp4') portGetter.address().port, portGetter.address().address); - // if close callback is not function, ignore the argument. + // If close callback is not function, ignore the argument. socket.close('bad argument'); portGetter.close(); diff --git a/test/parallel/test-domain-ee-implicit.js b/test/parallel/test-domain-ee-implicit.js index 7634dd0bff86f1..3b5cf19e8a399f 100644 --- a/test/parallel/test-domain-ee-implicit.js +++ b/test/parallel/test-domain-ee-implicit.js @@ -23,6 +23,6 @@ d.run(common.mustCall(() => { })); setTimeout(common.mustCall(() => { - // escape from the domain, but implicit is still bound to it. + // Escape from the domain, but implicit is still bound to it. implicit.emit('error', new Error('foobar')); }), 1); diff --git a/test/parallel/test-domain-implicit-fs.js b/test/parallel/test-domain-implicit-fs.js index f3695989502a77..d5a6e79bc90734 100644 --- a/test/parallel/test-domain-implicit-fs.js +++ b/test/parallel/test-domain-implicit-fs.js @@ -40,7 +40,7 @@ d.on('error', common.mustCall(function(er) { })); -// implicit handling of thrown errors while in a domain, via the +// Implicit handling of thrown errors while in a domain, via the // single entry points of ReqWrap and MakeCallback. Even if // we try very hard to escape, there should be no way to, even if // we go many levels deep through timeouts and multiple IO calls. diff --git a/test/parallel/test-domain-multi.js b/test/parallel/test-domain-multi.js index 016e9cd12805ed..45d94b35a17c4c 100644 --- a/test/parallel/test-domain-multi.js +++ b/test/parallel/test-domain-multi.js @@ -36,7 +36,7 @@ const server = http.createServer((req, res) => { const b = domain.create(); a.add(b); - // treat these EE objects as if they are a part of the b domain + // Treat these EE objects as if they are a part of the b domain // so, an 'error' event on them propagates to the domain, rather // than being thrown. b.add(req); diff --git a/test/parallel/test-fs-append-file-sync.js b/test/parallel/test-fs-append-file-sync.js index 90e3f97d8cf252..c38a07fef76b8c 100644 --- a/test/parallel/test-fs-append-file-sync.js +++ b/test/parallel/test-fs-append-file-sync.js @@ -39,7 +39,7 @@ const data = '南越国是前203年至前111年存在于岭南地区的一个国 const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); -// test that empty file will be created and have content added +// Test that empty file will be created and have content added const filename = join(tmpdir.path, 'append-sync.txt'); fs.appendFileSync(filename, data); diff --git a/test/parallel/test-fs-append-file.js b/test/parallel/test-fs-append-file.js index 20cba235f035b6..3122982e2a4af4 100644 --- a/test/parallel/test-fs-append-file.js +++ b/test/parallel/test-fs-append-file.js @@ -68,7 +68,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; .catch(throwNextTick); } -// test that appends data to a non-empty file (callback API) +// Test that appends data to a non-empty file (callback API) { const filename = join(tmpdir.path, 'append-non-empty.txt'); fs.writeFileSync(filename, currentFileData); @@ -84,7 +84,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; })); } -// test that appends data to a non-empty file (promise API) +// Test that appends data to a non-empty file (promise API) { const filename = join(tmpdir.path, 'append-non-empty-promise.txt'); fs.writeFileSync(filename, currentFileData); @@ -98,7 +98,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; .catch(throwNextTick); } -// test that appendFile accepts buffers (callback API) +// Test that appendFile accepts buffers (callback API) { const filename = join(tmpdir.path, 'append-buffer.txt'); fs.writeFileSync(filename, currentFileData); @@ -115,7 +115,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; })); } -// test that appendFile accepts buffers (promises API) +// Test that appendFile accepts buffers (promises API) { const filename = join(tmpdir.path, 'append-buffer-promises.txt'); fs.writeFileSync(filename, currentFileData); @@ -130,7 +130,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; .catch(throwNextTick); } -// test that appendFile accepts numbers (callback API) +// Test that appendFile accepts numbers (callback API) { const filename = join(tmpdir.path, 'append-numbers.txt'); fs.writeFileSync(filename, currentFileData); @@ -153,7 +153,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; })); } -// test that appendFile accepts numbers (promises API) +// Test that appendFile accepts numbers (promises API) { const filename = join(tmpdir.path, 'append-numbers-promises.txt'); fs.writeFileSync(filename, currentFileData); @@ -176,7 +176,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; .catch(throwNextTick); } -// test that appendFile accepts file descriptors (callback API) +// Test that appendFile accepts file descriptors (callback API) { const filename = join(tmpdir.path, 'append-descriptors.txt'); fs.writeFileSync(filename, currentFileData); @@ -200,7 +200,7 @@ const throwNextTick = (e) => { process.nextTick(() => { throw e; }); }; })); } -// test that appendFile accepts file descriptors (promises API) +// Test that appendFile accepts file descriptors (promises API) { const filename = join(tmpdir.path, 'append-descriptors-promises.txt'); fs.writeFileSync(filename, currentFileData); diff --git a/test/parallel/test-fs-non-number-arguments-throw.js b/test/parallel/test-fs-non-number-arguments-throw.js index 61ed3f6c285dd0..4f85229cf5c64b 100644 --- a/test/parallel/test-fs-non-number-arguments-throw.js +++ b/test/parallel/test-fs-non-number-arguments-throw.js @@ -10,7 +10,7 @@ const tempFile = path.join(tmpdir.path, 'fs-non-number-arguments-throw'); tmpdir.refresh(); fs.writeFileSync(tempFile, 'abc\ndef'); -// a sanity check when using numbers instead of strings +// A sanity check when using numbers instead of strings const sanity = 'def'; const saneEmitter = fs.createReadStream(tempFile, { start: 4, end: 6 }); diff --git a/test/parallel/test-fs-null-bytes.js b/test/parallel/test-fs-null-bytes.js index f5a56b01d5f883..25f74d6e54d6d1 100644 --- a/test/parallel/test-fs-null-bytes.js +++ b/test/parallel/test-fs-null-bytes.js @@ -148,8 +148,8 @@ check(null, fs.watch, fileUrl2, assert.fail); check(null, fs.watchFile, fileUrl2, assert.fail); check(fs.writeFile, fs.writeFileSync, fileUrl2, 'abc'); -// an 'error' for exists means that it doesn't exist. -// one of many reasons why this file is the absolute worst. +// An 'error' for exists means that it doesn't exist. +// One of many reasons why this file is the absolute worst. fs.exists('foo\u0000bar', common.mustCall((exists) => { assert(!exists); })); diff --git a/test/parallel/test-fs-promises-file-handle-chmod.js b/test/parallel/test-fs-promises-file-handle-chmod.js index 6b51639d410b3a..cb7a1c6317be41 100644 --- a/test/parallel/test-fs-promises-file-handle-chmod.js +++ b/test/parallel/test-fs-promises-file-handle-chmod.js @@ -25,10 +25,10 @@ async function validateFilePermission() { const newPermissions = 0o765; if (common.isWindows) { - // chmod in Windows will only toggle read only/write access. the + // Chmod in Windows will only toggle read only/write access. The // fs.Stats.mode in Windows is computed using read/write - // bits (not exec). read only at best returns 444; r/w 666. - // refer: /deps/uv/src/win/fs.cfs; + // bits (not exec). Read-only at best returns 444; r/w 666. + // Refer: /deps/uv/src/win/fs.cfs; expectedAccess = 0o664; } else { expectedAccess = newPermissions; diff --git a/test/parallel/test-fs-promises.js b/test/parallel/test-fs-promises.js index 6b8fe3bb250899..c4143fbb9bd027 100644 --- a/test/parallel/test-fs-promises.js +++ b/test/parallel/test-fs-promises.js @@ -106,7 +106,7 @@ async function getHandle(dest) { await handle.sync(); } - // test fs.read promises when length to read is zero bytes + // Test fs.read promises when length to read is zero bytes { const dest = path.resolve(tmpDir, 'test1.js'); const handle = await getHandle(dest); diff --git a/test/parallel/test-fs-realpath-on-substed-drive.js b/test/parallel/test-fs-realpath-on-substed-drive.js index 4f4181a4aee1be..1c86dc364974dc 100644 --- a/test/parallel/test-fs-realpath-on-substed-drive.js +++ b/test/parallel/test-fs-realpath-on-substed-drive.js @@ -25,7 +25,7 @@ for (i = 0; i < driveLetters.length; ++i) { if (i === driveLetters.length) common.skip('Cannot create subst drive'); -// schedule cleanup (and check if all callbacks where called) +// Schedule cleanup (and check if all callbacks where called) process.on('exit', function() { spawnSync('subst', ['/d', drive]); }); diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 5c1c0cd962a3d5..1eaf1681d75fba 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -115,7 +115,7 @@ function test_simple_relative_symlink(realpath, realpathSync, callback) { function test_simple_absolute_symlink(realpath, realpathSync, callback) { console.log('test_simple_absolute_symlink'); - // this one should still run, even if skipSymlinks is set, + // This one should still run, even if skipSymlinks is set, // because it uses a junction. const type = skipSymlinks ? 'junction' : 'dir'; @@ -418,7 +418,7 @@ function test_up_multiple(realpath, realpathSync, cb) { function test_abs_with_kids(realpath, realpathSync, cb) { console.log('test_abs_with_kids'); - // this one should still run, even if skipSymlinks is set, + // This one should still run, even if skipSymlinks is set, // because it uses a junction. const type = skipSymlinks ? 'junction' : 'dir'; diff --git a/test/parallel/test-fs-utimes.js b/test/parallel/test-fs-utimes.js index 4c13fc46592105..bed403dc2db82c 100644 --- a/test/parallel/test-fs-utimes.js +++ b/test/parallel/test-fs-utimes.js @@ -195,7 +195,7 @@ if (!process.arch.includes('arm') && !common.isOpenBSD && !common.isSunOS) { } if (common.isWindows) { - // this value would get converted to (double)1713037251359.9998 + // This value would get converted to (double)1713037251359.9998 const truncate_mtime = 1713037251360; fs.utimesSync(path, truncate_mtime / 1000, truncate_mtime / 1000); const truncate_stats = fs.statSync(path); diff --git a/test/parallel/test-fs-whatwg-url.js b/test/parallel/test-fs-whatwg-url.js index 159fc0cc1b31ea..91c5c39637d175 100644 --- a/test/parallel/test-fs-whatwg-url.js +++ b/test/parallel/test-fs-whatwg-url.js @@ -42,7 +42,7 @@ common.expectsError( // pct-encoded characters in the path will be decoded and checked if (common.isWindows) { - // encoded back and forward slashes are not permitted on windows + // Encoded back and forward slashes are not permitted on windows ['%2f', '%2F', '%5c', '%5C'].forEach((i) => { common.expectsError( () => { @@ -67,7 +67,7 @@ if (common.isWindows) { } ); } else { - // encoded forward slashes are not permitted on other platforms + // Encoded forward slashes are not permitted on other platforms ['%2f', '%2F'].forEach((i) => { common.expectsError( () => { diff --git a/test/parallel/test-handle-wrap-isrefed.js b/test/parallel/test-handle-wrap-isrefed.js index 421bf696b11148..2fb766ce72ea4b 100644 --- a/test/parallel/test-handle-wrap-isrefed.js +++ b/test/parallel/test-handle-wrap-isrefed.js @@ -107,4 +107,4 @@ const { kStateSymbol } = require('internal/dgram'); } -// see also test/pseudo-tty/test-handle-wrap-isrefed-tty.js +// See also test/pseudo-tty/test-handle-wrap-isrefed-tty.js diff --git a/test/parallel/test-http-addrequest-localaddress.js b/test/parallel/test-http-addrequest-localaddress.js index fce53c88af3690..ce2ae8d12e2b9a 100644 --- a/test/parallel/test-http-addrequest-localaddress.js +++ b/test/parallel/test-http-addrequest-localaddress.js @@ -8,7 +8,7 @@ require('../common'); const assert = require('assert'); const agent = require('http').globalAgent; -// small stub just so we can call addRequest directly +// Small stub just so we can call addRequest directly const req = { getHeader: () => {} }; diff --git a/test/parallel/test-http-agent-destroyed-socket.js b/test/parallel/test-http-agent-destroyed-socket.js index af63a676f62fd9..7dbc1db9f93388 100644 --- a/test/parallel/test-http-agent-destroyed-socket.js +++ b/test/parallel/test-http-agent-destroyed-socket.js @@ -52,7 +52,7 @@ const server = http.createServer(common.mustCall((req, res) => { // assert request2 was removed from the queue assert(!agent.requests[key]); process.nextTick(() => { - // assert that the same socket was not assigned to request2, + // Assert that the same socket was not assigned to request2, // since it was destroyed. assert.notStrictEqual(request1.socket, request2.socket); assert(!request2.socket.destroyed, 'the socket is destroyed'); @@ -64,7 +64,7 @@ const server = http.createServer(common.mustCall((req, res) => { const request2 = http.get(requestOptions, common.mustCall((response) => { assert(!request2.socket.destroyed); assert(request1.socket.destroyed); - // assert not reusing the same socket, since it was destroyed. + // Assert not reusing the same socket, since it was destroyed. assert.notStrictEqual(request1.socket, request2.socket); const countdown = new Countdown(2, () => server.close()); request2.socket.on('close', common.mustCall(() => countdown.dec())); diff --git a/test/parallel/test-http-client-pipe-end.js b/test/parallel/test-http-client-pipe-end.js index 9dcdbe4a49d83a..9aa645b12a2866 100644 --- a/test/parallel/test-http-client-pipe-end.js +++ b/test/parallel/test-http-client-pipe-end.js @@ -50,7 +50,7 @@ server.listen(common.PIPE, function() { sched(function() { req.end(); }, 5); }); -// schedule a callback after `ticks` event loop ticks +// Schedule a callback after `ticks` event loop ticks function sched(cb, ticks) { function fn() { if (--ticks) diff --git a/test/parallel/test-http-client-spurious-aborted.js b/test/parallel/test-http-client-spurious-aborted.js index 58a2f92de94054..8f05f0cb36a2a6 100644 --- a/test/parallel/test-http-client-spurious-aborted.js +++ b/test/parallel/test-http-client-spurious-aborted.js @@ -52,7 +52,7 @@ function download() { _handle._close = res.socket._handle.close; _handle.close = function(callback) { _handle._close(); - // set readable to true even though request is complete + // Set readable to true even though request is complete if (res.complete) res.readable = true; callback(); }; diff --git a/test/parallel/test-http-client-timeout-agent.js b/test/parallel/test-http-client-timeout-agent.js index 2f4aeed97571d3..154f788c188f9d 100644 --- a/test/parallel/test-http-client-timeout-agent.js +++ b/test/parallel/test-http-client-timeout-agent.js @@ -89,6 +89,6 @@ server.listen(0, options.host, function() { process.on('exit', () => { console.error(`done=${requests_done} sent=${requests_sent}`); - // check that timeout on http request was not called too much + // Check that timeout on http request was not called too much assert.strictEqual(requests_done, requests_sent); }); diff --git a/test/parallel/test-http-connect-req-res.js b/test/parallel/test-http-connect-req-res.js index 5db19aedde91d8..893c621852be89 100644 --- a/test/parallel/test-http-connect-req-res.js +++ b/test/parallel/test-http-connect-req-res.js @@ -51,7 +51,7 @@ server.listen(0, common.mustCall(function() { let data = firstBodyChunk.toString(); - // test that the firstBodyChunk was not parsed as HTTP + // Test that the firstBodyChunk was not parsed as HTTP assert.strictEqual(data, 'Head'); socket.on('data', function(buf) { diff --git a/test/parallel/test-http-outgoing-finish.js b/test/parallel/test-http-outgoing-finish.js index c805a89cc165f2..1fcd7cd0769db1 100644 --- a/test/parallel/test-http-outgoing-finish.js +++ b/test/parallel/test-http-outgoing-finish.js @@ -51,7 +51,7 @@ function write(out) { // first, write until it gets some backpressure while (out.write(buf)) {} - // now end, and make sure that we don't get the 'finish' event + // Now end, and make sure that we don't get the 'finish' event // before the tick where the cb gets called. We give it until // nextTick because this is added as a listener before the endcb // is registered. The order is not what we're testing here, just diff --git a/test/parallel/test-http-remove-header-stays-removed.js b/test/parallel/test-http-remove-header-stays-removed.js index 09a44753885d1b..3885ebd905f758 100644 --- a/test/parallel/test-http-remove-header-stays-removed.js +++ b/test/parallel/test-http-remove-header-stays-removed.js @@ -32,7 +32,7 @@ const server = http.createServer(function(request, response) { response.removeHeader('transfer-encoding'); response.removeHeader('content-length'); - // make sure that removing and then setting still works: + // Make sure that removing and then setting still works: response.removeHeader('date'); response.setHeader('date', 'coffee o clock'); diff --git a/test/parallel/test-http-request-dont-override-options.js b/test/parallel/test-http-request-dont-override-options.js index ff534436cb8f93..19b847dc0390f5 100644 --- a/test/parallel/test-http-request-dont-override-options.js +++ b/test/parallel/test-http-request-dont-override-options.js @@ -14,7 +14,7 @@ server.listen(0, function() { const agent = new http.Agent(); agent.defaultPort = this.address().port; - // options marked as explicitly undefined for readability + // Options marked as explicitly undefined for readability // in this test, they should STAY undefined as options should not // be mutable / modified const options = { diff --git a/test/parallel/test-http-response-multiheaders.js b/test/parallel/test-http-response-multiheaders.js index f9429cff934276..31cb59546c698c 100644 --- a/test/parallel/test-http-response-multiheaders.js +++ b/test/parallel/test-http-response-multiheaders.js @@ -51,7 +51,7 @@ const server = http.createServer(function(req, res) { server.listen(0, common.mustCall(function() { const countdown = new Countdown(runCount, () => server.close()); for (let n = 1; n <= runCount; n++) { - // this runs twice, the first time, the server will use + // This runs twice, the first time, the server will use // setHeader, the second time it uses writeHead. The // result on the client side should be the same in // either case -- only the first instance of the header diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js index bb0fe0eaca57a9..a8878d29518f9a 100644 --- a/test/parallel/test-http-server-multiheaders2.js +++ b/test/parallel/test-http-server-multiheaders2.js @@ -47,7 +47,7 @@ const multipleAllowed = [ // not a special case, just making sure it's parsed correctly 'X-Forwarded-For', - // make sure that unspecified headers is treated as multiple + // Make sure that unspecified headers is treated as multiple 'Some-Random-Header', 'X-Some-Random-Header', ]; diff --git a/test/parallel/test-http-server-response-standalone.js b/test/parallel/test-http-server-response-standalone.js index 7025c734b3103d..a50974d2d31566 100644 --- a/test/parallel/test-http-server-response-standalone.js +++ b/test/parallel/test-http-server-response-standalone.js @@ -5,7 +5,7 @@ const { ServerResponse } = require('http'); const { Writable } = require('stream'); const assert = require('assert'); -// check that ServerResponse can be used without a proper Socket +// Check that ServerResponse can be used without a proper Socket // Fixes: https://github.com/nodejs/node/issues/14386 // Fixes: https://github.com/nodejs/node/issues/14381 diff --git a/test/parallel/test-http-url.parse-basic.js b/test/parallel/test-http-url.parse-basic.js index a6ecd3918f1803..c900d045d359b8 100644 --- a/test/parallel/test-http-url.parse-basic.js +++ b/test/parallel/test-http-url.parse-basic.js @@ -31,7 +31,7 @@ let testURL; function check(request) { // default method should still be get assert.strictEqual(request.method, 'GET'); - // there are no URL params, so you should not see any + // There are no URL params, so you should not see any assert.strictEqual(request.url, '/'); // the host header should use the url.parse.hostname assert.strictEqual(request.headers.host, diff --git a/test/parallel/test-http-wget.js b/test/parallel/test-http-wget.js index ef06deefdf8afa..f576f6ad603b02 100644 --- a/test/parallel/test-http-wget.js +++ b/test/parallel/test-http-wget.js @@ -25,7 +25,7 @@ const assert = require('assert'); const net = require('net'); const http = require('http'); -// wget sends an HTTP/1.0 request with Connection: Keep-Alive +// `wget` sends an HTTP/1.0 request with Connection: Keep-Alive // // Sending back a chunked response to an HTTP/1.0 client would be wrong, // so what has to happen in this case is that the connection is closed diff --git a/test/parallel/test-http-write-callbacks.js b/test/parallel/test-http-write-callbacks.js index 401017592b67a1..a4f23e12cb955b 100644 --- a/test/parallel/test-http-write-callbacks.js +++ b/test/parallel/test-http-write-callbacks.js @@ -91,7 +91,7 @@ server.listen(0, function() { }); }); req.on('response', (res) => { - // this should not come until after the end is flushed out + // This should not come until after the end is flushed out assert(clientEndCb); res.setEncoding('ascii'); res.on('data', (c) => { diff --git a/test/parallel/test-http-zero-length-write.js b/test/parallel/test-http-zero-length-write.js index 35a1b616d704f3..f765ad0545a819 100644 --- a/test/parallel/test-http-zero-length-write.js +++ b/test/parallel/test-http-zero-length-write.js @@ -32,7 +32,7 @@ function getSrc() { // The Readable class prevents this behavior. const src = new Stream(); - // start out paused, just so we don't miss anything yet. + // Start out paused, just so we don't miss anything yet. let paused = false; src.pause = function() { paused = true; diff --git a/test/parallel/test-http2-altsvc.js b/test/parallel/test-http2-altsvc.js index d4216e973df3ca..8b2e5b4690d429 100644 --- a/test/parallel/test-http2-altsvc.js +++ b/test/parallel/test-http2-altsvc.js @@ -88,7 +88,7 @@ server.on('session', common.mustCall((session) => { ); }); - // arguments + origin are too long for an ALTSVC frame + // Arguments + origin are too long for an ALTSVC frame assert.throws( () => { session.altsvc('h2=":8000"', diff --git a/test/parallel/test-http2-client-set-priority.js b/test/parallel/test-http2-client-set-priority.js index 64b7b56dfa2543..411b762be89f0f 100644 --- a/test/parallel/test-http2-client-set-priority.js +++ b/test/parallel/test-http2-client-set-priority.js @@ -36,9 +36,9 @@ checkWeight(1, 1); checkWeight(16, 16); checkWeight(256, 256); -// when client weight is higher than 256, weight is 256 +// When client weight is higher than 256, weight is 256 checkWeight(257, 256); checkWeight(512, 256); -// when client weight is undefined, weight is default 16 +// When client weight is undefined, weight is default 16 checkWeight(undefined, 16); diff --git a/test/parallel/test-http2-compat-expect-continue-check.js b/test/parallel/test-http2-compat-expect-continue-check.js index 4f2514a44a4f9e..0f38e6ae1ff542 100644 --- a/test/parallel/test-http2-compat-expect-continue-check.js +++ b/test/parallel/test-http2-compat-expect-continue-check.js @@ -20,7 +20,7 @@ server.on('checkContinue', common.mustCall((req, res) => { res.writeContinue(); res.writeHead(200, {}); res.end(testResBody); - // should simply return false if already too late to write + // Should simply return false if already too late to write assert.strictEqual(res.writeContinue(), false); res.on('finish', common.mustCall( () => process.nextTick(() => assert.strictEqual(res.writeContinue(), false)) diff --git a/test/parallel/test-http2-compat-serverrequest-pause.js b/test/parallel/test-http2-compat-serverrequest-pause.js index 9c81e8ff6140c7..2abc9e3da449f1 100644 --- a/test/parallel/test-http2-compat-serverrequest-pause.js +++ b/test/parallel/test-http2-compat-serverrequest-pause.js @@ -26,7 +26,7 @@ server.on('request', common.mustCall((req, res) => { res.end(); })); - // shouldn't throw if underlying Http2Stream no longer exists + // Shouldn't throw if underlying Http2Stream no longer exists res.on('finish', common.mustCall(() => process.nextTick(() => { req.pause(); req.resume(); diff --git a/test/parallel/test-http2-compat-serverrequest-pipe.js b/test/parallel/test-http2-compat-serverrequest-pipe.js index f5889073060b44..a02a64cdc0d1b8 100644 --- a/test/parallel/test-http2-compat-serverrequest-pipe.js +++ b/test/parallel/test-http2-compat-serverrequest-pipe.js @@ -9,7 +9,7 @@ const http2 = require('http2'); const fs = require('fs'); const path = require('path'); -// piping should work as expected with createWriteStream +// Piping should work as expected with createWriteStream const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); diff --git a/test/parallel/test-http2-compat-socket.js b/test/parallel/test-http2-compat-socket.js index 5b61f27bb2b828..162d3af96f505b 100644 --- a/test/parallel/test-http2-compat-socket.js +++ b/test/parallel/test-http2-compat-socket.js @@ -43,7 +43,7 @@ server.on('request', common.mustCall(function(request, response) { common.expectsError(() => request.socket.pause(), errMsg); common.expectsError(() => request.socket.resume(), errMsg); - // should have correct this context for socket methods & getters + // Should have correct this context for socket methods & getters assert.ok(request.socket.address() != null); assert.ok(request.socket.remotePort); @@ -66,7 +66,7 @@ server.on('request', common.mustCall(function(request, response) { assert.ok(request.socket._server); assert.strictEqual(request.socket.connecting, false); - // socket events are bound and emitted on Http2Stream + // Socket events are bound and emitted on Http2Stream request.socket.on('close', common.mustCall()); request.socket.once('close', common.mustCall()); request.socket.on('testEvent', common.mustCall()); diff --git a/test/parallel/test-http2-connect.js b/test/parallel/test-http2-connect.js index b93faf9d938380..6080dcb90e4c01 100644 --- a/test/parallel/test-http2-connect.js +++ b/test/parallel/test-http2-connect.js @@ -63,7 +63,7 @@ const { connect: netConnect } = require('net'); connect(authority).on('error', () => {}); } -// check for error for an invalid protocol (not http or https) +// Check for error for an invalid protocol (not http or https) { const authority = 'ssh://localhost'; expectsError(() => { diff --git a/test/parallel/test-http2-dont-override.js b/test/parallel/test-http2-dont-override.js index b45713deb3ca60..3f87e14be1ad51 100644 --- a/test/parallel/test-http2-dont-override.js +++ b/test/parallel/test-http2-dont-override.js @@ -10,7 +10,7 @@ const options = {}; const server = http2.createServer(options); -// options are defaulted but the options are not modified +// Options are defaulted but the options are not modified assert.deepStrictEqual(Object.keys(options), []); server.on('stream', common.mustCall((stream) => { diff --git a/test/parallel/test-http2-pipe.js b/test/parallel/test-http2-pipe.js index 2e564d3e329dbc..e081c6d6d7a5de 100644 --- a/test/parallel/test-http2-pipe.js +++ b/test/parallel/test-http2-pipe.js @@ -9,7 +9,7 @@ const http2 = require('http2'); const fs = require('fs'); const path = require('path'); -// piping should work as expected with createWriteStream +// Piping should work as expected with createWriteStream const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); diff --git a/test/parallel/test-http2-respond-file-304.js b/test/parallel/test-http2-respond-file-304.js index 536c48c624e73c..12136d65fa874a 100644 --- a/test/parallel/test-http2-respond-file-304.js +++ b/test/parallel/test-http2-respond-file-304.js @@ -20,7 +20,7 @@ server.on('stream', (stream) => { [HTTP2_HEADER_CONTENT_TYPE]: 'text/plain' }, { statCheck(stat, headers) { - // abort the send and return a 304 Not Modified instead + // Abort the send and return a 304 Not Modified instead stream.respond({ [HTTP2_HEADER_STATUS]: 304 }); return false; } diff --git a/test/parallel/test-http2-timeouts.js b/test/parallel/test-http2-timeouts.js index db5822776aea5e..de8311a1491da8 100644 --- a/test/parallel/test-http2-timeouts.js +++ b/test/parallel/test-http2-timeouts.js @@ -14,7 +14,7 @@ server.on('stream', common.mustCall((stream) => { stream.end('hello world'); })); - // check that expected errors are thrown with wrong args + // Check that expected errors are thrown with wrong args common.expectsError( () => stream.setTimeout('100'), { diff --git a/test/parallel/test-https-agent-create-connection.js b/test/parallel/test-https-agent-create-connection.js index 5dcf73cc76d6aa..c174f90d7df131 100644 --- a/test/parallel/test-https-agent-create-connection.js +++ b/test/parallel/test-https-agent-create-connection.js @@ -89,7 +89,7 @@ function createServer() { })); } -// use port and host and option does not have agentKey +// Use port and host and option does not have agentKey { const server = createServer(); server.listen(0, common.mustCall(() => { diff --git a/test/parallel/test-https-argument-of-creating.js b/test/parallel/test-https-argument-of-creating.js index 1154f968d792c3..c46dd204c51922 100644 --- a/test/parallel/test-https-argument-of-creating.js +++ b/test/parallel/test-https-argument-of-creating.js @@ -35,7 +35,7 @@ const dftProtocol = {}; } -// validate that `createServer` can work with no arguments +// Validate that `createServer` can work with no arguments { const server = https.createServer(); diff --git a/test/parallel/test-https-client-get-url.js b/test/parallel/test-https-client-get-url.js index 5d520416fe22da..76328775e80187 100644 --- a/test/parallel/test-https-client-get-url.js +++ b/test/parallel/test-https-client-get-url.js @@ -25,7 +25,7 @@ const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); -// disable strict server certificate validation by the client +// Disable strict server certificate validation by the client process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; const assert = require('assert'); diff --git a/test/parallel/test-https-slow-headers.js b/test/parallel/test-https-slow-headers.js index 2a55850b5de847..531d9ad318fa03 100644 --- a/test/parallel/test-https-slow-headers.js +++ b/test/parallel/test-https-slow-headers.js @@ -30,7 +30,7 @@ let sendCharEvery = 1000; // 40 seconds is the default assert.strictEqual(server.headersTimeout, 40 * 1000); -// pass a REAL env variable to shortening up the default +// Pass a REAL env variable to shortening up the default // value which is 40s otherwise // this is useful for manual testing if (!process.env.REAL) { diff --git a/test/parallel/test-https-strict.js b/test/parallel/test-https-strict.js index 0e8f725a5db2ac..6c1d6325eac176 100644 --- a/test/parallel/test-https-strict.js +++ b/test/parallel/test-https-strict.js @@ -25,7 +25,7 @@ const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); -// disable strict server certificate validation by the client +// Disable strict server certificate validation by the client process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; common.expectWarning( diff --git a/test/parallel/test-https-truncate.js b/test/parallel/test-https-truncate.js index 1a14cf54088a30..beed36cd7c0819 100644 --- a/test/parallel/test-https-truncate.js +++ b/test/parallel/test-https-truncate.js @@ -32,7 +32,7 @@ const https = require('https'); const key = fixtures.readKey('agent1-key.pem'); const cert = fixtures.readKey('agent1-cert.pem'); -// number of bytes discovered empirically to trigger the bug +// Number of bytes discovered empirically to trigger the bug const data = Buffer.alloc(1024 * 32 + 1); httpsTest(); diff --git a/test/parallel/test-listen-fd-detached-inherit.js b/test/parallel/test-listen-fd-detached-inherit.js index e0fc25134cce93..9f672a9a557485 100644 --- a/test/parallel/test-listen-fd-detached-inherit.js +++ b/test/parallel/test-listen-fd-detached-inherit.js @@ -64,8 +64,8 @@ function test() { s += c.toString(); }); res.on('end', function() { - // kill the subprocess before we start doing asserts. - // it's really annoying when tests leave orphans! + // Kill the subprocess before we start doing asserts. + // It's really annoying when tests leave orphans! process.kill(child.pid, 'SIGKILL'); try { parent.kill(); diff --git a/test/parallel/test-listen-fd-detached.js b/test/parallel/test-listen-fd-detached.js index eec12132a1d6f2..d2fa7707193168 100644 --- a/test/parallel/test-listen-fd-detached.js +++ b/test/parallel/test-listen-fd-detached.js @@ -64,7 +64,7 @@ function test() { s += c.toString(); }); res.on('end', function() { - // kill the subprocess before we start doing asserts. + // Kill the subprocess before we start doing asserts. // it's really annoying when tests leave orphans! process.kill(child.pid, 'SIGKILL'); try { diff --git a/test/parallel/test-module-version.js b/test/parallel/test-module-version.js index 04f011bbfacd8e..61b84914e21677 100644 --- a/test/parallel/test-module-version.js +++ b/test/parallel/test-module-version.js @@ -5,6 +5,6 @@ const assert = require('assert'); // check for existence assert(process.config.variables.hasOwnProperty('node_module_version')); -// ensure that `node_module_version` is an Integer > 0 +// Ensure that `node_module_version` is an Integer > 0 assert(Number.isInteger(process.config.variables.node_module_version)); assert(process.config.variables.node_module_version > 0); diff --git a/test/parallel/test-net-connect-immediate-finish.js b/test/parallel/test-net-connect-immediate-finish.js index 27d988ab5af45f..29256ceb8d41cf 100644 --- a/test/parallel/test-net-connect-immediate-finish.js +++ b/test/parallel/test-net-connect-immediate-finish.js @@ -38,7 +38,7 @@ const { const client = net.connect({ host: addresses.INVALID_HOST, - port: 80, // port number doesn't matter because host name is invalid + port: 80, // Port number doesn't matter because host name is invalid lookup: common.mustCall(errorLookupMock()) }, common.mustNotCall()); diff --git a/test/parallel/test-net-connect-options-allowhalfopen.js b/test/parallel/test-net-connect-options-allowhalfopen.js index 509b33ec4c33a8..ed615dcf2c4919 100644 --- a/test/parallel/test-net-connect-options-allowhalfopen.js +++ b/test/parallel/test-net-connect-options-allowhalfopen.js @@ -67,7 +67,7 @@ const net = require('net'); client.resume(); client.on('end', common.mustCall(function clientOnEnd() { setTimeout(function closeServer() { - // when allowHalfOpen is true, client must still be writable + // When allowHalfOpen is true, client must still be writable // after the server closes the connections, but not readable console.log(`client ${index} received FIN`); assert(!client.readable); diff --git a/test/parallel/test-net-timeout-no-handle.js b/test/parallel/test-net-timeout-no-handle.js index 539f661cae8414..b6baf891af264a 100644 --- a/test/parallel/test-net-timeout-no-handle.js +++ b/test/parallel/test-net-timeout-no-handle.js @@ -13,5 +13,5 @@ socket.on('timeout', common.mustCall(() => { socket.on('connect', common.mustNotCall()); -// since the timeout is unrefed, the code will exit without this +// Since the timeout is unrefed, the code will exit without this setTimeout(() => {}, common.platformTimeout(200)); diff --git a/test/parallel/test-next-tick-intentional-starvation.js b/test/parallel/test-next-tick-intentional-starvation.js index 26d07e02eaa27f..ed357cb233287f 100644 --- a/test/parallel/test-next-tick-intentional-starvation.js +++ b/test/parallel/test-next-tick-intentional-starvation.js @@ -23,7 +23,7 @@ require('../common'); const assert = require('assert'); -// this is the inverse of test-next-tick-starvation. it verifies +// This is the inverse of test-next-tick-starvation. it verifies // that process.nextTick will *always* come before other events let ran = false; diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index ca10665b26ffc1..9672e82c7f9194 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -48,7 +48,7 @@ typeErrorTests.forEach((test) => { fail(namespace.basename, test); fail(namespace.extname, test); - // undefined is a valid value as the second argument to basename + // Undefined is a valid value as the second argument to basename if (test !== undefined) { fail(namespace.basename, 'foo', test); } diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js index 8a2b56666d6bf0..71c282b9fbfaea 100644 --- a/test/parallel/test-preload.js +++ b/test/parallel/test-preload.js @@ -100,7 +100,7 @@ replProc.on('close', function(code) { assert.strictEqual(replStdout, output); }); -// test that preload placement at other points in the cmdline +// Test that preload placement at other points in the cmdline // also test that duplicated preload only gets loaded once childProcess.exec( `"${nodeBinary}" ${preloadOption([fixtureA])}-e "console.log('hello');" ${ diff --git a/test/parallel/test-process-emitwarning.js b/test/parallel/test-process-emitwarning.js index e51d391a7bd1ea..bba41c56e2edcc 100644 --- a/test/parallel/test-process-emitwarning.js +++ b/test/parallel/test-process-emitwarning.js @@ -38,7 +38,7 @@ class CustomWarning extends Error { [testMsg, { type: testType, code: testCode }], [testMsg, { type: testType, code: testCode, detail: testDetail }], [new CustomWarning()], - // detail will be ignored for the following. No errors thrown + // Detail will be ignored for the following. No errors thrown [testMsg, { type: testType, code: testCode, detail: true }], [testMsg, { type: testType, code: testCode, detail: [] }], [testMsg, { type: testType, code: testCode, detail: null }], diff --git a/test/parallel/test-process-env-allowed-flags.js b/test/parallel/test-process-env-allowed-flags.js index b3d815f66de6da..00c44e869455f1 100644 --- a/test/parallel/test-process-env-allowed-flags.js +++ b/test/parallel/test-process-env-allowed-flags.js @@ -55,7 +55,7 @@ require('../common'); }); } -// assert immutability of process.allowedNodeEnvironmentFlags +// Assert immutability of process.allowedNodeEnvironmentFlags { assert.strictEqual(Object.isFrozen(process.allowedNodeEnvironmentFlags), true); diff --git a/test/parallel/test-process-env.js b/test/parallel/test-process-env.js index d146d5c616607a..e1be9c6e1bf3fb 100644 --- a/test/parallel/test-process-env.js +++ b/test/parallel/test-process-env.js @@ -24,7 +24,7 @@ const common = require('../common'); const assert = require('assert'); -// changes in environment should be visible to child processes +// Changes in environment should be visible to child processes if (process.argv[2] === 'you-are-the-child') { assert.strictEqual('NODE_PROCESS_ENV_DELETED' in process.env, false); assert.strictEqual(process.env.NODE_PROCESS_ENV, '42'); diff --git a/test/parallel/test-promises-unhandled-rejections.js b/test/parallel/test-promises-unhandled-rejections.js index 4464fad8e4b846..176bae8a73ed1a 100644 --- a/test/parallel/test-promises-unhandled-rejections.js +++ b/test/parallel/test-promises-unhandled-rejections.js @@ -286,7 +286,7 @@ asyncTest('While inside setImmediate, catching a rejected promise derived ' + onUnhandledFail(done); setImmediate(function() { - // reproduces on first tick and inside of setImmediate + // Reproduces on first tick and inside of setImmediate Promise .resolve('resolve') .then(function() { diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js index b5a4a599c3b59d..72594ce719182d 100644 --- a/test/parallel/test-querystring.js +++ b/test/parallel/test-querystring.js @@ -214,7 +214,7 @@ qsColonTestCases.forEach((testCase) => { check(qs.parse(testCase[0], ';', ':'), testCase[2], testCase[0]); }); -// test the weird objects, that they get parsed properly +// Test the weird objects, that they get parsed properly qsWeirdObjects.forEach((testCase) => { check(qs.parse(testCase[1]), testCase[2], testCase[1]); }); diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index 408d70e788095e..87547a9b6ac197 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -154,7 +154,7 @@ function isWarned(emitter) { rli.close(); } - // sending a single character with no newline and then a newline + // Sending a single character with no newline and then a newline { const fi = new FakeInput(); const rli = new readline.Interface( @@ -368,7 +368,7 @@ function isWarned(emitter) { }); } - // constructor throws if historySize is not a positive number + // Constructor throws if historySize is not a positive number { const fi = new FakeInput(); common.expectsError(function() { @@ -472,7 +472,7 @@ function isWarned(emitter) { rli.close(); } - // sending a multi-byte utf8 char over multiple writes + // Sending a multi-byte utf8 char over multiple writes { const buf = Buffer.from('☮', 'utf8'); const fi = new FakeInput(); diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index 9edebe90365939..69011e4af894f2 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -160,7 +160,7 @@ testMe.complete('inner.o', common.mustCall(function(error, data) { putIn.run(['.clear']); -// currently does not work, but should not break, not the { +// Currently does not work, but should not break, not the { putIn.run([ 'var top = function() {', 'r = function test ()', @@ -213,7 +213,7 @@ testMe.complete('toSt', common.mustCall(function(error, data) { assert.deepStrictEqual(data, [['toString'], 'toSt']); })); -// own properties should shadow properties on the prototype +// Own properties should shadow properties on the prototype putIn.run(['.clear']); putIn.run([ 'var x = Object.create(null);', diff --git a/test/parallel/test-repl-underscore.js b/test/parallel/test-repl-underscore.js index 7e7cabeda74433..d75a4069250771 100644 --- a/test/parallel/test-repl-underscore.js +++ b/test/parallel/test-repl-underscore.js @@ -149,7 +149,7 @@ function testResetContextGlobal() { '10', ]); - // delete globals leaked by REPL when `useGlobal` is `true` + // Delete globals leaked by REPL when `useGlobal` is `true` delete global.module; delete global.require; } diff --git a/test/parallel/test-repl-use-global.js b/test/parallel/test-repl-use-global.js index 947adc7f255035..00222608deca6f 100644 --- a/test/parallel/test-repl-use-global.js +++ b/test/parallel/test-repl-use-global.js @@ -50,7 +50,7 @@ const processTest = (useGlobal, cb, output) => (err, repl) => { let str = ''; output.on('data', (data) => (str += data)); - // if useGlobal is false, then `let process` should work + // If useGlobal is false, then `let process` should work repl.write('let process;\n'); repl.write('21 * 2;\n'); repl.close(); diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 98f47a03aaf008..91be2521aeb796 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -53,7 +53,7 @@ async function runReplTests(socket, prompt, tests) { socket.write(`${send}\n`); for (let expectedLine of expectedLines) { - // special value: kSource refers to last sent source text + // Special value: kSource refers to last sent source text if (expectedLine === kSource) expectedLine = send; @@ -233,7 +233,7 @@ const errorTests = [ send: 'new RegExp("foo", "wrong modifier");', expect: [/^SyntaxError: /, ''] }, - // strict mode syntax errors should be caught (GH-5178) + // Strict mode syntax errors should be caught (GH-5178) { send: '(function() { "use strict"; return 0755; })()', expect: [ @@ -403,7 +403,7 @@ const errorTests = [ '' ] }, - // do not fail when a String is created with line continuation + // Do not fail when a String is created with line continuation { send: '\'the\\\nfourth\\\neye\'', expect: ['... ... \'thefourtheye\''] @@ -416,7 +416,7 @@ const errorTests = [ send: ' \t .break \t ', expect: '' }, - // multiline strings preserve whitespace characters in them + // Multiline strings preserve whitespace characters in them { send: '\'the \\\n fourth\t\t\\\n eye \'', expect: '... ... \'the fourth\\t\\t eye \'' diff --git a/test/parallel/test-setproctitle.js b/test/parallel/test-setproctitle.js index e5f6858f786ba3..2ed0730eec1c80 100644 --- a/test/parallel/test-setproctitle.js +++ b/test/parallel/test-setproctitle.js @@ -35,7 +35,7 @@ exec(cmd, common.mustCall((error, stdout, stderr) => { assert.ifError(error); assert.strictEqual(stderr, ''); - // freebsd always add ' (procname)' to the process title + // Freebsd always add ' (procname)' to the process title if (common.isFreeBSD || common.isOpenBSD) title += ` (${path.basename(process.execPath)})`; diff --git a/test/parallel/test-stdio-pipe-stderr.js b/test/parallel/test-stdio-pipe-stderr.js index 06e93429d03f6d..9dc5c758cf6c50 100644 --- a/test/parallel/test-stdio-pipe-stderr.js +++ b/test/parallel/test-stdio-pipe-stderr.js @@ -13,10 +13,10 @@ const spawn = require('child_process').spawnSync; tmpdir.refresh(); const fakeModulePath = join(tmpdir.path, 'batman.js'); const stderrOutputPath = join(tmpdir.path, 'stderr-output.txt'); -// we need to redirect stderr to a file to produce #11257 +// We need to redirect stderr to a file to produce #11257 const stream = fs.createWriteStream(stderrOutputPath); -// the error described in #11257 only happens when we require a +// The error described in #11257 only happens when we require a // non-built-in module. fs.writeFileSync(fakeModulePath, '', 'utf8'); diff --git a/test/parallel/test-stream-big-push.js b/test/parallel/test-stream-big-push.js index 2369fac09aae2a..5eabd4837e6b7c 100644 --- a/test/parallel/test-stream-big-push.js +++ b/test/parallel/test-stream-big-push.js @@ -62,7 +62,7 @@ chunk = r.read(); assert.strictEqual(chunk, null); r.once('readable', () => { - // this time, we'll get *all* the remaining data, because + // This time, we'll get *all* the remaining data, because // it's been added synchronously, as the read WOULD take // us below the hwm, and so it triggered a _read() again, // which synchronously added more, which we then return. diff --git a/test/parallel/test-stream-duplex-destroy.js b/test/parallel/test-stream-duplex-destroy.js index 854d29ffc13049..518998fd182607 100644 --- a/test/parallel/test-stream-duplex-destroy.js +++ b/test/parallel/test-stream-duplex-destroy.js @@ -177,7 +177,7 @@ const { inherits } = require('util'); duplex.destroyed = true; assert.strictEqual(duplex.destroyed, true); - // the internal destroy() mechanism should not be triggered + // The internal destroy() mechanism should not be triggered duplex.on('finish', common.mustNotCall()); duplex.on('end', common.mustNotCall()); duplex.destroy(); diff --git a/test/parallel/test-stream-pipe-after-end.js b/test/parallel/test-stream-pipe-after-end.js index d0d0a19bd6074a..2eb714b2ca7d3e 100644 --- a/test/parallel/test-stream-pipe-after-end.js +++ b/test/parallel/test-stream-pipe-after-end.js @@ -51,10 +51,10 @@ class TestWritable extends Writable { } } -// this one should not emit 'end' until we read() from it later. +// This one should not emit 'end' until we read() from it later. const ender = new TestReadable(); -// what happens when you pipe() a Readable that's already ended? +// What happens when you pipe() a Readable that's already ended? const piper = new TestReadable(); // pushes EOF null, and length=0, so this will trigger 'end' piper.read(); diff --git a/test/parallel/test-stream-readable-async-iterators.js b/test/parallel/test-stream-readable-async-iterators.js index 13da0d9c4514af..99b40d368f8c33 100644 --- a/test/parallel/test-stream-readable-async-iterators.js +++ b/test/parallel/test-stream-readable-async-iterators.js @@ -460,5 +460,5 @@ async function tests() { } } -// to avoid missing some tests if a promise does not resolve +// To avoid missing some tests if a promise does not resolve tests().then(common.mustCall()); diff --git a/test/parallel/test-stream-readable-destroy.js b/test/parallel/test-stream-readable-destroy.js index a1407192e495c7..3354a8755ec957 100644 --- a/test/parallel/test-stream-readable-destroy.js +++ b/test/parallel/test-stream-readable-destroy.js @@ -148,7 +148,7 @@ const { inherits } = require('util'); read.destroyed = true; assert.strictEqual(read.destroyed, true); - // the internal destroy() mechanism should not be triggered + // The internal destroy() mechanism should not be triggered read.on('end', common.mustNotCall()); read.destroy(); } diff --git a/test/parallel/test-stream-readable-event.js b/test/parallel/test-stream-readable-event.js index 06fac7dc8bd125..73ca80400ab289 100644 --- a/test/parallel/test-stream-readable-event.js +++ b/test/parallel/test-stream-readable-event.js @@ -45,7 +45,7 @@ const Readable = require('stream').Readable; } { - // second test, make sure that readable is re-emitted if there's + // Second test, make sure that readable is re-emitted if there's // already a length, while it IS reading. const r = new Readable({ diff --git a/test/parallel/test-stream-readable-flow-recursion.js b/test/parallel/test-stream-readable-flow-recursion.js index 43b8103eb6b61e..6cc1ce65b1426e 100644 --- a/test/parallel/test-stream-readable-flow-recursion.js +++ b/test/parallel/test-stream-readable-flow-recursion.js @@ -23,7 +23,7 @@ require('../common'); const assert = require('assert'); -// this test verifies that passing a huge number to read(size) +// This test verifies that passing a huge number to read(size) // will push up the highWaterMark, and cause the stream to read // more data continuously, but without triggering a nextTick // warning or RangeError. @@ -69,7 +69,7 @@ process.on('exit', function(code) { assert.strictEqual(reads, 2); // we pushed up the high water mark assert.strictEqual(stream.readableHighWaterMark, 8192); - // length is 0 right now, because we pulled it all out. + // Length is 0 right now, because we pulled it all out. assert.strictEqual(stream.readableLength, 0); assert(!code); assert.strictEqual(depth, 0); diff --git a/test/parallel/test-stream-readable-hwm-0.js b/test/parallel/test-stream-readable-hwm-0.js index b66782b7713765..5bb17882db9714 100644 --- a/test/parallel/test-stream-readable-hwm-0.js +++ b/test/parallel/test-stream-readable-hwm-0.js @@ -10,7 +10,7 @@ const assert = require('assert'); const { Readable } = require('stream'); const r = new Readable({ - // must be called only once upon setting 'readable' listener + // Must be called only once upon setting 'readable' listener read: common.mustCall(), highWaterMark: 0, }); diff --git a/test/parallel/test-stream-readable-reading-readingMore.js b/test/parallel/test-stream-readable-reading-readingMore.js index 74468ed68afc8e..5ea91dfa8bad32 100644 --- a/test/parallel/test-stream-readable-reading-readingMore.js +++ b/test/parallel/test-stream-readable-reading-readingMore.js @@ -15,7 +15,7 @@ const Readable = require('stream').Readable; assert.strictEqual(state.readingMore, false); readable.on('data', common.mustCall((data) => { - // while in a flowing state with a 'readable' listener + // While in a flowing state with a 'readable' listener // we should not be reading more if (readable.readableFlowing) assert.strictEqual(state.readingMore, true); @@ -33,7 +33,7 @@ const Readable = require('stream').Readable; const expectedReadingMore = [true, false]; readable.on('readable', common.mustCall(() => { - // there is only one readingMore scheduled from on('data'), + // There is only one readingMore scheduled from on('data'), // after which everything is governed by the .read() call assert.strictEqual(state.readingMore, expectedReadingMore.shift()); @@ -73,7 +73,7 @@ const Readable = require('stream').Readable; assert.strictEqual(state.readingMore, false); readable.on('data', common.mustCall((data) => { - // while in a flowing state without a 'readable' listener + // While in a flowing state without a 'readable' listener // we should be reading more if (readable.readableFlowing) assert.strictEqual(state.readingMore, true); @@ -146,7 +146,7 @@ const Readable = require('stream').Readable; // We are still not flowing, we will be resuming in the next tick assert.strictEqual(state.flowing, false); - // wait for nextTick, so the readableListener flag resets + // Wait for nextTick, so the readableListener flag resets process.nextTick(function() { readable.resume(); diff --git a/test/parallel/test-stream-readable-resumeScheduled.js b/test/parallel/test-stream-readable-resumeScheduled.js index 6d1bc913388f46..aa521629b659af 100644 --- a/test/parallel/test-stream-readable-resumeScheduled.js +++ b/test/parallel/test-stream-readable-resumeScheduled.js @@ -14,7 +14,7 @@ const { Readable, Writable } = require('stream'); // resumeScheduled should start = `false`. assert.strictEqual(r._readableState.resumeScheduled, false); - // calling pipe() should change the state value = true. + // Calling pipe() should change the state value = true. r.pipe(w); assert.strictEqual(r._readableState.resumeScheduled, true); @@ -32,7 +32,7 @@ const { Readable, Writable } = require('stream'); r.push(Buffer.from([1, 2, 3])); - // adding 'data' listener should change the state value + // Adding 'data' listener should change the state value r.on('data', common.mustCall(() => { assert.strictEqual(r._readableState.resumeScheduled, false); })); diff --git a/test/parallel/test-stream-unshift-empty-chunk.js b/test/parallel/test-stream-unshift-empty-chunk.js index 0f0a13722cab14..dbcafbfdcb7ad2 100644 --- a/test/parallel/test-stream-unshift-empty-chunk.js +++ b/test/parallel/test-stream-unshift-empty-chunk.js @@ -43,7 +43,7 @@ r.on('readable', () => { let chunk; while (chunk = r.read()) { seen.push(chunk.toString()); - // simulate only reading a certain amount of the data, + // Simulate only reading a certain amount of the data, // and then putting the rest of the chunk back into the // stream, like a parser might do. We just fill it with // 'y' so that it's easy to see which bits were touched, diff --git a/test/parallel/test-stream-writable-destroy.js b/test/parallel/test-stream-writable-destroy.js index a88bf9ab2424e7..83c941f4599cab 100644 --- a/test/parallel/test-stream-writable-destroy.js +++ b/test/parallel/test-stream-writable-destroy.js @@ -161,7 +161,7 @@ const { inherits } = require('util'); write.destroyed = true; assert.strictEqual(write.destroyed, true); - // the internal destroy() mechanism should not be triggered + // The internal destroy() mechanism should not be triggered write.on('close', common.mustNotCall()); write.destroy(); } diff --git a/test/parallel/test-stream-writable-write-writev-finish.js b/test/parallel/test-stream-writable-write-writev-finish.js index 98660b76ac8ea6..4399f1ca503b37 100644 --- a/test/parallel/test-stream-writable-write-writev-finish.js +++ b/test/parallel/test-stream-writable-write-writev-finish.js @@ -4,7 +4,7 @@ const common = require('../common'); const assert = require('assert'); const stream = require('stream'); -// ensure consistency between the finish event when using cork() +// Ensure consistency between the finish event when using cork() // and writev and when not using them { diff --git a/test/parallel/test-stream2-basic.js b/test/parallel/test-stream2-basic.js index f1e4fb02b4436c..682a033899d3df 100644 --- a/test/parallel/test-stream2-basic.js +++ b/test/parallel/test-stream2-basic.js @@ -151,7 +151,7 @@ class TestWriter extends EE { // Verify unpipe const r = new TestReader(5); - // unpipe after 3 writes, then write to another stream instead. + // Unpipe after 3 writes, then write to another stream instead. let expect = [ 'xxxxx', 'xxxxx', 'xxxxx', @@ -227,7 +227,7 @@ class TestWriter extends EE { // Verify multi-unpipe const r = new TestReader(5); - // unpipe after 3 writes, then write to another stream instead. + // Unpipe after 3 writes, then write to another stream instead. let expect = [ 'xxxxx', 'xxxxx', 'xxxxx', diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js index 8484e8ddb74603..a1bad84a8f55c8 100644 --- a/test/parallel/test-stream2-transform.js +++ b/test/parallel/test-stream2-transform.js @@ -210,7 +210,7 @@ const Transform = require('_stream_transform'); // Verify asymmetric transform (compress) const pt = new Transform(); - // each output is the first char of 3 consecutive chunks, + // Each output is the first char of 3 consecutive chunks, // or whatever's left. pt.state = ''; @@ -259,7 +259,7 @@ const Transform = require('_stream_transform'); })); } -// this tests for a stall when data is written to a full stream +// This tests for a stall when data is written to a full stream // that has empty transforms. { // Verify complex transform behavior diff --git a/test/parallel/test-stream3-cork-end.js b/test/parallel/test-stream3-cork-end.js index fb109e6bb8c942..e046d46368a4f9 100644 --- a/test/parallel/test-stream3-cork-end.js +++ b/test/parallel/test-stream3-cork-end.js @@ -19,7 +19,7 @@ let seenEnd = false; const w = new Writable(); // lets arrange to store the chunks w._write = function(chunk, encoding, cb) { - // stream end event is not seen before the last write + // Stream end event is not seen before the last write assert.ok(!seenEnd); // default encoding given none was specified assert.strictEqual(encoding, 'buffer'); diff --git a/test/parallel/test-stream3-pause-then-read.js b/test/parallel/test-stream3-pause-then-read.js index 5de8d8ec512c2b..d514c89e013327 100644 --- a/test/parallel/test-stream3-pause-then-read.js +++ b/test/parallel/test-stream3-pause-then-read.js @@ -137,7 +137,7 @@ function read1234() { function resumePause() { console.error('resumePause'); - // don't read anything, just resume and re-pause a whole bunch + // Don't read anything, just resume and re-pause a whole bunch r.resume(); r.pause(); r.resume(); diff --git a/test/parallel/test-stringbytes-external.js b/test/parallel/test-stringbytes-external.js index 2a04159ce9db3c..f05b40a3ef4f72 100644 --- a/test/parallel/test-stringbytes-external.js +++ b/test/parallel/test-stringbytes-external.js @@ -22,10 +22,10 @@ 'use strict'; require('../common'); const assert = require('assert'); -// minimum string size to overflow into external string space +// Minimum string size to overflow into external string space const EXTERN_APEX = 0xFBEE9; -// manually controlled string for checking binary output +// Manually controlled string for checking binary output let ucs2_control = 'a\u0000'; let write_str = 'a'; @@ -56,7 +56,7 @@ for (let i = 0; i < b.length; i += 2) { assert.strictEqual(b[i + 1], 0); } -// create another string to create an external string +// Create another string to create an external string const b_ucs = b.toString('ucs2'); // check control against external binary string diff --git a/test/parallel/test-timers-immediate-unref.js b/test/parallel/test-timers-immediate-unref.js index ecb26682c1e1bb..5a7629781d54f5 100644 --- a/test/parallel/test-timers-immediate-unref.js +++ b/test/parallel/test-timers-immediate-unref.js @@ -29,7 +29,7 @@ function secondStep() { const immA = setImmediate(() => { clearImmediate(immA); clearImmediate(immB); - // this should not keep the event loop open indefinitely + // This should not keep the event loop open indefinitely // or do anything else weird immA.ref(); immB.ref(); diff --git a/test/parallel/test-timers-reset-process-domain-on-throw.js b/test/parallel/test-timers-reset-process-domain-on-throw.js index 946ae715b0e193..55fd43feb81523 100644 --- a/test/parallel/test-timers-reset-process-domain-on-throw.js +++ b/test/parallel/test-timers-reset-process-domain-on-throw.js @@ -21,7 +21,7 @@ function err() { d.run(err2); function err2() { - // this function doesn't exist, and throws an error as a result. + // This function doesn't exist, and throws an error as a result. err3(); // eslint-disable-line no-undef } diff --git a/test/parallel/test-timers.js b/test/parallel/test-timers.js index 1aa5d351a4d4bd..e29d756cfebd08 100644 --- a/test/parallel/test-timers.js +++ b/test/parallel/test-timers.js @@ -47,7 +47,7 @@ const inputs = [ 0.5, 1, 1.0, - 2147483648, // browser behavior: timeouts > 2^31-1 run on next tick + 2147483648, // Browser behavior: timeouts > 2^31-1 run on next tick 12345678901234 // ditto ]; diff --git a/test/parallel/test-tls-client-mindhsize.js b/test/parallel/test-tls-client-mindhsize.js index 3017d30e6c5e9e..a6fbc67bd88361 100644 --- a/test/parallel/test-tls-client-mindhsize.js +++ b/test/parallel/test-tls-client-mindhsize.js @@ -35,7 +35,7 @@ function test(size, err, next) { }); server.listen(0, '127.0.0.1', function() { - // client set minimum DH parameter size to 2048 bits so that + // Client set minimum DH parameter size to 2048 bits so that // it fails when it make a connection to the tls server where // dhparams is 1024 bits const client = tls.connect({ diff --git a/test/parallel/test-tls-socket-close.js b/test/parallel/test-tls-socket-close.js index debaca213bb0e2..3b2e18184b408e 100644 --- a/test/parallel/test-tls-socket-close.js +++ b/test/parallel/test-tls-socket-close.js @@ -44,7 +44,7 @@ function connectClient(server) { assert(netSocket); netSocket.setTimeout(1, common.mustCall(() => { assert(tlsSocket); - // this breaks if TLSSocket is already managing the socket: + // This breaks if TLSSocket is already managing the socket: netSocket.destroy(); const interval = setInterval(() => { // Checking this way allows us to do the write at a time that causes a diff --git a/test/parallel/test-url-format.js b/test/parallel/test-url-format.js index 571895832a3ffb..d18ff6715b3ed0 100644 --- a/test/parallel/test-url-format.js +++ b/test/parallel/test-url-format.js @@ -216,7 +216,7 @@ const formatTests = { pathname: '/' }, - // more than 255 characters in hostname which exceeds the limit + // More than 255 characters in hostname which exceeds the limit [`http://${'a'.repeat(255)}.com/node`]: { href: 'http:///node', protocol: 'http:', @@ -227,7 +227,7 @@ const formatTests = { path: '/node' }, - // greater than or equal to 63 characters after `.` in hostname + // Greater than or equal to 63 characters after `.` in hostname [`http://www.${'z'.repeat(63)}example.com/node`]: { href: `http://www.${'z'.repeat(63)}example.com/node`, protocol: 'http:', diff --git a/test/parallel/test-url-parse-format.js b/test/parallel/test-url-parse-format.js index b18a5fe585d0a3..cbe8eea25740f2 100644 --- a/test/parallel/test-url-parse-format.js +++ b/test/parallel/test-url-parse-format.js @@ -194,7 +194,7 @@ const parseTests = { path: ';a/b/c?d=e' }, - // make sure that we don't accidentally lcast the path parts. + // Make sure that we don't accidentally lcast the path parts. 'HtTp://x.y.cOm;A/b/c?d=e#f gi': { href: 'http://x.y.com/;A/b/c?d=e#f%20g%3Ch%3Ei', protocol: 'http:', diff --git a/test/parallel/test-v8-coverage.js b/test/parallel/test-v8-coverage.js index 69a8286eed886d..75a6aa03fd8761 100644 --- a/test/parallel/test-v8-coverage.js +++ b/test/parallel/test-v8-coverage.js @@ -31,7 +31,7 @@ function nextdir() { assert.strictEqual(fixtureCoverage.functions[1].ranges[1].count, 0); } -// outputs coverage when process.exit(1) exits process. +// Outputs coverage when process.exit(1) exits process. { const coverageDirectory = path.join(tmpdir.path, nextdir()); const output = spawnSync(process.execPath, [ @@ -96,7 +96,7 @@ function nextdir() { assert.strictEqual(fixtureCoverage.functions[2].ranges[1].count, 0); } -// does not output coverage if NODE_V8_COVERAGE is empty. +// Does not output coverage if NODE_V8_COVERAGE is empty. { const coverageDirectory = path.join(tmpdir.path, nextdir()); const output = spawnSync(process.execPath, [ @@ -122,7 +122,7 @@ function nextdir() { assert.strictEqual(fixtureCoverage.functions[1].ranges[0].count, 1); } -// extracts the coverage object for a given fixture name. +// Extracts the coverage object for a given fixture name. function getFixtureCoverage(fixtureFile, coverageDirectory) { const coverageFiles = fs.readdirSync(coverageDirectory); for (const coverageFile of coverageFiles) { diff --git a/test/parallel/test-whatwg-url-custom-properties.js b/test/parallel/test-whatwg-url-custom-properties.js index 4a35215bc4ac96..035cc1eae263ff 100644 --- a/test/parallel/test-whatwg-url-custom-properties.js +++ b/test/parallel/test-whatwg-url-custom-properties.js @@ -28,7 +28,7 @@ const expected = ['toString', assert.deepStrictEqual(props, expected); -// href is writable (not readonly) and is stringifier +// `href` is writable (not readonly) and is stringifier assert.strictEqual(url.toString(), url.href); url.href = 'http://user:pass@foo.bar.com:21/aaa/zzz?l=25#test'; assert.strictEqual(url.href, diff --git a/test/parallel/test-worker-uncaught-exception-async.js b/test/parallel/test-worker-uncaught-exception-async.js index 862b1a66d619c3..9ad4aace23e390 100644 --- a/test/parallel/test-worker-uncaught-exception-async.js +++ b/test/parallel/test-worker-uncaught-exception-async.js @@ -18,7 +18,7 @@ if (!process.env.HAS_STARTED_WORKER) { assert.strictEqual(code, 1); })); } else { - // cannot use common.mustCall as it cannot catch this + // Cannot use common.mustCall as it cannot catch this let called = false; process.on('exit', (code) => { if (!called) { diff --git a/test/parallel/test-worker-uncaught-exception.js b/test/parallel/test-worker-uncaught-exception.js index 95c142b6c70d64..40996eccb39a4a 100644 --- a/test/parallel/test-worker-uncaught-exception.js +++ b/test/parallel/test-worker-uncaught-exception.js @@ -18,7 +18,7 @@ if (!process.env.HAS_STARTED_WORKER) { assert.strictEqual(code, 1); })); } else { - // cannot use common.mustCall as it cannot catch this + // Cannot use common.mustCall as it cannot catch this let called = false; process.on('exit', (code) => { if (!called) { diff --git a/test/parallel/test-zlib-convenience-methods.js b/test/parallel/test-zlib-convenience-methods.js index 1cc393914a947e..8bdbe2341016e0 100644 --- a/test/parallel/test-zlib-convenience-methods.js +++ b/test/parallel/test-zlib-convenience-methods.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -// test convenience methods with and without options supplied +// Test convenience methods with and without options supplied const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-zlib-destroy-pipe.js b/test/parallel/test-zlib-destroy-pipe.js index 38b8a5b4926e51..67821a21b67b01 100644 --- a/test/parallel/test-zlib-destroy-pipe.js +++ b/test/parallel/test-zlib-destroy-pipe.js @@ -4,7 +4,7 @@ const common = require('../common'); const zlib = require('zlib'); const { Writable } = require('stream'); -// verify that the zlib transform does not error in case +// Verify that the zlib transform does not error in case // it is destroyed with data still in flight const ts = zlib.createGzip(); diff --git a/test/parallel/test-zlib-flush-drain.js b/test/parallel/test-zlib-flush-drain.js index a470e32090f084..ac89e990c3fcda 100644 --- a/test/parallel/test-zlib-flush-drain.js +++ b/test/parallel/test-zlib-flush-drain.js @@ -12,7 +12,7 @@ const opts = { const deflater = zlib.createDeflate(opts); -// shim deflater.flush so we can count times executed +// Shim deflater.flush so we can count times executed let flushCount = 0; let drainCount = 0; diff --git a/test/parallel/test-zlib-from-concatenated-gzip.js b/test/parallel/test-zlib-from-concatenated-gzip.js index fea8ab6de2870a..45f8281387ceb4 100644 --- a/test/parallel/test-zlib-from-concatenated-gzip.js +++ b/test/parallel/test-zlib-from-concatenated-gzip.js @@ -76,7 +76,7 @@ fs.createReadStream(pmmFileGz) ); })); - // first write: write "abc" + the first bytes of "def" + // First write: write "abc" + the first bytes of "def" unzip.write(Buffer.concat([ abcEncoded, defEncoded.slice(0, offset) ])); diff --git a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js index c9eeb29f937c06..f7b09f7ec03fca 100644 --- a/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js +++ b/test/parallel/test-zlib-from-gzip-with-trailing-garbage.js @@ -1,5 +1,5 @@ 'use strict'; -// test unzipping a gzip file that has trailing garbage +// Test unzipping a gzip file that has trailing garbage const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-zlib-from-string.js b/test/parallel/test-zlib-from-string.js index 617a8b55056ebd..fa96623536d279 100644 --- a/test/parallel/test-zlib-from-string.js +++ b/test/parallel/test-zlib-from-string.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -// test compressing and uncompressing a string with zlib +// Test compressing and uncompressing a string with zlib const common = require('../common'); const assert = require('assert'); diff --git a/test/parallel/test-zlib-truncated.js b/test/parallel/test-zlib-truncated.js index e04ef7e3d8367a..d8a04d3c0cc0cf 100644 --- a/test/parallel/test-zlib-truncated.js +++ b/test/parallel/test-zlib-truncated.js @@ -1,5 +1,5 @@ 'use strict'; -// tests zlib streams with truncated compressed input +// Tests zlib streams with truncated compressed input require('../common'); const assert = require('assert'); @@ -50,11 +50,11 @@ const errMessage = /unexpected end of file/; const syncFlushOpt = { finishFlush: zlib.constants.Z_SYNC_FLUSH }; - // sync truncated input test, finishFlush = Z_SYNC_FLUSH + // Sync truncated input test, finishFlush = Z_SYNC_FLUSH const result = toUTF8(zlib[methods.decompSync](truncated, syncFlushOpt)); assert.strictEqual(result, inputString.substr(0, result.length)); - // async truncated input test, finishFlush = Z_SYNC_FLUSH + // Async truncated input test, finishFlush = Z_SYNC_FLUSH zlib[methods.decomp](truncated, syncFlushOpt, function(err, decompressed) { assert.ifError(err); const result = toUTF8(decompressed); diff --git a/test/parallel/test-zlib-write-after-flush.js b/test/parallel/test-zlib-write-after-flush.js index 6d8d787343426f..e8d683039fc065 100644 --- a/test/parallel/test-zlib-write-after-flush.js +++ b/test/parallel/test-zlib-write-after-flush.js @@ -38,7 +38,7 @@ gunz.on('end', common.mustCall(() => { assert.strictEqual(gzip._nextFlush, -1); })); -// make sure that flush/write doesn't trigger an assert failure +// Make sure that flush/write doesn't trigger an assert failure gzip.flush(); gzip.write(input); gzip.end(); diff --git a/test/parallel/test-zlib.js b/test/parallel/test-zlib.js index 1b6855a0b92062..66214602cd1402 100644 --- a/test/parallel/test-zlib.js +++ b/test/parallel/test-zlib.js @@ -49,7 +49,7 @@ let windowBits = [8, 9, 10, 11, 12, 13, 14, 15]; let memLevel = [1, 2, 3, 4, 5, 6, 7, 8, 9]; let strategy = [0, 1, 2, 3, 4]; -// it's nice in theory to test every combination, but it +// It's nice in theory to test every combination, but it // takes WAY too long. Maybe a pummel test could do this? if (!process.env.PUMMEL) { trickle = [1024]; @@ -173,7 +173,7 @@ zlib.createDeflateRaw({ windowBits: 8 }); () => assert(Buffer.concat(raw).equals(Buffer.concat(reinflated))))); } -// for each of the files, make sure that compressing and +// For each of the files, make sure that compressing and // decompressing results in the same data, for every combination // of the options set above. @@ -196,7 +196,7 @@ testKeys.forEach(common.mustCall((file) => { const ss = new SlowStream(trickle); const buf = new BufferStream(); - // verify that the same exact buffer comes out the other end. + // Verify that the same exact buffer comes out the other end. buf.on('data', common.mustCall((c) => { const msg = `${file} ${chunkSize} ${ JSON.stringify(opts)} ${Def.name} -> ${Inf.name}`; diff --git a/test/pseudo-tty/test-async-wrap-getasyncid-tty.js b/test/pseudo-tty/test-async-wrap-getasyncid-tty.js index 80ffe9e7cce303..5995a911811089 100644 --- a/test/pseudo-tty/test-async-wrap-getasyncid-tty.js +++ b/test/pseudo-tty/test-async-wrap-getasyncid-tty.js @@ -1,7 +1,7 @@ // Flags: --expose-internals --no-warnings 'use strict'; -// see also test/sequential/test-async-wrap-getasyncid.js +// See also test/sequential/test-async-wrap-getasyncid.js const common = require('../common'); const assert = require('assert'); diff --git a/test/pseudo-tty/test-handle-wrap-isrefed-tty.js b/test/pseudo-tty/test-handle-wrap-isrefed-tty.js index ca2f1132d093d8..aa6ae341b4b231 100644 --- a/test/pseudo-tty/test-handle-wrap-isrefed-tty.js +++ b/test/pseudo-tty/test-handle-wrap-isrefed-tty.js @@ -1,7 +1,7 @@ // Flags: --expose-internals --no-warnings 'use strict'; -// see also test/parallel/test-handle-wrap-isrefed.js +// See also test/parallel/test-handle-wrap-isrefed.js const common = require('../common'); const strictEqual = require('assert').strictEqual; diff --git a/test/pummel/test-exec.js b/test/pummel/test-exec.js index 7d631f87f2f74a..64c94aae5a8666 100644 --- a/test/pummel/test-exec.js +++ b/test/pummel/test-exec.js @@ -95,7 +95,7 @@ const killMeTwice = exec(SLEEP3_COMMAND, { timeout: 1000 }, process.nextTick(function() { console.log(`kill pid ${killMeTwice.pid}`); - // make sure there is no race condition in starting the process + // Make sure there is no race condition in starting the process // the PID SHOULD exist directly following the exec() call. assert.strictEqual(typeof killMeTwice._handle.pid, 'number'); // Kill the process diff --git a/test/pummel/test-process-hrtime.js b/test/pummel/test-process-hrtime.js index f0f8768702c322..2a7e34a111e6f3 100644 --- a/test/pummel/test-process-hrtime.js +++ b/test/pummel/test-process-hrtime.js @@ -35,7 +35,7 @@ while (Date.now() - now < 2000); // get a diff reading const diff = process.hrtime(start); -// should be at least 1 second, at most 2 seconds later +// Should be at least 1 second, at most 2 seconds later // (the while loop will usually exit a few nanoseconds before 2) assert(diff[0] >= 1); assert(diff[0] <= 2); diff --git a/test/sequential/test-cli-syntax-file-not-found.js b/test/sequential/test-cli-syntax-file-not-found.js index b90033a3966573..2bfb0e38c75013 100644 --- a/test/sequential/test-cli-syntax-file-not-found.js +++ b/test/sequential/test-cli-syntax-file-not-found.js @@ -30,7 +30,7 @@ const notFoundRE = /^Error: Cannot find module/m; // no stdout should be produced assert.strictEqual(stdout, ''); - // stderr should have a module not found error message + // `stderr` should have a module not found error message. assert(notFoundRE.test(stderr), `${notFoundRE} === ${stderr}`); assert.strictEqual(err.code, 1, diff --git a/test/sequential/test-fs-watch.js b/test/sequential/test-fs-watch.js index 9755cc8bb11311..a67de8c6d1c415 100644 --- a/test/sequential/test-fs-watch.js +++ b/test/sequential/test-fs-watch.js @@ -111,7 +111,7 @@ tmpdir.refresh(); fs.watch(__filename, { persistent: false }, common.mustNotCall()); } -// whitebox test to ensure that wrapped FSEvent is safe +// Whitebox test to ensure that wrapped FSEvent is safe // https://github.com/joyent/node/issues/6690 { let oldhandle; diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index 0e8aafe51b744f..6cfa4da04e2c04 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -35,11 +35,11 @@ assert.strictEqual(require.main.id, '.'); assert.strictEqual(require.main, module); assert.strictEqual(process.mainModule, module); -// assert that it's *not* the main module in the required module. +// Assert that it's *not* the main module in the required module. require('../fixtures/not-main-module.js'); { - // require a file with a request that includes the extension + // Require a file with a request that includes the extension const a_js = require('../fixtures/a.js'); assert.strictEqual(a_js.number, 42); } @@ -126,7 +126,7 @@ require('../fixtures/node_modules/foo'); { console.error('test name clashes'); - // this one exists and should import the local module + // This one exists and should import the local module const my_path = require('../fixtures/path'); assert.ok(my_path.path_func instanceof Function); // this one does not exist and should throw @@ -235,7 +235,7 @@ try { { - // now verify that module.children contains all the different + // Now verify that module.children contains all the different // modules that we've required, and that all of them contain // the appropriate children, and so on. diff --git a/test/sequential/test-next-tick-error-spin.js b/test/sequential/test-next-tick-error-spin.js index 70d924cfa34b4b..071a017877217a 100644 --- a/test/sequential/test-next-tick-error-spin.js +++ b/test/sequential/test-next-tick-error-spin.js @@ -40,7 +40,7 @@ if (process.argv[2] !== 'child') { const domain = require('domain'); const d = domain.create(); - // in the error handler, we trigger several MakeCallback events + // In the error handler, we trigger several MakeCallback events d.on('error', function() { console.log('a'); console.log('b'); diff --git a/test/sequential/test-timers-set-interval-excludes-callback-duration.js b/test/sequential/test-timers-set-interval-excludes-callback-duration.js index be9f491b92cc17..90eb16b0e259b3 100644 --- a/test/sequential/test-timers-set-interval-excludes-callback-duration.js +++ b/test/sequential/test-timers-set-interval-excludes-callback-duration.js @@ -8,7 +8,7 @@ const t = setInterval(() => { cntr++; if (cntr === 1) { common.busyLoop(100); - // ensure that the event loop passes before the second interval + // Ensure that the event loop passes before the second interval setImmediate(() => assert.strictEqual(cntr, 1)); first = Date.now(); } else if (cntr === 2) { diff --git a/tools/doc/html.js b/tools/doc/html.js index ce53bceaa24a15..00077569d8a85d 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -216,7 +216,7 @@ function preprocessElements({ filename }) { const noLinking = filename.includes('documentation') && heading !== null && heading.children[0].value === 'Stability Index'; - // collapse blockquote and paragraph into a single node + // Collapse blockquote and paragraph into a single node node.type = 'paragraph'; node.children.shift(); node.children.unshift(...paragraph.children); From e340b8f1ffed92067e945d89fdb225a00a52f830 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 28 Nov 2018 14:11:18 -0800 Subject: [PATCH 15/59] tls: re-define max supported version as 1.2 Several secureProtocol strings allow any supported TLS version as the maximum, but our maximum supported protocol version is TLSv1.2 even if someone configures a build against an OpenSSL that supports TLSv1.3. Fixes: https://github.com/nodejs/node/issues/24658 PR-URL: https://github.com/nodejs/node/pull/25024 Reviewed-By: Richard Lau Reviewed-By: Ben Noordhuis Reviewed-By: Daniel Bevenius Reviewed-By: Colin Ihrig --- src/node_crypto.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index b6c3a715982bdc..42fe00b1d0458b 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -501,6 +501,12 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { SSL_SESS_CACHE_NO_AUTO_CLEAR); SSL_CTX_set_min_proto_version(sc->ctx_.get(), min_version); + + if (max_version == 0) { + // Selecting some secureProtocol methods allows the TLS version to be "any + // supported", but we don't support TLSv1.3, even if OpenSSL does. + max_version = TLS1_2_VERSION; + } SSL_CTX_set_max_proto_version(sc->ctx_.get(), max_version); // OpenSSL 1.1.0 changed the ticket key size, but the OpenSSL 1.0.x size was // exposed in the public API. To retain compatibility, install a callback From a4505c698f94bde7e32848d06963e8fc38a31123 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Tue, 14 Aug 2018 10:35:40 -0400 Subject: [PATCH 16/59] src: extract common Bind method `TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of functionality, so a common `Bind` was extracted to remove duplication. PR-URL: https://github.com/nodejs/node/pull/22315 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Fedor Indutny Reviewed-By: Denys Otrishko --- src/tcp_wrap.cc | 43 ++++++++++++++++++++----------------------- src/tcp_wrap.h | 5 +++++ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 5adab06df456bb..dac621ec879e5c 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -225,8 +225,11 @@ void TCPWrap::Open(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(err); } - -void TCPWrap::Bind(const FunctionCallbackInfo& args) { +template +void TCPWrap::Bind( + const FunctionCallbackInfo& args, + int family, + std::function uv_ip_addr) { TCPWrap* wrap; ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder(), @@ -234,31 +237,16 @@ void TCPWrap::Bind(const FunctionCallbackInfo& args) { Environment* env = wrap->env(); node::Utf8Value ip_address(env->isolate(), args[0]); int port; + unsigned int flags = 0; if (!args[1]->Int32Value(env->context()).To(&port)) return; - sockaddr_in addr; - int err = uv_ip4_addr(*ip_address, port, &addr); - if (err == 0) { - err = uv_tcp_bind(&wrap->handle_, - reinterpret_cast(&addr), - 0); + if (family == AF_INET6 && + !args[2]->Uint32Value(env->context()).To(&flags)) { + return; } - args.GetReturnValue().Set(err); -} + T addr; + int err = uv_ip_addr(*ip_address, port, &addr); -void TCPWrap::Bind6(const FunctionCallbackInfo& args) { - TCPWrap* wrap; - ASSIGN_OR_RETURN_UNWRAP(&wrap, - args.Holder(), - args.GetReturnValue().Set(UV_EBADF)); - Environment* env = wrap->env(); - node::Utf8Value ip6_address(env->isolate(), args[0]); - int port; - unsigned int flags; - if (!args[1]->Int32Value(env->context()).To(&port)) return; - if (!args[2]->Uint32Value(env->context()).To(&flags)) return; - sockaddr_in6 addr; - int err = uv_ip6_addr(*ip6_address, port, &addr); if (err == 0) { err = uv_tcp_bind(&wrap->handle_, reinterpret_cast(&addr), @@ -267,6 +255,15 @@ void TCPWrap::Bind6(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(err); } +void TCPWrap::Bind(const FunctionCallbackInfo& args) { + Bind(args, AF_INET, uv_ip4_addr); +} + + +void TCPWrap::Bind6(const FunctionCallbackInfo& args) { + Bind(args, AF_INET6, uv_ip6_addr); +} + void TCPWrap::Listen(const FunctionCallbackInfo& args) { TCPWrap* wrap; diff --git a/src/tcp_wrap.h b/src/tcp_wrap.h index a554832841aa31..db269f65281639 100644 --- a/src/tcp_wrap.h +++ b/src/tcp_wrap.h @@ -80,6 +80,11 @@ class TCPWrap : public ConnectionWrap { static void Connect(const v8::FunctionCallbackInfo& args, std::function uv_ip_addr); static void Open(const v8::FunctionCallbackInfo& args); + template + static void Bind( + const v8::FunctionCallbackInfo& args, + int family, + std::function uv_ip_addr); #ifdef _WIN32 static void SetSimultaneousAccepts( From 9ad6bc2e6e2bbed3d53b2e4f2927643a640426f9 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 10 Dec 2018 12:11:47 -0800 Subject: [PATCH 17/59] test: remove magic numbers in test-gc-http-client-onerror Remove magic numbers (500, 10, 100) from the test. Instead, detect when GC has started and stop sending requests at that point. On my laptop, this results in 16 or 20 requests per run instead of 500. Fixes: https://github.com/nodejs/node/issues/23089 PR-URL: https://github.com/nodejs/node/pull/24943 Reviewed-By: Colin Ihrig --- test/parallel/test-gc-http-client-onerror.js | 53 +++++++++++--------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/test/parallel/test-gc-http-client-onerror.js b/test/parallel/test-gc-http-client-onerror.js index 28a8aecd27e794..30b272ed94aae9 100644 --- a/test/parallel/test-gc-http-client-onerror.js +++ b/test/parallel/test-gc-http-client-onerror.js @@ -6,6 +6,8 @@ const common = require('../common'); const onGC = require('../common/ongc'); +const cpus = require('os').cpus().length; + function serverHandler(req, res) { req.resume(); res.writeHead(200, { 'Content-Type': 'text/plain' }); @@ -13,38 +15,35 @@ function serverHandler(req, res) { } const http = require('http'); -const todo = 500; +let createClients = true; let done = 0; let count = 0; let countGC = 0; -console.log(`We should do ${todo} requests`); - const server = http.createServer(serverHandler); server.listen(0, common.mustCall(() => { - for (let i = 0; i < 10; i++) - getall(); + for (let i = 0; i < cpus; i++) + getAll(); })); -function getall() { - if (count >= todo) - return; - - const req = http.get({ - hostname: 'localhost', - pathname: '/', - port: server.address().port - }, cb).on('error', onerror); +function getAll() { + if (createClients) { + const req = http.get({ + hostname: 'localhost', + pathname: '/', + port: server.address().port + }, cb).on('error', onerror); - count++; - onGC(req, { ongc }); + count++; + onGC(req, { ongc }); - setImmediate(getall); + setImmediate(getAll); + } } function cb(res) { res.resume(); - done += 1; + done++; } function onerror(err) { @@ -55,11 +54,19 @@ function ongc() { countGC++; } -setInterval(status, 100).unref(); +setImmediate(status); function status() { - global.gc(); - console.log('Done: %d/%d', done, todo); - console.log('Collected: %d/%d', countGC, count); - if (countGC === todo) server.close(); + if (done > 0) { + createClients = false; + global.gc(); + console.log(`done/collected/total: ${done}/${countGC}/${count}`); + if (countGC === count) { + server.close(); + } else { + setImmediate(status); + } + } else { + setImmediate(status); + } } From 3f82144c98fdffc3b354112f2d5b286acdc6bc5c Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sun, 16 Dec 2018 01:32:39 +0800 Subject: [PATCH 18/59] process: move environment variable proxy code into node_env_var.cc Instead of exposing all the NamedPropertyHandlerConfiguration() parameters in node_internals, simply expose a CreateEnvVarProxy() method that returns a Local that implements process.env, and mark all the property handlers static in node_env_var.cc. This makes the code more encapsulated. PR-URL: https://github.com/nodejs/node/pull/25067 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- node.gyp | 1 + src/node.cc | 21 +---- src/node_env_var.cc | 214 +++++++++++++++++++++++++++++++++++++++++++ src/node_internals.h | 13 +-- src/node_process.cc | 191 -------------------------------------- 5 files changed, 223 insertions(+), 217 deletions(-) create mode 100644 src/node_env_var.cc diff --git a/node.gyp b/node.gyp index ae52ef74be876c..f2d5fe8db83d03 100644 --- a/node.gyp +++ b/node.gyp @@ -350,6 +350,7 @@ 'src/node_contextify.cc', 'src/node_domain.cc', 'src/node_encoding.cc', + 'src/node_env_var.cc', 'src/node_errors.cc', 'src/node_file.cc', 'src/node_http_parser_llhttp.cc', diff --git a/src/node.cc b/src/node.cc index 82d8653c08ab9e..c246bb1c720e18 100644 --- a/src/node.cc +++ b/src/node.cc @@ -133,7 +133,6 @@ using v8::Maybe; using v8::MaybeLocal; using v8::Message; using v8::MicrotasksPolicy; -using v8::NamedPropertyHandlerConfiguration; using v8::NewStringType; using v8::None; using v8::Nothing; @@ -1024,21 +1023,11 @@ void SetupProcessObject(Environment* env, exec_arguments).FromJust(); // create process.env - Local process_env_template = - ObjectTemplate::New(env->isolate()); - process_env_template->SetHandler(NamedPropertyHandlerConfiguration( - EnvGetter, - EnvSetter, - EnvQuery, - EnvDeleter, - EnvEnumerator, - env->as_external())); - - Local process_env = - process_env_template->NewInstance(env->context()).ToLocalChecked(); - process->Set(env->context(), - FIXED_ONE_BYTE_STRING(env->isolate(), "env"), - process_env).FromJust(); + process + ->Set(env->context(), + FIXED_ONE_BYTE_STRING(env->isolate(), "env"), + CreateEnvVarProxy(context, isolate, env->as_external())) + .FromJust(); READONLY_PROPERTY(process, "pid", Integer::New(env->isolate(), uv_os_getpid())); diff --git a/src/node_env_var.cc b/src/node_env_var.cc new file mode 100644 index 00000000000000..de0991bcab22f1 --- /dev/null +++ b/src/node_env_var.cc @@ -0,0 +1,214 @@ +#include "node_internals.h" +#include "node_errors.h" + +#ifdef __APPLE__ +#include +#define environ (*_NSGetEnviron()) +#elif !defined(_MSC_VER) +extern char** environ; +#endif + +namespace node { +using v8::Array; +using v8::Boolean; +using v8::Context; +using v8::EscapableHandleScope; +using v8::Integer; +using v8::Isolate; +using v8::Local; +using v8::Name; +using v8::NamedPropertyHandlerConfiguration; +using v8::NewStringType; +using v8::Object; +using v8::ObjectTemplate; +using v8::PropertyCallbackInfo; +using v8::String; +using v8::Value; + +static void EnvGetter(Local property, + const PropertyCallbackInfo& info) { + Isolate* isolate = info.GetIsolate(); + if (property->IsSymbol()) { + return info.GetReturnValue().SetUndefined(); + } + Mutex::ScopedLock lock(environ_mutex); +#ifdef __POSIX__ + node::Utf8Value key(isolate, property); + const char* val = getenv(*key); + if (val) { + return info.GetReturnValue().Set( + String::NewFromUtf8(isolate, val, NewStringType::kNormal) + .ToLocalChecked()); + } +#else // _WIN32 + node::TwoByteValue key(isolate, property); + WCHAR buffer[32767]; // The maximum size allowed for environment variables. + SetLastError(ERROR_SUCCESS); + DWORD result = GetEnvironmentVariableW( + reinterpret_cast(*key), buffer, arraysize(buffer)); + // If result >= sizeof buffer the buffer was too small. That should never + // happen. If result == 0 and result != ERROR_SUCCESS the variable was not + // found. + if ((result > 0 || GetLastError() == ERROR_SUCCESS) && + result < arraysize(buffer)) { + const uint16_t* two_byte_buffer = reinterpret_cast(buffer); + v8::MaybeLocal rc = String::NewFromTwoByte( + isolate, two_byte_buffer, NewStringType::kNormal); + if (rc.IsEmpty()) { + isolate->ThrowException(ERR_STRING_TOO_LONG(isolate)); + return; + } + return info.GetReturnValue().Set(rc.ToLocalChecked()); + } +#endif +} + +static void EnvSetter(Local property, + Local value, + const PropertyCallbackInfo& info) { + Environment* env = Environment::GetCurrent(info); + if (env->options()->pending_deprecation && env->EmitProcessEnvWarning() && + !value->IsString() && !value->IsNumber() && !value->IsBoolean()) { + if (ProcessEmitDeprecationWarning( + env, + "Assigning any value other than a string, number, or boolean to a " + "process.env property is deprecated. Please make sure to convert " + "the " + "value to a string before setting process.env with it.", + "DEP0104") + .IsNothing()) + return; + } + + Mutex::ScopedLock lock(environ_mutex); +#ifdef __POSIX__ + node::Utf8Value key(info.GetIsolate(), property); + node::Utf8Value val(info.GetIsolate(), value); + setenv(*key, *val, 1); +#else // _WIN32 + node::TwoByteValue key(info.GetIsolate(), property); + node::TwoByteValue val(info.GetIsolate(), value); + WCHAR* key_ptr = reinterpret_cast(*key); + // Environment variables that start with '=' are read-only. + if (key_ptr[0] != L'=') { + SetEnvironmentVariableW(key_ptr, reinterpret_cast(*val)); + } +#endif + // Whether it worked or not, always return value. + info.GetReturnValue().Set(value); +} + +static void EnvQuery(Local property, + const PropertyCallbackInfo& info) { + Mutex::ScopedLock lock(environ_mutex); + int32_t rc = -1; // Not found unless proven otherwise. + if (property->IsString()) { +#ifdef __POSIX__ + node::Utf8Value key(info.GetIsolate(), property); + if (getenv(*key)) rc = 0; +#else // _WIN32 + node::TwoByteValue key(info.GetIsolate(), property); + WCHAR* key_ptr = reinterpret_cast(*key); + SetLastError(ERROR_SUCCESS); + if (GetEnvironmentVariableW(key_ptr, nullptr, 0) > 0 || + GetLastError() == ERROR_SUCCESS) { + rc = 0; + if (key_ptr[0] == L'=') { + // Environment variables that start with '=' are hidden and read-only. + rc = static_cast(v8::ReadOnly) | + static_cast(v8::DontDelete) | + static_cast(v8::DontEnum); + } + } +#endif + } + if (rc != -1) info.GetReturnValue().Set(rc); +} + +static void EnvDeleter(Local property, + const PropertyCallbackInfo& info) { + Mutex::ScopedLock lock(environ_mutex); + if (property->IsString()) { +#ifdef __POSIX__ + node::Utf8Value key(info.GetIsolate(), property); + unsetenv(*key); +#else + node::TwoByteValue key(info.GetIsolate(), property); + WCHAR* key_ptr = reinterpret_cast(*key); + SetEnvironmentVariableW(key_ptr, nullptr); +#endif + } + + // process.env never has non-configurable properties, so always + // return true like the tc39 delete operator. + info.GetReturnValue().Set(true); +} + +static void EnvEnumerator(const PropertyCallbackInfo& info) { + Environment* env = Environment::GetCurrent(info); + Isolate* isolate = env->isolate(); + + Mutex::ScopedLock lock(environ_mutex); + Local envarr; + int env_size = 0; +#ifdef __POSIX__ + while (environ[env_size]) { + env_size++; + } + std::vector> env_v(env_size); + + for (int i = 0; i < env_size; ++i) { + const char* var = environ[i]; + const char* s = strchr(var, '='); + const int length = s ? s - var : strlen(var); + env_v[i] = String::NewFromUtf8(isolate, var, NewStringType::kNormal, length) + .ToLocalChecked(); + } +#else // _WIN32 + std::vector> env_v; + WCHAR* environment = GetEnvironmentStringsW(); + if (environment == nullptr) return; // This should not happen. + WCHAR* p = environment; + while (*p) { + WCHAR* s; + if (*p == L'=') { + // If the key starts with '=' it is a hidden environment variable. + p += wcslen(p) + 1; + continue; + } else { + s = wcschr(p, L'='); + } + if (!s) { + s = p + wcslen(p); + } + const uint16_t* two_byte_buffer = reinterpret_cast(p); + const size_t two_byte_buffer_len = s - p; + v8::MaybeLocal rc = String::NewFromTwoByte( + isolate, two_byte_buffer, NewStringType::kNormal, two_byte_buffer_len); + if (rc.IsEmpty()) { + isolate->ThrowException(ERR_STRING_TOO_LONG(isolate)); + FreeEnvironmentStringsW(environment); + return; + } + env_v.push_back(rc.ToLocalChecked()); + p = s + wcslen(s) + 1; + } + FreeEnvironmentStringsW(environment); +#endif + + envarr = Array::New(isolate, env_v.data(), env_v.size()); + info.GetReturnValue().Set(envarr); +} + +Local CreateEnvVarProxy(Local context, + Isolate* isolate, + Local data) { + EscapableHandleScope scope(isolate); + Local env_proxy_template = ObjectTemplate::New(isolate); + env_proxy_template->SetHandler(NamedPropertyHandlerConfiguration( + EnvGetter, EnvSetter, EnvQuery, EnvDeleter, EnvEnumerator, data)); + Local env_proxy = + env_proxy_template->NewInstance(context).ToLocalChecked(); + return scope.Escape(env_proxy); +} +} // namespace node diff --git a/src/node_internals.h b/src/node_internals.h index 9c0b8ac3a7b906..6fe1d9a80a22b1 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -128,6 +128,9 @@ void RegisterSignalHandler(int signal, #endif bool SafeGetenv(const char* key, std::string* text); +v8::Local CreateEnvVarProxy(v8::Local context, + v8::Isolate* isolate, + v8::Local data); std::string GetHumanReadableProcessName(); void GetHumanReadableProcessName(char (*name)[1024]); @@ -716,16 +719,6 @@ void StopProfilerIdleNotifier(const v8::FunctionCallbackInfo& args); void Umask(const v8::FunctionCallbackInfo& args); void Uptime(const v8::FunctionCallbackInfo& args); -void EnvDeleter(v8::Local property, - const v8::PropertyCallbackInfo& info); -void EnvGetter(v8::Local property, - const v8::PropertyCallbackInfo& info); -void EnvSetter(v8::Local property, - v8::Local value, - const v8::PropertyCallbackInfo& info); -void EnvQuery(v8::Local property, - const v8::PropertyCallbackInfo& info); -void EnvEnumerator(const v8::PropertyCallbackInfo& info); void DebugPortGetter(v8::Local property, const v8::PropertyCallbackInfo& info); void DebugPortSetter(v8::Local property, diff --git a/src/node_process.cc b/src/node_process.cc index 792cc510924b4e..ccd8ce2fd92b83 100644 --- a/src/node_process.cc +++ b/src/node_process.cc @@ -32,19 +32,11 @@ typedef int mode_t; #include // getgrnam() #endif -#ifdef __APPLE__ -#include -#define environ (*_NSGetEnviron()) -#elif !defined(_MSC_VER) -extern char **environ; -#endif - namespace node { using v8::Array; using v8::ArrayBuffer; using v8::BigUint64Array; -using v8::Boolean; using v8::Context; using v8::Float64Array; using v8::Function; @@ -605,189 +597,6 @@ void ProcessTitleSetter(Local property, uv_set_process_title(*title); } -void EnvGetter(Local property, - const PropertyCallbackInfo& info) { - Isolate* isolate = info.GetIsolate(); - if (property->IsSymbol()) { - return info.GetReturnValue().SetUndefined(); - } - Mutex::ScopedLock lock(environ_mutex); -#ifdef __POSIX__ - node::Utf8Value key(isolate, property); - const char* val = getenv(*key); - if (val) { - return info.GetReturnValue().Set(String::NewFromUtf8(isolate, val, - NewStringType::kNormal).ToLocalChecked()); - } -#else // _WIN32 - node::TwoByteValue key(isolate, property); - WCHAR buffer[32767]; // The maximum size allowed for environment variables. - SetLastError(ERROR_SUCCESS); - DWORD result = GetEnvironmentVariableW(reinterpret_cast(*key), - buffer, - arraysize(buffer)); - // If result >= sizeof buffer the buffer was too small. That should never - // happen. If result == 0 and result != ERROR_SUCCESS the variable was not - // found. - if ((result > 0 || GetLastError() == ERROR_SUCCESS) && - result < arraysize(buffer)) { - const uint16_t* two_byte_buffer = reinterpret_cast(buffer); - v8::MaybeLocal rc = String::NewFromTwoByte( - isolate, two_byte_buffer, NewStringType::kNormal); - if (rc.IsEmpty()) { - isolate->ThrowException(ERR_STRING_TOO_LONG(isolate)); - return; - } - return info.GetReturnValue().Set(rc.ToLocalChecked()); - } -#endif -} - - -void EnvSetter(Local property, - Local value, - const PropertyCallbackInfo& info) { - Environment* env = Environment::GetCurrent(info); - if (env->options()->pending_deprecation && env->EmitProcessEnvWarning() && - !value->IsString() && !value->IsNumber() && !value->IsBoolean()) { - if (ProcessEmitDeprecationWarning( - env, - "Assigning any value other than a string, number, or boolean to a " - "process.env property is deprecated. Please make sure to convert the " - "value to a string before setting process.env with it.", - "DEP0104").IsNothing()) - return; - } - - Mutex::ScopedLock lock(environ_mutex); -#ifdef __POSIX__ - node::Utf8Value key(info.GetIsolate(), property); - node::Utf8Value val(info.GetIsolate(), value); - setenv(*key, *val, 1); -#else // _WIN32 - node::TwoByteValue key(info.GetIsolate(), property); - node::TwoByteValue val(info.GetIsolate(), value); - WCHAR* key_ptr = reinterpret_cast(*key); - // Environment variables that start with '=' are read-only. - if (key_ptr[0] != L'=') { - SetEnvironmentVariableW(key_ptr, reinterpret_cast(*val)); - } -#endif - // Whether it worked or not, always return value. - info.GetReturnValue().Set(value); -} - - -void EnvQuery(Local property, const PropertyCallbackInfo& info) { - Mutex::ScopedLock lock(environ_mutex); - int32_t rc = -1; // Not found unless proven otherwise. - if (property->IsString()) { -#ifdef __POSIX__ - node::Utf8Value key(info.GetIsolate(), property); - if (getenv(*key)) - rc = 0; -#else // _WIN32 - node::TwoByteValue key(info.GetIsolate(), property); - WCHAR* key_ptr = reinterpret_cast(*key); - SetLastError(ERROR_SUCCESS); - if (GetEnvironmentVariableW(key_ptr, nullptr, 0) > 0 || - GetLastError() == ERROR_SUCCESS) { - rc = 0; - if (key_ptr[0] == L'=') { - // Environment variables that start with '=' are hidden and read-only. - rc = static_cast(v8::ReadOnly) | - static_cast(v8::DontDelete) | - static_cast(v8::DontEnum); - } - } -#endif - } - if (rc != -1) - info.GetReturnValue().Set(rc); -} - - -void EnvDeleter(Local property, - const PropertyCallbackInfo& info) { - Mutex::ScopedLock lock(environ_mutex); - if (property->IsString()) { -#ifdef __POSIX__ - node::Utf8Value key(info.GetIsolate(), property); - unsetenv(*key); -#else - node::TwoByteValue key(info.GetIsolate(), property); - WCHAR* key_ptr = reinterpret_cast(*key); - SetEnvironmentVariableW(key_ptr, nullptr); -#endif - } - - // process.env never has non-configurable properties, so always - // return true like the tc39 delete operator. - info.GetReturnValue().Set(true); -} - - -void EnvEnumerator(const PropertyCallbackInfo& info) { - Environment* env = Environment::GetCurrent(info); - Isolate* isolate = env->isolate(); - - Mutex::ScopedLock lock(environ_mutex); - Local envarr; - int env_size = 0; -#ifdef __POSIX__ - while (environ[env_size]) { - env_size++; - } - std::vector> env_v(env_size); - - for (int i = 0; i < env_size; ++i) { - const char* var = environ[i]; - const char* s = strchr(var, '='); - const int length = s ? s - var : strlen(var); - env_v[i] = - String::NewFromUtf8(isolate, var, NewStringType::kNormal, length) - .ToLocalChecked(); - } -#else // _WIN32 - std::vector> env_v; - WCHAR* environment = GetEnvironmentStringsW(); - if (environment == nullptr) - return; // This should not happen. - WCHAR* p = environment; - while (*p) { - WCHAR* s; - if (*p == L'=') { - // If the key starts with '=' it is a hidden environment variable. - p += wcslen(p) + 1; - continue; - } else { - s = wcschr(p, L'='); - } - if (!s) { - s = p + wcslen(p); - } - const uint16_t* two_byte_buffer = reinterpret_cast(p); - const size_t two_byte_buffer_len = s - p; - v8::MaybeLocal rc = - String::NewFromTwoByte(isolate, - two_byte_buffer, - NewStringType::kNormal, - two_byte_buffer_len); - if (rc.IsEmpty()) { - isolate->ThrowException(ERR_STRING_TOO_LONG(isolate)); - FreeEnvironmentStringsW(environment); - return; - } - env_v.push_back(rc.ToLocalChecked()); - p = s + wcslen(s) + 1; - } - FreeEnvironmentStringsW(environment); -#endif - - envarr = Array::New(isolate, env_v.data(), env_v.size()); - info.GetReturnValue().Set(envarr); -} - void GetParentProcessId(Local property, const PropertyCallbackInfo& info) { info.GetReturnValue().Set(uv_os_getppid()); From 4561e2c9845549e8121d73a7b0501c3b639ccdc1 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 15 Dec 2018 17:52:47 -0800 Subject: [PATCH 19/59] doc: revise "Breaking Changes" section of Collaborator Guide Simplify material about TSC approval for breaking changes. Omit extraneous material explaining that purely additive changes are not breaking changes. PR-URL: https://github.com/nodejs/node/pull/25071 Reviewed-By: Anna Henningsen Reviewed-By: Anto Aravinth Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Yuta Hiroto Reviewed-By: James M Snell --- COLLABORATOR_GUIDE.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 193591381a108a..2d45f25c6ab219 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -242,8 +242,8 @@ For undocumented APIs that are public, open a pull request documenting the API. ### Breaking Changes -Backwards-incompatible changes may land on the master branch at any time after -sufficient review by Collaborators and approval of at least two TSC members. +At least two TSC members must approve backward-incompatible changes to the +master branch. Examples of breaking changes include: @@ -254,11 +254,6 @@ Examples of breaking changes include: * altering expected timing of an event * changing the side effects of using a particular API -Purely additive changes (e.g. adding new events to `EventEmitter` -implementations, adding new arguments to a method in a way that allows -existing code to continue working without modification, or adding new -properties to an options argument) are semver-minor changes. - #### Breaking Changes and Deprecations With a few exceptions outlined below, when backward-incompatible changes to a From a5bccc2919817bc1ec60852fe847e13411f72fac Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 14 Dec 2018 00:14:38 +0800 Subject: [PATCH 20/59] tools: make apilinks building more robust 1. Move the apilinks.json file into out/doc so it gets cleaned when running `make docclean` 2. When the apilinks.json generated is empty, throw a specific error so it's easier to understand what's wrong 3. Write to a file passed through CLI arguments instead writing to stdout in apilinks.js so the build process is more robust in the case of a bad binary PR-URL: https://github.com/nodejs/node/pull/25019 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- Makefile | 10 +++++----- test/doctool/test-apilinks.js | 17 ++++++++++------- tools/doc/apilinks.js | 6 ++++-- tools/doc/generate.js | 9 ++++++--- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 3cbf6118a91e96..9f6c76c61f7f2d 100644 --- a/Makefile +++ b/Makefile @@ -692,16 +692,16 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets run-npm-ci = $(PWD)/$(NPM) ci +LINK_DATA = out/doc/apilinks.json gen-api = tools/doc/generate.js --node-version=$(FULLVERSION) \ - --apilinks=out/apilinks.json $< --output-directory=out/doc/api -gen-apilink = tools/doc/apilinks.js $(wildcard lib/*.js) > $@ + --apilinks=$(LINK_DATA) $< --output-directory=out/doc/api +gen-apilink = tools/doc/apilinks.js $(LINK_DATA) $(wildcard lib/*.js) -out/apilinks.json: $(wildcard lib/*.js) tools/doc/apilinks.js +$(LINK_DATA): $(wildcard lib/*.js) tools/doc/apilinks.js $(call available-node, $(gen-apilink)) out/doc/api/%.json out/doc/api/%.html: doc/api/%.md tools/doc/generate.js \ - tools/doc/html.js tools/doc/json.js tools/doc/apilinks.js | \ - out/apilinks.json + tools/doc/html.js tools/doc/json.js tools/doc/apilinks.js | $(LINK_DATA) $(call available-node, $(gen-api)) out/doc/api/all.html: $(apidocs_html) tools/doc/allhtml.js \ diff --git a/test/doctool/test-apilinks.js b/test/doctool/test-apilinks.js index e53c81a08a7203..91de4b79f865f4 100644 --- a/test/doctool/test-apilinks.js +++ b/test/doctool/test-apilinks.js @@ -2,28 +2,31 @@ require('../common'); const fixtures = require('../common/fixtures'); +const tmpdir = require('../common/tmpdir'); const fs = require('fs'); const assert = require('assert'); const path = require('path'); const { execFileSync } = require('child_process'); const script = path.join(__dirname, '..', '..', 'tools', 'doc', 'apilinks.js'); - const apilinks = fixtures.path('apilinks'); + +tmpdir.refresh(); + fs.readdirSync(apilinks).forEach((fixture) => { if (!fixture.endsWith('.js')) return; - const file = path.join(apilinks, fixture); - - const expectedContent = fs.readFileSync(file + 'on', 'utf8'); + const input = path.join(apilinks, fixture); - const output = execFileSync( + const expectedContent = fs.readFileSync(`${input}on`, 'utf8'); + const outputPath = path.join(tmpdir.path, `${fixture}on`); + execFileSync( process.execPath, - [script, file], + [script, outputPath, input], { encoding: 'utf-8' } ); const expectedLinks = JSON.parse(expectedContent); - const actualLinks = JSON.parse(output); + const actualLinks = JSON.parse(fs.readFileSync(outputPath)); for (const [k, v] of Object.entries(expectedLinks)) { assert.ok(k in actualLinks, `link not found: ${k}`); diff --git a/tools/doc/apilinks.js b/tools/doc/apilinks.js index c86db143383c32..9c23ae55c59370 100644 --- a/tools/doc/apilinks.js +++ b/tools/doc/apilinks.js @@ -47,7 +47,9 @@ const tag = execSync(`git describe --contains ${hash}`).split('\n')[0] || hash; // Extract definitions from each file specified. const definition = {}; -process.argv.slice(2).forEach((file) => { +const output = process.argv[2]; +const inputs = process.argv.slice(3); +inputs.forEach((file) => { const basename = path.basename(file, '.js'); // Parse source. @@ -206,4 +208,4 @@ process.argv.slice(2).forEach((file) => { } }); -console.log(JSON.stringify(definition, null, 2)); +fs.writeFileSync(output, JSON.stringify(definition, null, 2), 'utf8'); diff --git a/tools/doc/generate.js b/tools/doc/generate.js index 7ca47e2ae06dc8..dd213a35a6bbc4 100644 --- a/tools/doc/generate.js +++ b/tools/doc/generate.js @@ -49,9 +49,12 @@ args.forEach(function(arg) { } else if (arg.startsWith('--output-directory=')) { outputDir = arg.replace(/^--output-directory=/, ''); } else if (arg.startsWith('--apilinks=')) { - apilinks = JSON.parse( - fs.readFileSync(arg.replace(/^--apilinks=/, ''), 'utf8') - ); + const linkFile = arg.replace(/^--apilinks=/, ''); + const data = fs.readFileSync(linkFile, 'utf8'); + if (!data.trim()) { + throw new Error(`${linkFile} is empty`); + } + apilinks = JSON.parse(data); } }); From 5eb5d1d7b1786903ba7eb4350d78567c4d4e725f Mon Sep 17 00:00:00 2001 From: ZYSzys <17367077526@163.com> Date: Sat, 15 Dec 2018 16:15:40 +0800 Subject: [PATCH 21/59] test: test internal/util/types in vm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/25056 Reviewed-By: Michaël Zasso Reviewed-By: Daijiro Wachi Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- test/parallel/test-util-types.js | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/test/parallel/test-util-types.js b/test/parallel/test-util-types.js index 64434e574a2de3..eba8583ee70de7 100644 --- a/test/parallel/test-util-types.js +++ b/test/parallel/test-util-types.js @@ -82,6 +82,40 @@ for (const [ value, _method ] of [ { assert(!types.isUint8Array({ [Symbol.toStringTag]: 'Uint8Array' })); assert(types.isUint8Array(vm.runInNewContext('new Uint8Array'))); + + assert(!types.isUint8ClampedArray({ + [Symbol.toStringTag]: 'Uint8ClampedArray' + })); + assert(types.isUint8ClampedArray( + vm.runInNewContext('new Uint8ClampedArray') + )); + + assert(!types.isUint16Array({ [Symbol.toStringTag]: 'Uint16Array' })); + assert(types.isUint16Array(vm.runInNewContext('new Uint16Array'))); + + assert(!types.isUint32Array({ [Symbol.toStringTag]: 'Uint32Array' })); + assert(types.isUint32Array(vm.runInNewContext('new Uint32Array'))); + + assert(!types.isInt8Array({ [Symbol.toStringTag]: 'Int8Array' })); + assert(types.isInt8Array(vm.runInNewContext('new Int8Array'))); + + assert(!types.isInt16Array({ [Symbol.toStringTag]: 'Int16Array' })); + assert(types.isInt16Array(vm.runInNewContext('new Int16Array'))); + + assert(!types.isInt32Array({ [Symbol.toStringTag]: 'Int32Array' })); + assert(types.isInt32Array(vm.runInNewContext('new Int32Array'))); + + assert(!types.isFloat32Array({ [Symbol.toStringTag]: 'Float32Array' })); + assert(types.isFloat32Array(vm.runInNewContext('new Float32Array'))); + + assert(!types.isFloat64Array({ [Symbol.toStringTag]: 'Float64Array' })); + assert(types.isFloat64Array(vm.runInNewContext('new Float64Array'))); + + assert(!types.isBigInt64Array({ [Symbol.toStringTag]: 'BigInt64Array' })); + assert(types.isBigInt64Array(vm.runInNewContext('new BigInt64Array'))); + + assert(!types.isBigUint64Array({ [Symbol.toStringTag]: 'BigUint64Array' })); + assert(types.isBigUint64Array(vm.runInNewContext('new BigUint64Array'))); } { From a9ab28df2c2319dcc817616e623a49379de6c409 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 13 Dec 2018 04:05:41 +0100 Subject: [PATCH 22/59] assert: inspect getters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While asserting two objects the descriptor is not taken into account. Therefore getters will be triggered as such. This makes sure they are also highlighted in the error message instead of potentially looking identical while the return value of the getter is actually different. PR-URL: https://github.com/nodejs/node/pull/25004 Reviewed-By: Rich Trott Reviewed-By: Michaël Zasso --- lib/internal/assert.js | 4 +++- test/parallel/test-assert-deep.js | 24 +++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lib/internal/assert.js b/lib/internal/assert.js index 829f6663191dff..29769fc5617b95 100644 --- a/lib/internal/assert.js +++ b/lib/internal/assert.js @@ -56,7 +56,9 @@ function inspectValue(val) { breakLength: Infinity, // Assert does not detect proxies currently. showProxy: false, - sorted: true + sorted: true, + // Inspect getters as we also check them when comparing entries. + getters: true } ); } diff --git a/test/parallel/test-assert-deep.js b/test/parallel/test-assert-deep.js index c1e8c2f246663b..ceb17bdf56364d 100644 --- a/test/parallel/test-assert-deep.js +++ b/test/parallel/test-assert-deep.js @@ -24,7 +24,8 @@ function re(literals, ...values) { customInspect: false, maxArrayLength: Infinity, breakLength: Infinity, - sorted: true + sorted: true, + getters: true }); // Need to escape special characters. result += str; @@ -1049,3 +1050,24 @@ assert.throws( }); assertDeepAndStrictEqual(a, b); } + +// Check getters. +{ + const a = { + get a() { return 5; } + }; + const b = { + get a() { return 6; } + }; + assert.throws( + () => assert.deepStrictEqual(a, b), + { + code: 'ERR_ASSERTION', + name: 'AssertionError [ERR_ASSERTION]', + message: /a: \[Getter: 5]\n- a: \[Getter: 6]\n / + } + ); + + // The descriptor is not compared. + assertDeepAndStrictEqual(a, { a: 5 }); +} From 3e1fe1919470e5918b7316e736b0ff8b62866192 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 17 Dec 2018 13:42:46 -0800 Subject: [PATCH 23/59] test: add missing tmpdir.refresh() in recently-added test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without `tmpdir.refresh()`, the test fails in some situations. This was missed because using `test.py` will almost always result in a leftover tmpdir lying around that makes the `refresh()` not needed. Refs: https://github.com/nodejs/node/pull/24913#issuecomment-447982921 PR-URL: https://github.com/nodejs/node/pull/25098 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: Daijiro Wachi Reviewed-By: Anto Aravinth --- test/parallel/test-child-process-spawn-args.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/parallel/test-child-process-spawn-args.js b/test/parallel/test-child-process-spawn-args.js index 35a1ea40208adf..821525409c8fca 100644 --- a/test/parallel/test-child-process-spawn-args.js +++ b/test/parallel/test-child-process-spawn-args.js @@ -12,6 +12,8 @@ const { spawn } = require('child_process'); const common = require('../common'); const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + const command = common.isWindows ? 'cd' : 'pwd'; const options = { cwd: tmpdir.path }; From 6f3b421dd5d769b75ace3b8a42739c3582381617 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 14 Dec 2018 00:02:57 +0800 Subject: [PATCH 24/59] src: schedule destroy hooks in BeforeExit early during bootstrap Instead of doing it in the `internalBinding('async_wrap')` initialization whose first call is uncertain depending on how the native modules are loaded in JS land during bootstrap. PR-URL: https://github.com/nodejs/node/pull/25020 Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- src/async_wrap.cc | 12 +----------- src/async_wrap.h | 1 + src/env.cc | 8 ++++++++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/async_wrap.cc b/src/async_wrap.cc index 2d1152d1c0324b..9581b0ce589988 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -88,8 +88,7 @@ struct AsyncWrapObject : public AsyncWrap { SET_SELF_SIZE(AsyncWrapObject) }; - -static void DestroyAsyncIdsCallback(Environment* env, void* data) { +void AsyncWrap::DestroyAsyncIdsCallback(Environment* env, void* data) { Local fn = env->async_hooks_destroy_function(); TryCatchScope try_catch(env, TryCatchScope::CatchMode::kFatal); @@ -112,13 +111,6 @@ static void DestroyAsyncIdsCallback(Environment* env, void* data) { } while (!env->destroy_async_id_list()->empty()); } -static void DestroyAsyncIdsCallback(void* arg) { - Environment* env = static_cast(arg); - if (!env->destroy_async_id_list()->empty()) - DestroyAsyncIdsCallback(env, nullptr); -} - - void Emit(Environment* env, double async_id, AsyncHooks::Fields type, Local fn) { AsyncHooks* async_hooks = env->async_hooks(); @@ -458,8 +450,6 @@ void AsyncWrap::Initialize(Local target, Isolate* isolate = env->isolate(); HandleScope scope(isolate); - env->BeforeExit(DestroyAsyncIdsCallback, env); - env->SetMethod(target, "setupHooks", SetupHooks); env->SetMethod(target, "pushAsyncIds", PushAsyncIds); env->SetMethod(target, "popAsyncIds", PopAsyncIds); diff --git a/src/async_wrap.h b/src/async_wrap.h index 523d620b0acb52..f7fc149c941ef0 100644 --- a/src/async_wrap.h +++ b/src/async_wrap.h @@ -141,6 +141,7 @@ class AsyncWrap : public BaseObject { static void EmitTraceEventAfter(ProviderType type, double async_id); void EmitTraceEventDestroy(); + static void DestroyAsyncIdsCallback(Environment* env, void* data); inline ProviderType provider_type() const; diff --git a/src/env.cc b/src/env.cc index ed6717d684421b..cadb20124cc9ec 100644 --- a/src/env.cc +++ b/src/env.cc @@ -211,6 +211,14 @@ Environment::Environment(IsolateData* isolate_data, } destroy_async_id_list_.reserve(512); + BeforeExit( + [](void* arg) { + Environment* env = static_cast(arg); + if (!env->destroy_async_id_list()->empty()) + AsyncWrap::DestroyAsyncIdsCallback(env, nullptr); + }, + this); + performance_state_.reset(new performance::performance_state(isolate())); performance_state_->Mark( performance::NODE_PERFORMANCE_MILESTONE_ENVIRONMENT); From 1f45b2370d5a34f4bc1f2037a9042c8bcbaa7884 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 15 Dec 2018 19:20:05 -0800 Subject: [PATCH 25/59] test: add signal check to test-esm-cjs-main PR-URL: https://github.com/nodejs/node/pull/25073 Reviewed-By: Richard Lau Reviewed-By: Anto Aravinth Reviewed-By: Colin Ihrig Reviewed-By: Daijiro Wachi Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/es-module/test-esm-cjs-main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/es-module/test-esm-cjs-main.js b/test/es-module/test-esm-cjs-main.js index 8de923d37b1887..8577eccb9a0f65 100644 --- a/test/es-module/test-esm-cjs-main.js +++ b/test/es-module/test-esm-cjs-main.js @@ -21,7 +21,8 @@ child.stdout.on('data', (data) => { assert.strictEqual(data.toString(), 'executed\n'); validatedExecution = true; }); -child.on('close', common.mustCall((code, stdout) => { +child.on('close', common.mustCall((code, signal) => { assert.strictEqual(validatedExecution, true); assert.strictEqual(code, 0); + assert.strictEqual(signal, null); })); From 4f28da883fbdabb886b0e8817596ec66d9e66381 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 16 Dec 2018 14:34:37 +0100 Subject: [PATCH 26/59] worker: fix nullptr deref after MessagePort deser failure This would previously always have crashed when deserializing a `MessagePort` fails, because there was always at least one `nullptr` entry in the vector. PR-URL: https://github.com/nodejs/node/pull/25076 Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil --- src/node_messaging.cc | 3 ++- ...st-worker-messageport-transfer-terminate.js | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-worker-messageport-transfer-terminate.js diff --git a/src/node_messaging.cc b/src/node_messaging.cc index c9b5e324479975..ae60187b6f3ec2 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -90,7 +90,8 @@ MaybeLocal Message::Deserialize(Environment* env, if (ports[i] == nullptr) { for (MessagePort* port : ports) { // This will eventually release the MessagePort object itself. - port->Close(); + if (port != nullptr) + port->Close(); } return MaybeLocal(); } diff --git a/test/parallel/test-worker-messageport-transfer-terminate.js b/test/parallel/test-worker-messageport-transfer-terminate.js new file mode 100644 index 00000000000000..13a30b5c54c6c3 --- /dev/null +++ b/test/parallel/test-worker-messageport-transfer-terminate.js @@ -0,0 +1,18 @@ +// Flags: --experimental-worker +'use strict'; +require('../common'); +const { Worker, MessageChannel } = require('worker_threads'); + +// Check the interaction of calling .terminate() while transferring +// MessagePort objects; in particular, that it does not crash the process. + +for (let i = 0; i < 10; ++i) { + const w = new Worker( + "require('worker_threads').parentPort.on('message', () => {})", + { eval: true }); + setImmediate(() => { + const port = new MessageChannel().port1; + w.postMessage({ port }, [ port ]); + w.terminate(); + }); +} From 155d1d54bfa4f9694e4dec49c18d12860971ec25 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 16 Dec 2018 14:18:16 -0500 Subject: [PATCH 27/59] deps: upgrade to libuv 1.24.1 PR-URL: https://github.com/nodejs/node/pull/25078 Fixes: https://github.com/nodejs/node/issues/24521 Reviewed-By: James M Snell Reviewed-By: Daniel Bevenius --- deps/uv/.gitignore | 2 +- deps/uv/AUTHORS | 6 ++ deps/uv/CMakeLists.txt | 8 ++- deps/uv/ChangeLog | 33 +++++++++++ deps/uv/Makefile.am | 3 + deps/uv/README.md | 3 +- deps/uv/configure.ac | 2 +- deps/uv/docs/src/handle.rst | 2 + deps/uv/include/uv/version.h | 2 +- deps/uv/include/uv/win.h | 1 + deps/uv/src/inet.c | 11 +--- deps/uv/src/strscpy.c | 17 ++++++ deps/uv/src/strscpy.h | 18 ++++++ deps/uv/src/timer.c | 2 +- deps/uv/src/unix/aix.c | 32 +++++------ deps/uv/src/unix/darwin-proctitle.c | 3 +- deps/uv/src/unix/fs.c | 42 ++++++++++---- deps/uv/src/unix/linux-core.c | 3 + deps/uv/src/unix/linux-inotify.c | 6 +- deps/uv/src/unix/netbsd.c | 3 +- deps/uv/src/unix/os390.c | 6 +- deps/uv/src/unix/pipe.c | 6 +- deps/uv/src/unix/sunos.c | 3 +- deps/uv/src/uv-common.c | 2 +- deps/uv/src/uv-common.h | 1 + deps/uv/src/uv-data-getter-setters.c | 16 +++--- deps/uv/src/win/dl.c | 8 ++- deps/uv/src/win/fs-event.c | 8 +-- deps/uv/src/win/fs.c | 49 ++++++++++++---- deps/uv/src/win/pipe.c | 6 +- deps/uv/src/win/poll.c | 4 +- deps/uv/src/win/process.c | 6 +- deps/uv/src/win/tty.c | 5 +- deps/uv/src/win/winapi.h | 3 + deps/uv/test/run-tests.c | 8 +-- deps/uv/test/runner-win.c | 7 ++- deps/uv/test/runner-win.h | 2 + deps/uv/test/test-close-fd.c | 6 +- deps/uv/test/test-condvar.c | 2 +- deps/uv/test/test-emfile.c | 16 ++++-- deps/uv/test/test-fork.c | 3 + deps/uv/test/test-fs.c | 56 +++++++++++++++++-- deps/uv/test/test-ip4-addr.c | 7 ++- deps/uv/test/test-ip6-addr.c | 2 +- deps/uv/test/test-list.h | 4 ++ .../test/test-pipe-close-stdout-read-stdin.c | 4 ++ deps/uv/test/test-platform-output.c | 2 +- .../test-poll-close-doesnt-corrupt-stack.c | 2 +- deps/uv/test/test-poll-oob.c | 5 ++ deps/uv/test/test-process-title-threadsafe.c | 3 +- deps/uv/test/test-process-title.c | 4 +- deps/uv/test/test-signal-multiple-loops.c | 6 +- deps/uv/test/test-spawn.c | 8 ++- deps/uv/test/test-strscpy.c | 53 ++++++++++++++++++ deps/uv/test/test-tcp-close-accept.c | 6 +- deps/uv/test/test-tcp-oob.c | 7 ++- deps/uv/test/test-tcp-write-after-connect.c | 6 +- deps/uv/test/test-tty.c | 2 - deps/uv/test/test.gyp | 3 +- deps/uv/uv.gyp | 2 + 60 files changed, 421 insertions(+), 127 deletions(-) create mode 100644 deps/uv/src/strscpy.c create mode 100644 deps/uv/src/strscpy.h create mode 100644 deps/uv/test/test-strscpy.c diff --git a/deps/uv/.gitignore b/deps/uv/.gitignore index 7536abd54970a2..c132987917623e 100644 --- a/deps/uv/.gitignore +++ b/deps/uv/.gitignore @@ -42,7 +42,7 @@ Makefile.in /android-toolchain /out/ -/build/gyp +/build/ /test/.libs/ /test/run-tests diff --git a/deps/uv/AUTHORS b/deps/uv/AUTHORS index 2f93bd8dffefa4..a8b50f6209d7a0 100644 --- a/deps/uv/AUTHORS +++ b/deps/uv/AUTHORS @@ -356,3 +356,9 @@ hitesh Svante Signell Samuel Thibault Jeremy Studer +damon-kwok <563066990@qq.com> +Damon Kwok +Ashe Connor +Rick +Ivan Krylov +Michael Meier diff --git a/deps/uv/CMakeLists.txt b/deps/uv/CMakeLists.txt index 8cd862715aef9d..9f1c0587a98060 100644 --- a/deps/uv/CMakeLists.txt +++ b/deps/uv/CMakeLists.txt @@ -15,6 +15,7 @@ set(uv_sources src/fs-poll.c src/idna.c src/inet.c + src/strscpy.c src/threadpool.c src/timer.c src/uv-common.c @@ -116,6 +117,7 @@ set(uv_test_sources test/test-socket-buffer-size.c test/test-spawn.c test/test-stdio-over-pipes.c + test/test-strscpy.c test/test-tcp-alloc-cb-fail.c test/test-tcp-bind-error.c test/test-tcp-bind6-error.c @@ -208,7 +210,11 @@ if(WIN32) list(APPEND uv_test_sources src/win/snprintf.c test/runner-win.c) else() list(APPEND uv_defines _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE) - list(APPEND uv_libraries pthread) + if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android") + # Android has pthread as part of its c library, not as a separate + # libpthread.so. + list(APPEND uv_libraries pthread) + endif() list(APPEND uv_sources src/unix/async.c src/unix/core.c diff --git a/deps/uv/ChangeLog b/deps/uv/ChangeLog index 3376481d62d1f0..f7881e6bbc4f92 100644 --- a/deps/uv/ChangeLog +++ b/deps/uv/ChangeLog @@ -1,3 +1,36 @@ +2018.12.17, Version 1.24.1 (Stable), 274f2bd3b70847cadd9a3965577a87e666ab9ac3 + +Changes since version 1.24.0: + +* test: fix platform_output test on cygwin (damon-kwok) + +* gitignore: ignore build/ directory (Damon Kwok) + +* unix: zero epoll_event before use (Ashe Connor) + +* darwin: use runtime check for file cloning (Ben Noordhuis) + +* doc: replace deprecated build command on macOS (Rick) + +* warnings: fix code that emits compiler warnings (Jameson Nash) + +* doc: clarify expected memory management strategy (Ivan Krylov) + +* test: add uv_inet_ntop(AF_INET) coverage (Ben Noordhuis) + +* unix: harden string copying, introduce strscpy() (Ben Noordhuis) + +* linux: get rid of strncpy() call (Ben Noordhuis) + +* aix: get rid of strcat() calls (Ben Noordhuis) + +* aix: fix data race in uv_fs_event_start() (Ben Noordhuis) + +* win: fs: fix `FILE_FLAG_NO_BUFFERING` for writes (Joran Dirk Greef) + +* build: don't link against -lpthread on Android (Michael Meier) + + 2018.11.14, Version 1.24.0 (Stable), 2d427ee0083d1baf995df4ebf79a3f8890e9a3e1 Changes since version 1.23.2: diff --git a/deps/uv/Makefile.am b/deps/uv/Makefile.am index 098d2f57931d18..f9c9c9a05d14f3 100644 --- a/deps/uv/Makefile.am +++ b/deps/uv/Makefile.am @@ -32,6 +32,8 @@ libuv_la_SOURCES = src/fs-poll.c \ src/idna.c \ src/inet.c \ src/queue.h \ + src/strscpy.c \ + src/strscpy.h \ src/threadpool.c \ src/timer.c \ src/uv-data-getter-setters.c \ @@ -241,6 +243,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \ test/test-socket-buffer-size.c \ test/test-spawn.c \ test/test-stdio-over-pipes.c \ + test/test-strscpy.c \ test/test-tcp-alloc-cb-fail.c \ test/test-tcp-bind-error.c \ test/test-tcp-bind6-error.c \ diff --git a/deps/uv/README.md b/deps/uv/README.md index b24b722612edf3..fb5971d3e35425 100644 --- a/deps/uv/README.md +++ b/deps/uv/README.md @@ -262,8 +262,7 @@ Run: ```bash $ ./gyp_uv.py -f xcode -$ xcodebuild -ARCHS="x86_64" -project uv.xcodeproj \ - -configuration Release -target All +$ xcodebuild -ARCHS="x86_64" -project out/uv.xcodeproj -configuration Release -alltargets ``` Using Homebrew: diff --git a/deps/uv/configure.ac b/deps/uv/configure.ac index 68939c699e4a32..35e7c1b7493acd 100644 --- a/deps/uv/configure.ac +++ b/deps/uv/configure.ac @@ -13,7 +13,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_PREREQ(2.57) -AC_INIT([libuv], [1.24.0], [https://github.com/libuv/libuv/issues]) +AC_INIT([libuv], [1.24.1], [https://github.com/libuv/libuv/issues]) AC_CONFIG_MACRO_DIR([m4]) m4_include([m4/libuv-extra-automake-flags.m4]) m4_include([m4/as_case.m4]) diff --git a/deps/uv/docs/src/handle.rst b/deps/uv/docs/src/handle.rst index 86fa811d3f7eed..544794db06c956 100644 --- a/deps/uv/docs/src/handle.rst +++ b/deps/uv/docs/src/handle.rst @@ -140,6 +140,8 @@ API Request handle to be closed. `close_cb` will be called asynchronously after this call. This MUST be called on each handle before memory is released. + Moreover, the memory can only be released in `close_cb` or after it has + returned. Handles that wrap file descriptors are closed immediately but `close_cb` will still be deferred to the next iteration of the event loop. diff --git a/deps/uv/include/uv/version.h b/deps/uv/include/uv/version.h index 105e9a2615f4a6..3bc023700ef002 100644 --- a/deps/uv/include/uv/version.h +++ b/deps/uv/include/uv/version.h @@ -32,7 +32,7 @@ #define UV_VERSION_MAJOR 1 #define UV_VERSION_MINOR 24 -#define UV_VERSION_PATCH 0 +#define UV_VERSION_PATCH 1 #define UV_VERSION_IS_RELEASE 1 #define UV_VERSION_SUFFIX "" diff --git a/deps/uv/include/uv/win.h b/deps/uv/include/uv/win.h index bb9477c8346bdc..edd2cc6eb9cd3f 100644 --- a/deps/uv/include/uv/win.h +++ b/deps/uv/include/uv/win.h @@ -25,6 +25,7 @@ #if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) typedef intptr_t ssize_t; +# define SSIZE_MAX INTPTR_MAX # define _SSIZE_T_ # define _SSIZE_T_DEFINED #endif diff --git a/deps/uv/src/inet.c b/deps/uv/src/inet.c index 4598ca1e9f9670..698ab232e53714 100644 --- a/deps/uv/src/inet.c +++ b/deps/uv/src/inet.c @@ -59,8 +59,7 @@ static int inet_ntop4(const unsigned char *src, char *dst, size_t size) { if (l <= 0 || (size_t) l >= size) { return UV_ENOSPC; } - strncpy(dst, tmp, size); - dst[size - 1] = '\0'; + uv__strscpy(dst, tmp, size); return 0; } @@ -142,14 +141,8 @@ static int inet_ntop6(const unsigned char *src, char *dst, size_t size) { if (best.base != -1 && (best.base + best.len) == ARRAY_SIZE(words)) *tp++ = ':'; *tp++ = '\0'; - - /* - * Check for overflow, copy, and we're done. - */ - if ((size_t)(tp - tmp) > size) { + if (UV_E2BIG == uv__strscpy(dst, tmp, size)) return UV_ENOSPC; - } - strcpy(dst, tmp); return 0; } diff --git a/deps/uv/src/strscpy.c b/deps/uv/src/strscpy.c new file mode 100644 index 00000000000000..2a2bdce7450113 --- /dev/null +++ b/deps/uv/src/strscpy.c @@ -0,0 +1,17 @@ +#include "strscpy.h" +#include /* SSIZE_MAX */ + +ssize_t uv__strscpy(char* d, const char* s, size_t n) { + size_t i; + + for (i = 0; i < n; i++) + if ('\0' == (d[i] = s[i])) + return i > SSIZE_MAX ? UV_E2BIG : (ssize_t) i; + + if (i == 0) + return 0; + + d[--i] = '\0'; + + return UV_E2BIG; +} diff --git a/deps/uv/src/strscpy.h b/deps/uv/src/strscpy.h new file mode 100644 index 00000000000000..fbe0a393f20542 --- /dev/null +++ b/deps/uv/src/strscpy.h @@ -0,0 +1,18 @@ +#ifndef UV_STRSCPY_H_ +#define UV_STRSCPY_H_ + +/* Include uv.h for its definitions of size_t and ssize_t. + * size_t can be obtained directly from but ssize_t requires + * some hoop jumping on Windows that I didn't want to duplicate here. + */ +#include "uv.h" + +/* Copies up to |n-1| bytes from |d| to |s| and always zero-terminates + * the result, except when |n==0|. Returns the number of bytes copied + * or UV_E2BIG if |d| is too small. + * + * See https://www.kernel.org/doc/htmldocs/kernel-api/API-strscpy.html + */ +ssize_t uv__strscpy(char* d, const char* s, size_t n); + +#endif /* UV_STRSCPY_H_ */ diff --git a/deps/uv/src/timer.c b/deps/uv/src/timer.c index 2bf449a736c2bb..dd78bcbad9a986 100644 --- a/deps/uv/src/timer.c +++ b/deps/uv/src/timer.c @@ -152,7 +152,7 @@ int uv__next_timeout(const uv_loop_t* loop) { if (diff > INT_MAX) diff = INT_MAX; - return diff; + return (int) diff; } diff --git a/deps/uv/src/unix/aix.c b/deps/uv/src/unix/aix.c index baac8e6c0067d7..44c9cf5b639c31 100644 --- a/deps/uv/src/unix/aix.c +++ b/deps/uv/src/unix/aix.c @@ -358,19 +358,15 @@ void uv_loadavg(double avg[3]) { #ifdef HAVE_SYS_AHAFS_EVPRODS_H -static char *uv__rawname(char *cp) { - static char rawbuf[FILENAME_MAX+1]; - char *dp = rindex(cp, '/'); +static char* uv__rawname(const char* cp, char (*dst)[FILENAME_MAX+1]) { + char* dp; + dp = rindex(cp, '/'); if (dp == 0) return 0; - *dp = 0; - strcpy(rawbuf, cp); - *dp = '/'; - strcat(rawbuf, "/r"); - strcat(rawbuf, dp+1); - return rawbuf; + snprintf(*dst, sizeof(*dst), "%.*s/r%s", (int) (dp - cp), cp, dp + 1); + return *dst; } @@ -399,6 +395,7 @@ static int uv__path_is_a_directory(char* filename) { * Returns 0 if AHAFS is mounted, or an error code < 0 on failure */ static int uv__is_ahafs_mounted(void){ + char rawbuf[FILENAME_MAX+1]; int rv, i = 2; struct vmount *p; int size_multiplier = 10; @@ -432,7 +429,7 @@ static int uv__is_ahafs_mounted(void){ obj = vmt2dataptr(vmt, VMT_OBJECT); /* device */ stub = vmt2dataptr(vmt, VMT_STUB); /* mount point */ - if (EQ(obj, dev) || EQ(uv__rawname(obj), dev) || EQ(stub, dev)) { + if (EQ(obj, dev) || EQ(uv__rawname(obj, &rawbuf), dev) || EQ(stub, dev)) { uv__free(p); /* Found a match */ return 0; } @@ -453,7 +450,8 @@ static int uv__makedir_p(const char *dir) { size_t len; int err; - snprintf(tmp, sizeof(tmp),"%s",dir); + /* TODO(bnoordhuis) Check uv__strscpy() return value. */ + uv__strscpy(tmp, dir, sizeof(tmp)); len = strlen(tmp); if (tmp[len - 1] == '/') tmp[len - 1] = 0; @@ -702,9 +700,9 @@ static void uv__ahafs_event(uv_loop_t* loop, uv__io_t* event_watch, unsigned int else p++; } - strncpy(fname, p, sizeof(fname) - 1); - /* Just in case */ - fname[sizeof(fname) - 1] = '\0'; + + /* TODO(bnoordhuis) Check uv__strscpy() return value. */ + uv__strscpy(fname, p, sizeof(fname)); handle->cb(handle, fname, events, 0); } @@ -735,7 +733,8 @@ int uv_fs_event_start(uv_fs_event_t* handle, /* Figure out whether filename is absolute or not */ if (filename[0] == '/') { /* We have absolute pathname */ - snprintf(absolute_path, sizeof(absolute_path), "%s", filename); + /* TODO(bnoordhuis) Check uv__strscpy() return value. */ + uv__strscpy(absolute_path, filename, sizeof(absolute_path)); } else { /* We have a relative pathname, compose the absolute pathname */ snprintf(cwd, sizeof(cwd), "/proc/%lu/cwd", (unsigned long) getpid()); @@ -986,7 +985,8 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { return UV_ENOMEM; } - strcpy(cpu_id.name, FIRST_CPU); + /* TODO(bnoordhuis) Check uv__strscpy() return value. */ + uv__strscpy(cpu_id.name, FIRST_CPU, sizeof(cpu_id.name)); result = perfstat_cpu(&cpu_id, ps_cpus, sizeof(perfstat_cpu_t), ncpus); if (result == -1) { uv__free(ps_cpus); diff --git a/deps/uv/src/unix/darwin-proctitle.c b/deps/uv/src/unix/darwin-proctitle.c index 92d46b7466d43b..e505bdd23f8636 100644 --- a/deps/uv/src/unix/darwin-proctitle.c +++ b/deps/uv/src/unix/darwin-proctitle.c @@ -192,8 +192,7 @@ void uv__set_process_title(const char* title) { if (dynamic_pthread_setname_np != NULL) { char namebuf[64]; /* MAXTHREADNAMESIZE */ - strncpy(namebuf, title, sizeof(namebuf) - 1); - namebuf[sizeof(namebuf) - 1] = '\0'; + uv__strscpy(namebuf, title, sizeof(namebuf)); dynamic_pthread_setname_np(namebuf); } } diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c index 9068d4b115b646..d22c70f0c293d4 100644 --- a/deps/uv/src/unix/fs.c +++ b/deps/uv/src/unix/fs.c @@ -61,6 +61,7 @@ #if defined(__APPLE__) # include +# include #elif defined(__linux__) && !defined(FICLONE) # include # define FICLONE _IOW(0x94, 9, int) @@ -70,6 +71,10 @@ # include #endif +#if defined(_AIX) && _XOPEN_SOURCE <= 600 +extern char *mkdtemp(char *template); /* See issue #740 on AIX < 7 */ +#endif + #define INIT(subtype) \ do { \ if (req == NULL) \ @@ -722,7 +727,7 @@ static ssize_t uv__fs_utime(uv_fs_t* req) { atr.att_atimechg = 1; atr.att_mtime = req->mtime; atr.att_atime = req->atime; - return __lchattr(req->path, &atr, sizeof(atr)); + return __lchattr((char*) req->path, &atr, sizeof(atr)); #else errno = ENOSYS; return -1; @@ -793,26 +798,41 @@ static ssize_t uv__fs_write(uv_fs_t* req) { static ssize_t uv__fs_copyfile(uv_fs_t* req) { #if defined(__APPLE__) && !TARGET_OS_IPHONE /* On macOS, use the native copyfile(3). */ + static int can_clone; copyfile_flags_t flags; + char buf[64]; + size_t len; + int major; flags = COPYFILE_ALL; if (req->flags & UV_FS_COPYFILE_EXCL) flags |= COPYFILE_EXCL; -#ifdef COPYFILE_CLONE - if (req->flags & UV_FS_COPYFILE_FICLONE) - flags |= COPYFILE_CLONE; -#endif - + /* Check OS version. Cloning is only supported on macOS >= 10.12. */ if (req->flags & UV_FS_COPYFILE_FICLONE_FORCE) { -#ifdef COPYFILE_CLONE_FORCE - flags |= COPYFILE_CLONE_FORCE; -#else - return UV_ENOSYS; -#endif + if (can_clone == 0) { + len = sizeof(buf); + if (sysctlbyname("kern.osrelease", buf, &len, NULL, 0)) + return UV__ERR(errno); + + if (1 != sscanf(buf, "%d", &major)) + abort(); + + can_clone = -1 + 2 * (major >= 16); /* macOS >= 10.12 */ + } + + if (can_clone < 0) + return UV_ENOSYS; } + /* copyfile() simply ignores COPYFILE_CLONE if it's not supported. */ + if (req->flags & UV_FS_COPYFILE_FICLONE) + flags |= 1 << 24; /* COPYFILE_CLONE */ + + if (req->flags & UV_FS_COPYFILE_FICLONE_FORCE) + flags |= 1 << 25; /* COPYFILE_CLONE_FORCE */ + return copyfile(req->path, req->new_path, NULL, flags); #else uv_fs_t fs_req; diff --git a/deps/uv/src/unix/linux-core.c b/deps/uv/src/unix/linux-core.c index 991d1c60aee3dc..3341b94e1f26fd 100644 --- a/deps/uv/src/unix/linux-core.c +++ b/deps/uv/src/unix/linux-core.c @@ -170,6 +170,7 @@ int uv__io_check_fd(uv_loop_t* loop, int fd) { struct epoll_event e; int rc; + memset(&e, 0, sizeof(e)); e.events = POLLIN; e.data.fd = -1; @@ -218,6 +219,8 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { return; } + memset(&e, 0, sizeof(e)); + while (!QUEUE_EMPTY(&loop->watcher_queue)) { q = QUEUE_HEAD(&loop->watcher_queue); QUEUE_REMOVE(q); diff --git a/deps/uv/src/unix/linux-inotify.c b/deps/uv/src/unix/linux-inotify.c index 7797f842524ed3..9b26202fb3366d 100644 --- a/deps/uv/src/unix/linux-inotify.c +++ b/deps/uv/src/unix/linux-inotify.c @@ -278,6 +278,7 @@ int uv_fs_event_start(uv_fs_event_t* handle, const char* path, unsigned int flags) { struct watcher_list* w; + size_t len; int events; int err; int wd; @@ -306,12 +307,13 @@ int uv_fs_event_start(uv_fs_event_t* handle, if (w) goto no_insert; - w = uv__malloc(sizeof(*w) + strlen(path) + 1); + len = strlen(path) + 1; + w = uv__malloc(sizeof(*w) + len); if (w == NULL) return UV_ENOMEM; w->wd = wd; - w->path = strcpy((char*)(w + 1), path); + w->path = memcpy(w + 1, path, len); QUEUE_INIT(&w->watchers); w->iterating = 0; RB_INSERT(watcher_root, CAST(&handle->loop->inotify_watchers), w); diff --git a/deps/uv/src/unix/netbsd.c b/deps/uv/src/unix/netbsd.c index 4cfde1a586444c..a2a4e521542af3 100644 --- a/deps/uv/src/unix/netbsd.c +++ b/deps/uv/src/unix/netbsd.c @@ -87,7 +87,8 @@ int uv_exepath(char* buffer, size_t* size) { /* Copy string from the intermediate buffer to outer one with appropriate * length. */ - strlcpy(buffer, int_buf, *size); + /* TODO(bnoordhuis) Check uv__strscpy() return value. */ + uv__strscpy(buffer, int_buf, *size); /* Set new size. */ *size = strlen(buffer); diff --git a/deps/uv/src/unix/os390.c b/deps/uv/src/unix/os390.c index b43aebfc926940..dc146e31108108 100644 --- a/deps/uv/src/unix/os390.c +++ b/deps/uv/src/unix/os390.c @@ -229,15 +229,15 @@ static int getexe(const int pid, char* buf, size_t len) { assert(((Output_buf.Output_data.offsetPath >>24) & 0xFF) == 'A'); /* Get the offset from the lowest 3 bytes */ - Output_path = (char*)(&Output_buf) + - (Output_buf.Output_data.offsetPath & 0x00FFFFFF); + Output_path = (struct Output_path_type*) ((char*) (&Output_buf) + + (Output_buf.Output_data.offsetPath & 0x00FFFFFF)); if (Output_path->len >= len) { errno = ENOBUFS; return -1; } - strncpy(buf, Output_path->path, len); + uv__strscpy(buf, Output_path->path, len); return 0; } diff --git a/deps/uv/src/unix/pipe.c b/deps/uv/src/unix/pipe.c index e450a30e9c7e0c..d3b554cfc3d896 100644 --- a/deps/uv/src/unix/pipe.c +++ b/deps/uv/src/unix/pipe.c @@ -66,8 +66,7 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { sockfd = err; memset(&saddr, 0, sizeof saddr); - strncpy(saddr.sun_path, pipe_fname, sizeof(saddr.sun_path) - 1); - saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0'; + uv__strscpy(saddr.sun_path, pipe_fname, sizeof(saddr.sun_path)); saddr.sun_family = AF_UNIX; if (bind(sockfd, (struct sockaddr*)&saddr, sizeof saddr)) { @@ -186,8 +185,7 @@ void uv_pipe_connect(uv_connect_t* req, } memset(&saddr, 0, sizeof saddr); - strncpy(saddr.sun_path, name, sizeof(saddr.sun_path) - 1); - saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0'; + uv__strscpy(saddr.sun_path, name, sizeof(saddr.sun_path)); saddr.sun_family = AF_UNIX; do { diff --git a/deps/uv/src/unix/sunos.c b/deps/uv/src/unix/sunos.c index ec5ecd7d3ce6b9..2552a019eb474d 100644 --- a/deps/uv/src/unix/sunos.c +++ b/deps/uv/src/unix/sunos.c @@ -707,13 +707,14 @@ static int uv__set_phys_addr(uv_interface_address_t* address, struct sockaddr_dl* sa_addr; int sockfd; - int i; + size_t i; struct arpreq arpreq; /* This appears to only work as root */ sa_addr = (struct sockaddr_dl*)(ent->ifa_addr); memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr)); for (i = 0; i < sizeof(address->phys_addr); i++) { + /* Check that all bytes of phys_addr are zero. */ if (address->phys_addr[i] != 0) return 0; } diff --git a/deps/uv/src/uv-common.c b/deps/uv/src/uv-common.c index 71d100a162f4ca..952bde080c2864 100644 --- a/deps/uv/src/uv-common.c +++ b/deps/uv/src/uv-common.c @@ -162,7 +162,7 @@ static const char* uv__unknown_err_code(int err) { #define UV_ERR_NAME_GEN_R(name, _) \ case UV_## name: \ - snprintf(buf, buflen, "%s", #name); break; + uv__strscpy(buf, #name, buflen); break; char* uv_err_name_r(int err, char* buf, size_t buflen) { switch (err) { UV_ERRNO_MAP(UV_ERR_NAME_GEN_R) diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h index 5555f83aee4864..15ac4d02c1332b 100644 --- a/deps/uv/src/uv-common.h +++ b/deps/uv/src/uv-common.h @@ -40,6 +40,7 @@ #include "uv.h" #include "uv/tree.h" #include "queue.h" +#include "strscpy.h" #if EDOM > 0 # define UV__ERR(x) (-(x)) diff --git a/deps/uv/src/uv-data-getter-setters.c b/deps/uv/src/uv-data-getter-setters.c index 533e4a2fe12bb3..b7fcd4a7fd0ae4 100644 --- a/deps/uv/src/uv-data-getter-setters.c +++ b/deps/uv/src/uv-data-getter-setters.c @@ -3,11 +3,11 @@ const char* uv_handle_type_name(uv_handle_type type) { switch (type) { #define XX(uc,lc) case UV_##uc: return #lc; - UV_HANDLE_TYPE_MAP(XX) + UV_HANDLE_TYPE_MAP(XX) #undef XX - case UV_FILE: return "file"; - case UV_HANDLE_TYPE_MAX: - case UV_UNKNOWN_HANDLE: return NULL; + case UV_FILE: return "file"; + case UV_HANDLE_TYPE_MAX: + case UV_UNKNOWN_HANDLE: return NULL; } return NULL; } @@ -31,10 +31,12 @@ void uv_handle_set_data(uv_handle_t* handle, void* data) { const char* uv_req_type_name(uv_req_type type) { switch (type) { #define XX(uc,lc) case UV_##uc: return #lc; - UV_REQ_TYPE_MAP(XX) + UV_REQ_TYPE_MAP(XX) #undef XX - case UV_REQ_TYPE_MAX: - case UV_UNKNOWN_REQ: return NULL; + case UV_REQ_TYPE_MAX: + case UV_UNKNOWN_REQ: + default: /* UV_REQ_TYPE_PRIVATE */ + return NULL; } return NULL; } diff --git a/deps/uv/src/win/dl.c b/deps/uv/src/win/dl.c index 5b84555ca4d57f..676be4dc7b5b8a 100644 --- a/deps/uv/src/win/dl.c +++ b/deps/uv/src/win/dl.c @@ -64,7 +64,8 @@ void uv_dlclose(uv_lib_t* lib) { int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr) { - *ptr = (void*) GetProcAddress(lib->handle, name); + /* Cast though integer to suppress pedantic warning about forbidden cast. */ + *ptr = (void*)(uintptr_t) GetProcAddress(lib->handle, name); return uv__dlerror(lib, "", *ptr ? 0 : GetLastError()); } @@ -75,8 +76,9 @@ const char* uv_dlerror(const uv_lib_t* lib) { static void uv__format_fallback_error(uv_lib_t* lib, int errorno){ - DWORD_PTR args[1] = { (DWORD_PTR) errorno }; - LPSTR fallback_error = "error: %1!d!"; + static const CHAR fallback_error[] = "error: %1!d!"; + DWORD_PTR args[1]; + args[0] = (DWORD_PTR) errorno; FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY | diff --git a/deps/uv/src/win/fs-event.c b/deps/uv/src/win/fs-event.c index 25809ea4f2f605..1244967a78dacb 100644 --- a/deps/uv/src/win/fs-event.c +++ b/deps/uv/src/win/fs-event.c @@ -215,11 +215,11 @@ int uv_fs_event_start(uv_fs_event_t* handle, uv__free(long_path); long_path = NULL; } - } - if (long_path) { - uv__free(pathw); - pathw = long_path; + if (long_path) { + uv__free(pathw); + pathw = long_path; + } } dir_to_watch = pathw; diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c index 7ad0d077a6440b..0716ecca1221e6 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c @@ -98,14 +98,17 @@ return; \ } +#define MILLIONu (1000U * 1000U) +#define BILLIONu (1000U * 1000U * 1000U) + #define FILETIME_TO_UINT(filetime) \ - (*((uint64_t*) &(filetime)) - 116444736000000000ULL) + (*((uint64_t*) &(filetime)) - (uint64_t) 116444736 * BILLIONu) #define FILETIME_TO_TIME_T(filetime) \ - (FILETIME_TO_UINT(filetime) / 10000000ULL) + (FILETIME_TO_UINT(filetime) / (10u * MILLIONu)) #define FILETIME_TO_TIME_NS(filetime, secs) \ - ((FILETIME_TO_UINT(filetime) - (secs * 10000000ULL)) * 100) + ((FILETIME_TO_UINT(filetime) - (secs * (uint64_t) 10 * MILLIONu)) * 100U) #define FILETIME_TO_TIMESPEC(ts, filetime) \ do { \ @@ -115,8 +118,8 @@ #define TIME_T_TO_FILETIME(time, filetime_ptr) \ do { \ - uint64_t bigtime = ((uint64_t) ((time) * 10000000ULL)) + \ - 116444736000000000ULL; \ + uint64_t bigtime = ((uint64_t) ((time) * (uint64_t) 10 * MILLIONu)) + \ + (uint64_t) 116444736 * BILLIONu; \ (filetime_ptr)->dwLowDateTime = bigtime & 0xFFFFFFFF; \ (filetime_ptr)->dwHighDateTime = bigtime >> 32; \ } while(0) @@ -507,6 +510,33 @@ void fs__open(uv_fs_t* req) { } if (flags & UV_FS_O_DIRECT) { + /* + * FILE_APPEND_DATA and FILE_FLAG_NO_BUFFERING are mutually exclusive. + * Windows returns 87, ERROR_INVALID_PARAMETER if these are combined. + * + * FILE_APPEND_DATA is included in FILE_GENERIC_WRITE: + * + * FILE_GENERIC_WRITE = STANDARD_RIGHTS_WRITE | + * FILE_WRITE_DATA | + * FILE_WRITE_ATTRIBUTES | + * FILE_WRITE_EA | + * FILE_APPEND_DATA | + * SYNCHRONIZE + * + * Note: Appends are also permitted by FILE_WRITE_DATA. + * + * In order for direct writes and direct appends to succeed, we therefore + * exclude FILE_APPEND_DATA if FILE_WRITE_DATA is specified, and otherwise + * fail if the user's sole permission is a direct append, since this + * particular combination is invalid. + */ + if (access & FILE_APPEND_DATA) { + if (access & FILE_WRITE_DATA) { + access &= ~FILE_APPEND_DATA; + } else { + goto einval; + } + } attributes |= FILE_FLAG_NO_BUFFERING; } @@ -788,9 +818,8 @@ void fs__unlink(uv_fs_t* req) { /* Remove read-only attribute */ FILE_BASIC_INFORMATION basic = { 0 }; - basic.FileAttributes = info.dwFileAttributes - & ~(FILE_ATTRIBUTE_READONLY) - | FILE_ATTRIBUTE_ARCHIVE; + basic.FileAttributes = (info.dwFileAttributes & ~FILE_ATTRIBUTE_READONLY) | + FILE_ATTRIBUTE_ARCHIVE; status = pNtSetInformationFile(handle, &iosb, @@ -1201,7 +1230,7 @@ INLINE static int fs__stat_handle(HANDLE handle, uv_stat_t* statbuf, /* st_blocks contains the on-disk allocation size in 512-byte units. */ statbuf->st_blocks = - file_info.StandardInformation.AllocationSize.QuadPart >> 9ULL; + (uint64_t) file_info.StandardInformation.AllocationSize.QuadPart >> 9; statbuf->st_nlink = file_info.StandardInformation.NumberOfLinks; @@ -1958,7 +1987,7 @@ static void fs__readlink(uv_fs_t* req) { } -static size_t fs__realpath_handle(HANDLE handle, char** realpath_ptr) { +static ssize_t fs__realpath_handle(HANDLE handle, char** realpath_ptr) { int r; DWORD w_realpath_len; WCHAR* w_realpath_ptr = NULL; diff --git a/deps/uv/src/win/pipe.c b/deps/uv/src/win/pipe.c index 9a3cbc8a1e26e1..e303cc8a2331e7 100644 --- a/deps/uv/src/win/pipe.c +++ b/deps/uv/src/win/pipe.c @@ -1541,7 +1541,7 @@ int uv__pipe_write_ipc(uv_loop_t* loop, frame_header.flags |= UV__IPC_FRAME_HAS_SOCKET_XFER; break; default: - assert(0); // Unreachable. + assert(0); /* Unreachable. */ } /* Add xfer info buffer. */ bufs[buf_index++] = uv_buf_init((char*) &xfer_info, sizeof xfer_info); @@ -2141,7 +2141,7 @@ int uv_pipe_open(uv_pipe_t* pipe, uv_file file) { if (pipe->ipc) { assert(!(pipe->flags & UV_HANDLE_NON_OVERLAPPED_PIPE)); pipe->pipe.conn.ipc_remote_pid = uv_os_getppid(); - assert(pipe->pipe.conn.ipc_remote_pid != -1); + assert(pipe->pipe.conn.ipc_remote_pid != (DWORD) -1); } return 0; } @@ -2312,7 +2312,7 @@ uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle) { } int uv_pipe_chmod(uv_pipe_t* handle, int mode) { - SID_IDENTIFIER_AUTHORITY sid_world = SECURITY_WORLD_SID_AUTHORITY; + SID_IDENTIFIER_AUTHORITY sid_world = { SECURITY_WORLD_SID_AUTHORITY }; PACL old_dacl, new_dacl; PSECURITY_DESCRIPTOR sd; EXPLICIT_ACCESS ea; diff --git a/deps/uv/src/win/poll.c b/deps/uv/src/win/poll.c index 77eb071c85a338..3c6678600e40cc 100644 --- a/deps/uv/src/win/poll.c +++ b/deps/uv/src/win/poll.c @@ -75,7 +75,7 @@ static AFD_POLL_INFO* uv__get_afd_poll_info_dummy(void) { static void uv__fast_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) { uv_req_t* req; AFD_POLL_INFO* afd_poll_info; - DWORD result; + int result; /* Find a yet unsubmitted req to submit. */ if (handle->submitted_events_1 == 0) { @@ -136,7 +136,7 @@ static void uv__fast_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) { static int uv__fast_poll_cancel_poll_req(uv_loop_t* loop, uv_poll_t* handle) { AFD_POLL_INFO afd_poll_info; - DWORD result; + int result; afd_poll_info.Exclusive = TRUE; afd_poll_info.NumberOfHandles = 1; diff --git a/deps/uv/src/win/process.c b/deps/uv/src/win/process.c index e7cccd9c80123f..f9c53de0af0079 100644 --- a/deps/uv/src/win/process.c +++ b/deps/uv/src/win/process.c @@ -739,7 +739,7 @@ int make_program_env(char* env_block[], WCHAR** dst_ptr) { } } *ptr_copy = NULL; - assert(env_len == ptr - dst_copy); + assert(env_len == (size_t) (ptr - dst_copy)); /* sort our (UTF-16) copy */ qsort(env_copy, env_block_count-1, sizeof(wchar_t*), qsort_wcscmp); @@ -799,7 +799,7 @@ int make_program_env(char* env_block[], WCHAR** dst_ptr) { var_size = GetEnvironmentVariableW(required_vars[i].wide, ptr, (int) (env_len - (ptr - dst))); - if (var_size != len-1) { /* race condition? */ + if (var_size != (DWORD) (len - 1)) { /* TODO: handle race condition? */ uv_fatal_error(GetLastError(), "GetEnvironmentVariableW"); } } @@ -815,7 +815,7 @@ int make_program_env(char* env_block[], WCHAR** dst_ptr) { } /* Terminate with an extra NULL. */ - assert(env_len == (ptr - dst)); + assert(env_len == (size_t) (ptr - dst)); *ptr = L'\0'; uv__free(dst_copy); diff --git a/deps/uv/src/win/tty.c b/deps/uv/src/win/tty.c index 398288ec1de53b..45bbe9689aea1d 100644 --- a/deps/uv/src/win/tty.c +++ b/deps/uv/src/win/tty.c @@ -791,8 +791,9 @@ void uv_process_tty_read_raw_req(uv_loop_t* loop, uv_tty_t* handle, if (KEV.uChar.UnicodeChar >= 0xDC00 && KEV.uChar.UnicodeChar < 0xE000) { /* UTF-16 surrogate pair */ - WCHAR utf16_buffer[2] = { handle->tty.rd.last_utf16_high_surrogate, - KEV.uChar.UnicodeChar}; + WCHAR utf16_buffer[2]; + utf16_buffer[0] = handle->tty.rd.last_utf16_high_surrogate; + utf16_buffer[1] = KEV.uChar.UnicodeChar; char_len = WideCharToMultiByte(CP_UTF8, 0, utf16_buffer, diff --git a/deps/uv/src/win/winapi.h b/deps/uv/src/win/winapi.h index cfbac52eb1d6f4..2a8adf6b262463 100644 --- a/deps/uv/src/win/winapi.h +++ b/deps/uv/src/win/winapi.h @@ -4109,6 +4109,9 @@ #endif /* from winternl.h */ +#if !defined(__UNICODE_STRING_DEFINED) && defined(__MINGW32_) +#define __UNICODE_STRING_DEFINED +#endif typedef struct _UNICODE_STRING { USHORT Length; USHORT MaximumLength; diff --git a/deps/uv/test/run-tests.c b/deps/uv/test/run-tests.c index 42bde0bb96476d..2a699f46dcb0ff 100644 --- a/deps/uv/test/run-tests.c +++ b/deps/uv/test/run-tests.c @@ -142,11 +142,11 @@ static int maybe_run_test(int argc, char **argv) { if (strcmp(argv[1], "spawn_helper5") == 0) { const char out[] = "fourth stdio!\n"; notify_parent_process(); + { #ifdef _WIN32 - DWORD bytes; - WriteFile((HANDLE) _get_osfhandle(3), out, sizeof(out) - 1, &bytes, NULL); + DWORD bytes; + WriteFile((HANDLE) _get_osfhandle(3), out, sizeof(out) - 1, &bytes, NULL); #else - { ssize_t r; do @@ -154,8 +154,8 @@ static int maybe_run_test(int argc, char **argv) { while (r == -1 && errno == EINTR); fsync(3); - } #endif + } return 1; } diff --git a/deps/uv/test/runner-win.c b/deps/uv/test/runner-win.c index e3e91a7b69ca62..f60c23df3ebf1e 100644 --- a/deps/uv/test/runner-win.c +++ b/deps/uv/test/runner-win.c @@ -194,7 +194,7 @@ int process_wait(process_info_t *vec, int n, int timeout) { result = WaitForMultipleObjects(n, handles, TRUE, timeout_api); - if (result >= WAIT_OBJECT_0 && result < WAIT_OBJECT_0 + n) { + if (result < WAIT_OBJECT_0 + n) { /* All processes are terminated. */ return 0; } @@ -268,7 +268,8 @@ int process_read_last_line(process_info_t *p, if (!ReadFile(p->stdio_out, buffer, buffer_len - 1, &read, &overlapped)) return -1; - for (start = read - 1; start >= 0; start--) { + start = read; + while (start-- > 0) { if (buffer[start] == '\n' || buffer[start] == '\r') break; } @@ -308,7 +309,7 @@ void process_cleanup(process_info_t *p) { } -static int clear_line() { +static int clear_line(void) { HANDLE handle; CONSOLE_SCREEN_BUFFER_INFO info; COORD coord; diff --git a/deps/uv/test/runner-win.h b/deps/uv/test/runner-win.h index 8cc4c16eb22eac..975eed793104c2 100644 --- a/deps/uv/test/runner-win.h +++ b/deps/uv/test/runner-win.h @@ -20,7 +20,9 @@ */ /* Don't complain about write(), fileno() etc. being deprecated. */ +#ifdef _MSC_VER #pragma warning(disable : 4996) +#endif #include diff --git a/deps/uv/test/test-close-fd.c b/deps/uv/test/test-close-fd.c index 93a7bd7c021026..2ed9a10032dfe6 100644 --- a/deps/uv/test/test-close-fd.c +++ b/deps/uv/test/test-close-fd.c @@ -73,4 +73,8 @@ TEST_IMPL(close_fd) { return 0; } -#endif /* !defined(_WIN32) */ +#else + +typedef int file_has_no_tests; /* ISO C forbids an empty translation unit. */ + +#endif /* !_WIN32 */ diff --git a/deps/uv/test/test-condvar.c b/deps/uv/test/test-condvar.c index 50f3c047c00cd2..32abccc2e7602e 100644 --- a/deps/uv/test/test-condvar.c +++ b/deps/uv/test/test-condvar.c @@ -235,7 +235,7 @@ TEST_IMPL(condvar_5) { uint64_t elapsed; uint64_t timeout; - timeout = 100 * 1e6; /* 100 ms in ns */ + timeout = 100 * 1000 * 1000; /* 100 ms in ns */ /* Mostly irrelevant. We need cond and mutex initialized. */ worker_config_init(&wc, 0, NULL, NULL); diff --git a/deps/uv/test/test-emfile.c b/deps/uv/test/test-emfile.c index 8e44ac5c77877d..bc1fce5f5591f0 100644 --- a/deps/uv/test/test-emfile.c +++ b/deps/uv/test/test-emfile.c @@ -38,6 +38,11 @@ static uv_tcp_t client_handle; TEST_IMPL(emfile) { + struct sockaddr_in addr; + struct rlimit limits; + uv_connect_t connect_req; + uv_loop_t* loop; + int first_fd; #if defined(_AIX) || defined(__MVS__) /* On AIX, if a 'accept' call fails ECONNRESET is set on the socket * which causes uv__emfile_trick to not work as intended and this test @@ -45,11 +50,6 @@ TEST_IMPL(emfile) { */ RETURN_SKIP("uv__emfile_trick does not work on this OS"); #endif - struct sockaddr_in addr; - struct rlimit limits; - uv_connect_t connect_req; - uv_loop_t* loop; - int first_fd; /* Lower the file descriptor limit and use up all fds save one. */ limits.rlim_cur = limits.rlim_max = maxfd + 1; @@ -114,4 +114,8 @@ static void connect_cb(uv_connect_t* req, int status) { uv_close((uv_handle_t*) &client_handle, NULL); } -#endif /* !defined(_WIN32) */ +#else + +typedef int file_has_no_tests; /* ISO C forbids an empty translation unit. */ + +#endif /* !_WIN32 */ diff --git a/deps/uv/test/test-fork.c b/deps/uv/test/test-fork.c index f47ae3e656299e..9e4684f0e15376 100644 --- a/deps/uv/test/test-fork.c +++ b/deps/uv/test/test-fork.c @@ -676,5 +676,8 @@ TEST_IMPL(fork_threadpool_queue_work_simple) { } #endif /* !__MVS__ */ +#else + +typedef int file_has_no_tests; /* ISO C forbids an empty translation unit. */ #endif /* !_WIN32 */ diff --git a/deps/uv/test/test-fs.c b/deps/uv/test/test-fs.c index 038d2dd6159245..5eed160de2e64b 100644 --- a/deps/uv/test/test-fs.c +++ b/deps/uv/test/test-fs.c @@ -154,7 +154,7 @@ int uv_test_getiovmax(void) { static unsigned REPARSE_TAG = 0x9913; static GUID REPARSE_GUID = { 0x1bf6205f, 0x46ae, 0x4527, - 0xb1, 0x0c, 0xc5, 0x09, 0xb7, 0x55, 0x22, 0x80 }; + { 0xb1, 0x0c, 0xc5, 0x09, 0xb7, 0x55, 0x22, 0x80 }}; #endif static void check_permission(const char* filename, unsigned int mode) { @@ -2331,9 +2331,6 @@ TEST_IMPL(fs_stat_root) { TEST_IMPL(fs_futime) { -#if defined(_AIX) && !defined(_AIX71) - RETURN_SKIP("futime is not implemented for AIX versions below 7.1"); -#else utime_check_t checkme; const char* path = "test_file"; double atime; @@ -2341,6 +2338,9 @@ TEST_IMPL(fs_futime) { uv_file file; uv_fs_t req; int r; +#if defined(_AIX) && !defined(_AIX71) + RETURN_SKIP("futime is not implemented for AIX versions below 7.1"); +#endif /* Setup. */ loop = uv_default_loop(); @@ -2402,7 +2402,6 @@ TEST_IMPL(fs_futime) { MAKE_VALGRIND_HAPPY(); return 0; -#endif } @@ -3601,6 +3600,53 @@ TEST_IMPL(fs_exclusive_sharing_mode) { } #endif +#ifdef _WIN32 +TEST_IMPL(fs_file_flag_no_buffering) { + int r; + + /* Setup. */ + unlink("test_file"); + + ASSERT(UV_FS_O_APPEND > 0); + ASSERT(UV_FS_O_CREAT > 0); + ASSERT(UV_FS_O_DIRECT > 0); + ASSERT(UV_FS_O_RDWR > 0); + + /* FILE_APPEND_DATA must be excluded from FILE_GENERIC_WRITE: */ + r = uv_fs_open(NULL, + &open_req1, + "test_file", + UV_FS_O_RDWR | UV_FS_O_CREAT | UV_FS_O_DIRECT, + S_IWUSR | S_IRUSR, + NULL); + ASSERT(r >= 0); + ASSERT(open_req1.result >= 0); + uv_fs_req_cleanup(&open_req1); + + r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); + ASSERT(r == 0); + ASSERT(close_req.result == 0); + uv_fs_req_cleanup(&close_req); + + /* FILE_APPEND_DATA and FILE_FLAG_NO_BUFFERING are mutually exclusive: */ + r = uv_fs_open(NULL, + &open_req2, + "test_file", + UV_FS_O_APPEND | UV_FS_O_DIRECT, + S_IWUSR | S_IRUSR, + NULL); + ASSERT(r == UV_EINVAL); + ASSERT(open_req2.result == UV_EINVAL); + uv_fs_req_cleanup(&open_req2); + + /* Cleanup */ + unlink("test_file"); + + MAKE_VALGRIND_HAPPY(); + return 0; +} +#endif + #ifdef _WIN32 int call_icacls(const char* command, ...) { char icacls_command[1024]; diff --git a/deps/uv/test/test-ip4-addr.c b/deps/uv/test/test-ip4-addr.c index 3d6e0cf286ac90..c72f36a694455d 100644 --- a/deps/uv/test/test-ip4-addr.c +++ b/deps/uv/test/test-ip4-addr.c @@ -27,8 +27,13 @@ TEST_IMPL(ip4_addr) { - struct sockaddr_in addr; + char dst[16]; + + ASSERT(0 == uv_inet_ntop(AF_INET, "\xFF\xFF\xFF\xFF", dst, sizeof(dst))); + ASSERT(0 == strcmp(dst, "255.255.255.255")); + ASSERT(UV_ENOSPC == uv_inet_ntop(AF_INET, "\xFF\xFF\xFF\xFF", + dst, sizeof(dst) - 1)); ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); ASSERT(0 == uv_ip4_addr("255.255.255.255", TEST_PORT, &addr)); diff --git a/deps/uv/test/test-ip6-addr.c b/deps/uv/test/test-ip6-addr.c index 25570dcacde1e3..bbf33a4854ed23 100644 --- a/deps/uv/test/test-ip6-addr.c +++ b/deps/uv/test/test-ip6-addr.c @@ -83,7 +83,7 @@ TEST_IMPL(ip6_addr_link_local) { ASSERT(0 == r); #ifdef _WIN32 /* On Windows, the interface identifier is the numeric string of the index. */ - ASSERT(strtol(interface_id, NULL, 10) == iface_index); + ASSERT(strtoul(interface_id, NULL, 10) == iface_index); #else /* On Unix/Linux, the interface identifier is the interface device name. */ ASSERT(0 == strcmp(device_name, interface_id)); diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h index 46db4b2710138f..cc37bc039b15ba 100644 --- a/deps/uv/test/test-list.h +++ b/deps/uv/test/test-list.h @@ -349,9 +349,11 @@ TEST_DECLARE (fs_null_req) TEST_DECLARE (fs_read_dir) #ifdef _WIN32 TEST_DECLARE (fs_exclusive_sharing_mode) +TEST_DECLARE (fs_file_flag_no_buffering) TEST_DECLARE (fs_open_readonly_acl) TEST_DECLARE (fs_fchmod_archive_readonly) #endif +TEST_DECLARE (strscpy) TEST_DECLARE (threadpool_queue_work_simple) TEST_DECLARE (threadpool_queue_work_einval) TEST_DECLARE (threadpool_multiple_event_loops) @@ -904,11 +906,13 @@ TASK_LIST_START TEST_ENTRY (fs_read_dir) #ifdef _WIN32 TEST_ENTRY (fs_exclusive_sharing_mode) + TEST_ENTRY (fs_file_flag_no_buffering) TEST_ENTRY (fs_open_readonly_acl) TEST_ENTRY (fs_fchmod_archive_readonly) #endif TEST_ENTRY (get_osfhandle_valid_handle) TEST_ENTRY (open_osfhandle_valid_handle) + TEST_ENTRY (strscpy) TEST_ENTRY (threadpool_queue_work_simple) TEST_ENTRY (threadpool_queue_work_einval) TEST_ENTRY (threadpool_multiple_event_loops) diff --git a/deps/uv/test/test-pipe-close-stdout-read-stdin.c b/deps/uv/test/test-pipe-close-stdout-read-stdin.c index c8804b0e189249..126be2cc46f0e3 100644 --- a/deps/uv/test/test-pipe-close-stdout-read-stdin.c +++ b/deps/uv/test/test-pipe-close-stdout-read-stdin.c @@ -105,4 +105,8 @@ TEST_IMPL(pipe_close_stdout_read_stdin) { return 0; } +#else + +typedef int file_has_no_tests; /* ISO C forbids an empty translation unit. */ + #endif /* ifndef _WIN32 */ diff --git a/deps/uv/test/test-platform-output.c b/deps/uv/test/test-platform-output.c index 4025fba540e61e..43ed119debfe69 100644 --- a/deps/uv/test/test-platform-output.c +++ b/deps/uv/test/test-platform-output.c @@ -49,7 +49,7 @@ TEST_IMPL(platform_output) { printf("uv_cwd: %s\n", buffer); err = uv_resident_set_memory(&rss); -#if defined(__CYGWIN__) || defined(__MSYS__) +#if defined(__MSYS__) ASSERT(err == UV_ENOSYS); #else ASSERT(err == 0); diff --git a/deps/uv/test/test-poll-close-doesnt-corrupt-stack.c b/deps/uv/test/test-poll-close-doesnt-corrupt-stack.c index 1dfc80e352b5cc..3393820fc40d77 100644 --- a/deps/uv/test/test-poll-close-doesnt-corrupt-stack.c +++ b/deps/uv/test/test-poll-close-doesnt-corrupt-stack.c @@ -49,7 +49,7 @@ static void poll_cb(uv_poll_t* h, int status, int events) { } -static void NO_INLINE close_socket_and_verify_stack() { +static void NO_INLINE close_socket_and_verify_stack(void) { const uint32_t MARKER = 0xDEADBEEF; const int VERIFY_AFTER = 10; /* ms */ int r; diff --git a/deps/uv/test/test-poll-oob.c b/deps/uv/test/test-poll-oob.c index 2a6da843c616ad..77ffe31e962f10 100644 --- a/deps/uv/test/test-poll-oob.c +++ b/deps/uv/test/test-poll-oob.c @@ -202,4 +202,9 @@ TEST_IMPL(poll_oob) { MAKE_VALGRIND_HAPPY(); return 0; } + +#else + +typedef int file_has_no_tests; /* ISO C forbids an empty translation unit. */ + #endif diff --git a/deps/uv/test/test-process-title-threadsafe.c b/deps/uv/test/test-process-title-threadsafe.c index c0dee48a79f22f..19098eda0c4019 100644 --- a/deps/uv/test/test-process-title-threadsafe.c +++ b/deps/uv/test/test-process-title-threadsafe.c @@ -70,7 +70,7 @@ TEST_IMPL(process_title_threadsafe) { #if defined(__sun) || defined(__CYGWIN__) || defined(__MSYS__) || \ defined(__MVS__) RETURN_SKIP("uv_(get|set)_process_title is not implemented."); -#else +#endif ASSERT(0 == uv_set_process_title(titles[0])); ASSERT(0 == uv_thread_create(&getter_thread, getter_thread_body, NULL)); @@ -82,5 +82,4 @@ TEST_IMPL(process_title_threadsafe) { ASSERT(0 == uv_thread_join(&setter_threads[i])); return 0; -#endif } diff --git a/deps/uv/test/test-process-title.c b/deps/uv/test/test-process-title.c index 886f83a7d30fe1..efd48142b707bf 100644 --- a/deps/uv/test/test-process-title.c +++ b/deps/uv/test/test-process-title.c @@ -62,7 +62,8 @@ static void uv_get_process_title_edge_cases(void) { TEST_IMPL(process_title) { #if defined(__sun) || defined(__CYGWIN__) || defined(__MSYS__) RETURN_SKIP("uv_(get|set)_process_title is not implemented."); -#else +#endif + /* Check for format string vulnerabilities. */ set_title("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"); set_title("new title"); @@ -71,5 +72,4 @@ TEST_IMPL(process_title) { uv_get_process_title_edge_cases(); return 0; -#endif } diff --git a/deps/uv/test/test-signal-multiple-loops.c b/deps/uv/test/test-signal-multiple-loops.c index 79242fc9fa99e7..4281d23d7223ab 100644 --- a/deps/uv/test/test-signal-multiple-loops.c +++ b/deps/uv/test/test-signal-multiple-loops.c @@ -295,4 +295,8 @@ TEST_IMPL(signal_multiple_loops) { return 0; } -#endif /* !_WIN32 */ +#else + +typedef int file_has_no_tests; /* ISO C forbids an empty translation unit. */ + +#endif /* !_WIN32 */ diff --git a/deps/uv/test/test-spawn.c b/deps/uv/test/test-spawn.c index 594a64c60b8d5a..05c76f61452400 100644 --- a/deps/uv/test/test-spawn.c +++ b/deps/uv/test/test-spawn.c @@ -49,7 +49,9 @@ static char exepath[1024]; static size_t exepath_size = 1024; static char* args[5]; static int no_term_signal; +#ifndef _WIN32 static int timer_counter; +#endif static uv_tcp_t tcp_server; #define OUTPUT_SIZE 1024 @@ -138,10 +140,12 @@ static void on_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { } +#ifndef _WIN32 static void on_read_once(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { uv_read_stop(tcp); on_read(tcp, nread, buf); } +#endif static void write_cb(uv_write_t* req, int status) { @@ -173,9 +177,11 @@ static void timer_cb(uv_timer_t* handle) { } +#ifndef _WIN32 static void timer_counter_cb(uv_timer_t* handle) { ++timer_counter; } +#endif TEST_IMPL(spawn_fails) { @@ -1198,7 +1204,7 @@ TEST_IMPL(argument_escaping) { int make_program_env(char** env_block, WCHAR** dst_ptr); TEST_IMPL(environment_creation) { - int i; + size_t i; char* environment[] = { "FOO=BAR", "SYSTEM=ROOT", /* substring of a supplied var name */ diff --git a/deps/uv/test/test-strscpy.c b/deps/uv/test/test-strscpy.c new file mode 100644 index 00000000000000..4e7db6ffec8ef2 --- /dev/null +++ b/deps/uv/test/test-strscpy.c @@ -0,0 +1,53 @@ +/* Copyright libuv project contributors. All rights reserved. +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to +* deal in the Software without restriction, including without limitation the +* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +* sell copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +*/ + +#include "uv.h" +#include "task.h" +#include + +#include "../src/strscpy.h" +#include "../src/strscpy.c" + +TEST_IMPL(strscpy) { + char d[4]; + + ASSERT(0 == uv__strscpy(d, "", 0)); + ASSERT(0 == uv__strscpy(d, "x", 0)); + + memset(d, 0, sizeof(d)); + ASSERT(1 == uv__strscpy(d, "x", sizeof(d))); + ASSERT(0 == memcmp(d, "x\0\0", sizeof(d))); + + memset(d, 0, sizeof(d)); + ASSERT(2 == uv__strscpy(d, "xy", sizeof(d))); + ASSERT(0 == memcmp(d, "xy\0", sizeof(d))); + + ASSERT(3 == uv__strscpy(d, "xyz", sizeof(d))); + ASSERT(0 == memcmp(d, "xyz", sizeof(d))); + + ASSERT(UV_E2BIG == uv__strscpy(d, "xyzz", sizeof(d))); + ASSERT(0 == memcmp(d, "xyz", sizeof(d))); + + ASSERT(UV_E2BIG == uv__strscpy(d, "xyzzy", sizeof(d))); + ASSERT(0 == memcmp(d, "xyz", sizeof(d))); + + return 0; +} diff --git a/deps/uv/test/test-tcp-close-accept.c b/deps/uv/test/test-tcp-close-accept.c index e4878398c8b98e..624262bcfe9000 100644 --- a/deps/uv/test/test-tcp-close-accept.c +++ b/deps/uv/test/test-tcp-close-accept.c @@ -191,4 +191,8 @@ TEST_IMPL(tcp_close_accept) { return 0; } -#endif /* !_WIN32 */ +#else + +typedef int file_has_no_tests; /* ISO C forbids an empty translation unit. */ + +#endif /* !_WIN32 */ diff --git a/deps/uv/test/test-tcp-oob.c b/deps/uv/test/test-tcp-oob.c index ca2361f9bb776d..53f8231e83e497 100644 --- a/deps/uv/test/test-tcp-oob.c +++ b/deps/uv/test/test-tcp-oob.c @@ -138,4 +138,9 @@ TEST_IMPL(tcp_oob) { MAKE_VALGRIND_HAPPY(); return 0; } -#endif + +#else + +typedef int file_has_no_tests; /* ISO C forbids an empty translation unit. */ + +#endif /* !_WIN32 */ diff --git a/deps/uv/test/test-tcp-write-after-connect.c b/deps/uv/test/test-tcp-write-after-connect.c index aa03228f134c15..8198e7e184d5e4 100644 --- a/deps/uv/test/test-tcp-write-after-connect.c +++ b/deps/uv/test/test-tcp-write-after-connect.c @@ -65,4 +65,8 @@ TEST_IMPL(tcp_write_after_connect) { return 0; } -#endif +#else + +typedef int file_has_no_tests; /* ISO C forbids an empty translation unit. */ + +#endif /* !_WIN32 */ diff --git a/deps/uv/test/test-tty.c b/deps/uv/test/test-tty.c index 979a6ec38d7fcd..688711e5082116 100644 --- a/deps/uv/test/test-tty.c +++ b/deps/uv/test/test-tty.c @@ -315,10 +315,8 @@ TEST_IMPL(tty_raw_cancel) { int r; int ttyin_fd; uv_tty_t tty_in; - uv_loop_t* loop; HANDLE handle; - loop = uv_default_loop(); /* Make sure we have an FD that refers to a tty */ handle = CreateFileA("conin$", GENERIC_READ | GENERIC_WRITE, diff --git a/deps/uv/test/test.gyp b/deps/uv/test/test.gyp index 098512208c3cf8..ae7dc0d628f6e4 100644 --- a/deps/uv/test/test.gyp +++ b/deps/uv/test/test.gyp @@ -34,6 +34,7 @@ 'test-fs.c', 'test-fs-copyfile.c', 'test-fs-event.c', + 'test-fs-poll.c', 'test-getters-setters.c', 'test-get-currentexe.c', 'test-get-memory.c', @@ -96,7 +97,7 @@ 'test-signal-multiple-loops.c', 'test-socket-buffer-size.c', 'test-spawn.c', - 'test-fs-poll.c', + 'test-strscpy.c', 'test-stdio-over-pipes.c', 'test-tcp-alloc-cb-fail.c', 'test-tcp-bind-error.c', diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp index 746d1ed5416322..0836dd27f2b72a 100644 --- a/deps/uv/uv.gyp +++ b/deps/uv/uv.gyp @@ -74,6 +74,8 @@ 'src/idna.h', 'src/inet.c', 'src/queue.h', + 'src/strscpy.c', + 'src/strscpy.h', 'src/threadpool.c', 'src/timer.c', 'src/uv-data-getter-setters.c', From 8279826ce6c6690d655db493c84f936fd34cfa94 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 6 Dec 2018 16:52:33 +0100 Subject: [PATCH 28/59] test: verify input flags This makes sure all required flags are passed through to the test. If that's not the case an error is thrown to inform the user what flag is missing. PR-URL: https://github.com/nodejs/node/pull/24876 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott --- test/common/index.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/test/common/index.js b/test/common/index.js index aea33b4c7f078d..d71af30f10a2bd 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -45,6 +45,44 @@ const isMainThread = (() => { } })(); +// Check for flags. Skip this for workers (both, the `cluster` module and +// `worker_threads`) and child processes. +if (process.argv.length === 2 && + isMainThread && + module.parent && + require('cluster').isMaster) { + // The copyright notice is relatively big and the flags could come afterwards. + const bytesToRead = 1500; + const buffer = Buffer.allocUnsafe(bytesToRead); + const fd = fs.openSync(module.parent.filename, 'r'); + fs.readSync(fd, buffer, 0, bytesToRead); + fs.closeSync(fd); + const source = buffer.toString(); + + const flagStart = source.indexOf('// Flags: --') + 10; + if (flagStart !== 9) { + let flagEnd = source.indexOf('\n', flagStart); + // Normalize different EOL. + if (source[flagEnd - 1] === '\r') { + flagEnd--; + } + const flags = source + .substring(flagStart, flagEnd) + .replace(/_/g, '-') + .split(' '); + const args = process.execArgv.map((arg) => arg.replace(/_/g, '-')); + for (const flag of flags) { + if (!args.includes(flag) && + // If the binary is build without `intl` the inspect option is + // invalid. The test itself should handle this case. + (process.config.variables.v8_enable_inspector !== 0 || + !flag.startsWith('--inspect'))) { + throw new Error(`Test has to be started with the flag: '${flag}'`); + } + } + } +} + const isWindows = process.platform === 'win32'; const isAIX = process.platform === 'aix'; const isLinuxPPCBE = (process.platform === 'linux') && From d09e3335a6fb00233f27e8b85de215a9d8961fb8 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 17 Dec 2018 10:59:37 -0500 Subject: [PATCH 29/59] test: remove obsolete eslint comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The surrounding code was updated, making these eslint-disable comments obsolete. PR-URL: https://github.com/nodejs/node/pull/25088 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Anto Aravinth Reviewed-By: Michaël Zasso Reviewed-By: James M Snell --- test/js-native-api/test_general/testInstanceOf.js | 1 - ...est-require-extensions-same-filename-as-dir-trailing-slash.js | 1 - 2 files changed, 2 deletions(-) diff --git a/test/js-native-api/test_general/testInstanceOf.js b/test/js-native-api/test_general/testInstanceOf.js index 562152caa6bd1f..fb5b6334948182 100644 --- a/test/js-native-api/test_general/testInstanceOf.js +++ b/test/js-native-api/test_general/testInstanceOf.js @@ -5,7 +5,6 @@ const common = require('../../common'); const assert = require('assert'); // Addon is referenced through the eval expression in testFile -// eslint-disable-next-line no-unused-vars const addon = require(`./build/${common.buildType}/test_general`); const path = require('path'); diff --git a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js index f79f07a45d9de4..2461ece8604257 100644 --- a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js +++ b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js @@ -19,7 +19,6 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-disable max-len */ 'use strict'; require('../common'); const assert = require('assert'); From d1a98a8d0a14de448d3567368284db828882a547 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sun, 18 Nov 2018 04:25:05 +0100 Subject: [PATCH 30/59] events: simplify stack compare function This simplifies the `longestSeqContainedIn()` logic by checking for the first identical occurance of at least three frames instead of the longest one. It also removes an unused argument. PR-URL: https://github.com/nodejs/node/pull/24744 Reviewed-By: Matteo Collina --- lib/events.js | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/lib/events.js b/lib/events.js index 6c5b699faa0685..10cec4bd69d4d1 100644 --- a/lib/events.js +++ b/lib/events.js @@ -103,30 +103,29 @@ EventEmitter.prototype.getMaxListeners = function getMaxListeners() { return $getMaxListeners(this); }; -// Returns the longest sequence of `a` that fully appears in `b`, -// of length at least 3. -// This is a lazy approach but should work well enough, given that stack -// frames are usually unequal or otherwise appear in groups, and that -// we only run this code in case of an unhandled exception. -function longestSeqContainedIn(a, b) { - for (var len = a.length; len >= 3; --len) { - for (var i = 0; i < a.length - len; ++i) { - // Attempt to find a[i:i+len] in b - for (var j = 0; j < b.length - len; ++j) { - let matches = true; - for (var k = 0; k < len; ++k) { - if (a[i + k] !== b[j + k]) { - matches = false; - break; - } +// Returns the length and line number of the first sequence of `a` that fully +// appears in `b` with a length of at least 4. +function identicalSequenceRange(a, b) { + for (var i = 0; i < a.length - 3; i++) { + // Find the first entry of b that matches the current entry of a. + const pos = b.indexOf(a[i]); + if (pos !== -1) { + const rest = b.length - pos; + if (rest > 3) { + let len = 1; + const maxLen = Math.min(a.length - i, rest); + // Count the number of consecutive entries. + while (maxLen > len && a[i + len] === b[pos + len]) { + len++; + } + if (len > 3) { + return [len, i]; } - if (matches) - return [ len, i, j ]; } } } - return [ 0, 0, 0 ]; + return [0, 0]; } function enhanceStackTrace(err, own) { @@ -135,9 +134,9 @@ function enhanceStackTrace(err, own) { const errStack = err.stack.split('\n').slice(1); const ownStack = own.stack.split('\n').slice(1); - const [ len, off ] = longestSeqContainedIn(ownStack, errStack); + const [ len, off ] = identicalSequenceRange(ownStack, errStack); if (len > 0) { - ownStack.splice(off + 1, len - 1, + ownStack.splice(off + 1, len - 2, ' [... lines matching original stack trace ...]'); } // Do this last, because it is the only operation with side effects. From c6388edf34394cddce7f4d77d29f0220b411e31a Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 17 Dec 2018 02:22:35 +0100 Subject: [PATCH 31/59] src: handle empty Maybe in uv binding initialize This can fail when terminating a Worker that loads the `uv` binding at the same time. Refs: https://github.com/nodejs/node/pull/25061#issuecomment-447648475 Fixes: https://github.com/nodejs/node/issues/25134 PR-URL: https://github.com/nodejs/node/pull/25079 Reviewed-By: James M Snell Reviewed-By: Daniel Bevenius Reviewed-By: Gireesh Punathil Reviewed-By: Colin Ihrig --- src/uv.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/uv.cc b/src/uv.cc index 79c221f4dfafcb..27daed556ecc7f 100644 --- a/src/uv.cc +++ b/src/uv.cc @@ -81,9 +81,11 @@ void Initialize(Local target, OneByteString(isolate, #name), \ OneByteString(isolate, msg) \ }; \ - err_map->Set(context, \ - Integer::New(isolate, UV_##name), \ - Array::New(isolate, arr, arraysize(arr))).ToLocalChecked(); \ + if (err_map->Set(context, \ + Integer::New(isolate, UV_##name), \ + Array::New(isolate, arr, arraysize(arr))).IsEmpty()) { \ + return; \ + } \ } while (0); UV_ERRNO_MAP(V) #undef V From 7df59f824b2490512cd104d11f55bf1910d181af Mon Sep 17 00:00:00 2001 From: ZYSzys <17367077526@163.com> Date: Sun, 16 Dec 2018 15:39:35 +0800 Subject: [PATCH 32/59] vm: reuse validateString of internal/validators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/25074 Reviewed-By: Michaël Zasso Reviewed-By: Anto Aravinth Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Daijiro Wachi --- lib/vm.js | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/lib/vm.js b/lib/vm.js index f7444764ed5c3f..e50b08d336b9b5 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -33,7 +33,11 @@ const { ERR_VM_MODULE_NOT_MODULE, } = require('internal/errors').codes; const { isModuleNamespaceObject, isArrayBufferView } = require('util').types; -const { validateInt32, validateUint32 } = require('internal/validators'); +const { + validateInt32, + validateUint32, + validateString +} = require('internal/validators'); const kParsingContext = Symbol('script parsing context'); const ArrayForEach = Function.call.bind(Array.prototype.forEach); @@ -58,9 +62,7 @@ class Script extends ContextifyScript { [kParsingContext]: parsingContext, } = options; - if (typeof filename !== 'string') { - throw new ERR_INVALID_ARG_TYPE('options.filename', 'string', filename); - } + validateString(filename, 'options.filename'); validateInt32(lineOffset, 'options.lineOffset'); validateInt32(columnOffset, 'options.columnOffset'); if (cachedData !== undefined && !isArrayBufferView(cachedData)) { @@ -149,11 +151,6 @@ function validateContext(sandbox) { } } -function validateString(prop, propName) { - if (prop !== undefined && typeof prop !== 'string') - throw new ERR_INVALID_ARG_TYPE(propName, 'string', prop); -} - function validateBool(prop, propName) { if (prop !== undefined && typeof prop !== 'boolean') throw new ERR_INVALID_ARG_TYPE(propName, 'boolean', prop); @@ -208,8 +205,10 @@ function getContextOptions(options) { wasm: options.contextCodeGeneration.wasm, } : undefined, }; - validateString(contextOptions.name, 'options.contextName'); - validateString(contextOptions.origin, 'options.contextOrigin'); + if (contextOptions.name !== undefined) + validateString(contextOptions.name, 'options.contextName'); + if (contextOptions.origin !== undefined) + validateString(contextOptions.origin, 'options.contextOrigin'); if (contextOptions.codeGeneration) { validateBool(contextOptions.codeGeneration.strings, 'options.contextCodeGeneration.strings'); @@ -244,10 +243,9 @@ function createContext(sandbox = {}, options = {}) { codeGeneration } = options; - if (typeof name !== 'string') { - throw new ERR_INVALID_ARG_TYPE('options.name', 'string', options.name); - } - validateString(origin, 'options.origin'); + validateString(name, 'options.name'); + if (origin !== undefined) + validateString(origin, 'options.origin'); validateObject(codeGeneration, 'options.codeGeneration'); let strings = true; @@ -319,18 +317,12 @@ function runInThisContext(code, options) { } function compileFunction(code, params, options = {}) { - if (typeof code !== 'string') { - throw new ERR_INVALID_ARG_TYPE('code', 'string', code); - } + validateString(code, 'code'); if (params !== undefined) { if (!ArrayIsArray(params)) { throw new ERR_INVALID_ARG_TYPE('params', 'Array', params); } - ArrayForEach(params, (param, i) => { - if (typeof param !== 'string') { - throw new ERR_INVALID_ARG_TYPE(`params[${i}]`, 'string', param); - } - }); + ArrayForEach(params, (param, i) => validateString(param, `params[${i}]`)); } const { @@ -343,9 +335,7 @@ function compileFunction(code, params, options = {}) { contextExtensions = [], } = options; - if (typeof filename !== 'string') { - throw new ERR_INVALID_ARG_TYPE('options.filename', 'string', filename); - } + validateString(filename, 'options.filename'); validateUint32(columnOffset, 'options.columnOffset'); validateUint32(lineOffset, 'options.lineOffset'); if (cachedData !== undefined && !isArrayBufferView(cachedData)) { From fd0361bff06eac020b876b91b7d43c2c666a387d Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 15 Dec 2018 21:13:44 +0100 Subject: [PATCH 33/59] src: mark options parsers as const These do not change their contents after being constructed. PR-URL: https://github.com/nodejs/node/pull/25065 Reviewed-By: Colin Ihrig Reviewed-By: Joyee Cheung Reviewed-By: James M Snell --- src/node_options-inl.h | 4 ++-- src/node_options.cc | 8 ++++---- src/node_options.h | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/node_options-inl.h b/src/node_options-inl.h index cfa3cdc9bbe33d..f482bcd36660ed 100644 --- a/src/node_options-inl.h +++ b/src/node_options-inl.h @@ -214,7 +214,7 @@ auto OptionsParser::Convert( template template void OptionsParser::Insert( - OptionsParser* child_options_parser, + const OptionsParser* child_options_parser, ChildOptions* (Options::* get_child)()) { aliases_.insert(child_options_parser->aliases_.begin(), child_options_parser->aliases_.end()); @@ -287,7 +287,7 @@ void OptionsParser::Parse( std::vector* const v8_args, Options* const options, OptionEnvvarSettings required_env_settings, - std::vector* const errors) { + std::vector* const errors) const { ArgsInfo args(orig_args, exec_args); // The first entry is the process name. Make sure it ends up in the V8 argv, diff --git a/src/node_options.cc b/src/node_options.cc index 72e9ad86b76ee4..1d3a1691fa0845 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -88,7 +88,7 @@ DebugOptionsParser::DebugOptionsParser() { } #if HAVE_INSPECTOR -DebugOptionsParser DebugOptionsParser::instance; +const DebugOptionsParser DebugOptionsParser::instance; #endif // HAVE_INSPECTOR EnvironmentOptionsParser::EnvironmentOptionsParser() { @@ -211,7 +211,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { #endif // HAVE_INSPECTOR } -EnvironmentOptionsParser EnvironmentOptionsParser::instance; +const EnvironmentOptionsParser EnvironmentOptionsParser::instance; PerIsolateOptionsParser::PerIsolateOptionsParser() { AddOption("--track-heap-objects", @@ -234,7 +234,7 @@ PerIsolateOptionsParser::PerIsolateOptionsParser() { &PerIsolateOptions::get_per_env_options); } -PerIsolateOptionsParser PerIsolateOptionsParser::instance; +const PerIsolateOptionsParser PerIsolateOptionsParser::instance; PerProcessOptionsParser::PerProcessOptionsParser() { AddOption("--title", @@ -342,7 +342,7 @@ PerProcessOptionsParser::PerProcessOptionsParser() { &PerProcessOptions::get_per_isolate_options); } -PerProcessOptionsParser PerProcessOptionsParser::instance; +const PerProcessOptionsParser PerProcessOptionsParser::instance; inline std::string RemoveBrackets(const std::string& host) { if (!host.empty() && host.front() == '[' && host.back() == ']') diff --git a/src/node_options.h b/src/node_options.h index 4bfc49df1172a1..40eae6f7f8f358 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -281,7 +281,7 @@ class OptionsParser { // a method that yields the target options type from this parser's options // type. template - void Insert(OptionsParser* child_options_parser, + void Insert(const OptionsParser* child_options_parser, ChildOptions* (Options::* get_child)()); // Parse a sequence of options into an options struct, a list of @@ -306,7 +306,7 @@ class OptionsParser { std::vector* const v8_args, Options* const options, OptionEnvvarSettings required_env_settings, - std::vector* const errors); + std::vector* const errors) const; private: // We support the wide variety of different option types by remembering @@ -397,28 +397,28 @@ class DebugOptionsParser : public OptionsParser { public: DebugOptionsParser(); - static DebugOptionsParser instance; + static const DebugOptionsParser instance; }; class EnvironmentOptionsParser : public OptionsParser { public: EnvironmentOptionsParser(); - static EnvironmentOptionsParser instance; + static const EnvironmentOptionsParser instance; }; class PerIsolateOptionsParser : public OptionsParser { public: PerIsolateOptionsParser(); - static PerIsolateOptionsParser instance; + static const PerIsolateOptionsParser instance; }; class PerProcessOptionsParser : public OptionsParser { public: PerProcessOptionsParser(); - static PerProcessOptionsParser instance; + static const PerProcessOptionsParser instance; }; } // namespace options_parser From 54e42f04a726639e08e85effe23e59f9276ed029 Mon Sep 17 00:00:00 2001 From: Gireesh Punathil Date: Tue, 18 Dec 2018 05:01:36 -0500 Subject: [PATCH 34/59] src: port GetLoadedLibraries for freebsd the dl_iterate_phdr and its associated data structure in Linux are fully available in freebsd as well, so opening it up for freebsd means just opening up the platform specific identifiers. Refs: https://github.com/nodejs/node/pull/24825 PR-URL: https://github.com/nodejs/node/pull/25106 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau --- src/debug_utils.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/debug_utils.cc b/src/debug_utils.cc index 4f086106b66ca7..d9db2d52e0db85 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -30,9 +30,9 @@ #endif // __POSIX__ -#if defined(__linux__) || defined(__sun) +#if defined(__linux__) || defined(__sun) || defined(__FreeBSD__) #include -#endif // (__linux__) || defined(__sun) +#endif // (__linux__) || defined(__sun) || defined(__FreeBSD__) #ifdef __APPLE__ #include // _dyld_get_image_name() @@ -322,7 +322,7 @@ void CheckedUvLoopClose(uv_loop_t* loop) { std::vector NativeSymbolDebuggingContext::GetLoadedLibraries() { std::vector list; -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) dl_iterate_phdr( [](struct dl_phdr_info* info, size_t size, void* data) { auto list = static_cast*>(data); From 2fc43fbe43a40069ecdf0071edfb057a510890c4 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Tue, 18 Dec 2018 02:28:09 +0100 Subject: [PATCH 35/59] lib: switch to object spread where possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the object spread notation instead of using Object.assign. It is not only easier to read it is also faster as of V8 6.8. PR-URL: https://github.com/nodejs/node/pull/25104 Reviewed-By: Gus Caplan Reviewed-By: Michaël Zasso Reviewed-By: Yuta Hiroto Reviewed-By: Minwoo Jung Reviewed-By: Denys Otrishko Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca --- lib/.eslintrc.yaml | 1 + lib/_tls_wrap.js | 2 +- lib/child_process.js | 4 ++-- lib/console.js | 8 +++++--- lib/internal/child_process.js | 2 +- lib/internal/console/constructor.js | 9 +++++---- lib/internal/http2/compat.js | 2 +- lib/internal/http2/core.js | 20 ++++++++++---------- lib/repl.js | 5 ++--- lib/tls.js | 10 +++++++--- lib/util.js | 7 ++++--- lib/vm.js | 8 ++------ 12 files changed, 41 insertions(+), 37 deletions(-) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 65c7c88ba0cbe7..a7a1c15e90b3fb 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -1,4 +1,5 @@ rules: + prefer-object-spread: error no-restricted-syntax: # Config copied from .eslintrc.js - error diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 55cfc440dd4fa6..6d760c19ed281e 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -289,7 +289,7 @@ function initRead(tls, wrapped) { */ function TLSSocket(socket, opts) { - const tlsOptions = Object.assign({}, opts); + const tlsOptions = { ...opts }; if (tlsOptions.ALPNProtocols) tls.convertALPNProtocols(tlsOptions.ALPNProtocols, tlsOptions); diff --git a/lib/child_process.js b/lib/child_process.js index 222df8aed7e8fd..2691de70198a42 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -136,7 +136,7 @@ function normalizeExecArgs(command, options, callback) { } // Make a shallow copy so we don't clobber the user's options object. - options = Object.assign({}, options); + options = { ...options }; options.shell = typeof options.shell === 'string' ? options.shell : true; return { @@ -470,7 +470,7 @@ function normalizeSpawnArguments(file, args, options) { } // Make a shallow copy so we don't clobber the user's options object. - options = Object.assign({}, options); + options = { ...options }; if (options.shell) { const command = [file].concat(args).join(' '); diff --git a/lib/console.js b/lib/console.js index 59c51b368a819d..496280d72c3a83 100644 --- a/lib/console.js +++ b/lib/console.js @@ -225,9 +225,11 @@ Console.prototype.warn = function warn(...args) { Console.prototype.error = Console.prototype.warn; Console.prototype.dir = function dir(object, options) { - options = Object.assign({ - customInspect: false - }, this[kGetInspectOptions](this._stdout), options); + options = { + customInspect: false, + ...this[kGetInspectOptions](this._stdout), + ...options + }; write(this._ignoreErrors, this._stdout, util.inspect(object, options), diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 0c93b4d0e6fe80..f41e31785b467c 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -636,7 +636,7 @@ function setupChannel(target, channel) { throw new ERR_INVALID_ARG_TYPE('options', 'Object', options); } - options = Object.assign({ swallowErrors: false }, options); + options = { swallowErrors: false, ...options }; if (this.connected) { return this._send(message, handle, options, callback); diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index 6ed173210387a4..1090f8fde68d1f 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -271,10 +271,11 @@ Console.prototype.warn = function warn(...args) { Console.prototype.error = Console.prototype.warn; Console.prototype.dir = function dir(object, options) { - options = Object.assign({ - customInspect: false - }, this[kGetInspectOptions](this._stdout), options); - this[kWriteToConsole](kUseStdout, util.inspect(object, options)); + this[kWriteToConsole](kUseStdout, util.inspect(object, { + customInspect: false, + ...this[kGetInspectOptions](this._stdout), + ...options + })); }; Console.prototype.time = function time(label = 'default') { diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index 927504621d0a1d..23c4e2e0f08893 100644 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -512,7 +512,7 @@ class Http2ServerResponse extends Stream { } getHeaders() { - return Object.assign({}, this[kHeaders]); + return { ...this[kHeaders] }; } hasHeader(name) { diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 887a234758b044..6bc82789a35cc8 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -790,7 +790,7 @@ function pingCallback(cb) { // 6. enablePush must be a boolean // All settings are optional and may be left undefined function validateSettings(settings) { - settings = Object.assign({}, settings); + settings = { ...settings }; assertWithinRange('headerTableSize', settings.headerTableSize, 0, kMaxInt); @@ -1443,7 +1443,7 @@ class ClientHttp2Session extends Http2Session { assertIsObject(options, 'options'); headers = Object.assign(Object.create(null), headers); - options = Object.assign({}, options); + options = { ...options }; if (headers[HTTP2_HEADER_METHOD] === undefined) headers[HTTP2_HEADER_METHOD] = HTTP2_METHOD_GET; @@ -1848,7 +1848,7 @@ class Http2Stream extends Duplex { throw new ERR_HTTP2_INVALID_STREAM(); assertIsObject(options, 'options'); - options = Object.assign({}, options); + options = { ...options }; validatePriorityOptions(options); const priorityFn = submitPriority.bind(this, options); @@ -2257,7 +2257,7 @@ class ServerHttp2Stream extends Http2Stream { throw new ERR_INVALID_CALLBACK(); assertIsObject(options, 'options'); - options = Object.assign({}, options); + options = { ...options }; options.endStream = !!options.endStream; assertIsObject(headers, 'headers'); @@ -2322,7 +2322,7 @@ class ServerHttp2Stream extends Http2Stream { const state = this[kState]; assertIsObject(options, 'options'); - options = Object.assign({}, options); + options = { ...options }; const session = this[kSession]; debug(`Http2Stream ${this[kID]} [Http2Session ` + @@ -2378,7 +2378,7 @@ class ServerHttp2Stream extends Http2Stream { const session = this[kSession]; assertIsObject(options, 'options'); - options = Object.assign({}, options); + options = { ...options }; if (options.offset !== undefined && typeof options.offset !== 'number') throw new ERR_INVALID_OPT_VALUE('offset', options.offset); @@ -2441,7 +2441,7 @@ class ServerHttp2Stream extends Http2Stream { throw new ERR_HTTP2_HEADERS_SENT(); assertIsObject(options, 'options'); - options = Object.assign({}, options); + options = { ...options }; if (options.offset !== undefined && typeof options.offset !== 'number') throw new ERR_INVALID_OPT_VALUE('offset', options.offset); @@ -2667,10 +2667,10 @@ function connectionListener(socket) { function initializeOptions(options) { assertIsObject(options, 'options'); - options = Object.assign({}, options); + options = { ...options }; options.allowHalfOpen = true; assertIsObject(options.settings, 'options.settings'); - options.settings = Object.assign({}, options.settings); + options.settings = { ...options.settings }; // Used only with allowHTTP1 options.Http1IncomingMessage = options.Http1IncomingMessage || @@ -2775,7 +2775,7 @@ function connect(authority, options, listener) { } assertIsObject(options, 'options'); - options = Object.assign({}, options); + options = { ...options }; if (typeof authority === 'string') authority = new URL(authority); diff --git a/lib/repl.js b/lib/repl.js index 3e9a933e214efa..9172931280f46f 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -130,8 +130,7 @@ function hasOwnProperty(obj, prop) { // and it can be overridden by custom print functions, such as `probe` or // `eyes.js`. const writer = exports.writer = (obj) => util.inspect(obj, writer.options); -writer.options = - Object.assign({}, util.inspect.defaultOptions, { showProxy: true }); +writer.options = { ...util.inspect.defaultOptions, showProxy: true }; exports._builtinLibs = builtinLibs; @@ -510,7 +509,7 @@ function REPLServer(prompt, if (self.useColors && self.writer === writer) { // Turn on ANSI coloring. self.writer = (obj) => util.inspect(obj, self.writer.options); - self.writer.options = Object.assign({}, writer.options, { colors: true }); + self.writer.options = { ...writer.options, colors: true }; } function filterInternalStackFrames(structuredStack) { diff --git a/lib/tls.js b/lib/tls.js index 88feab319e9c01..65eb8ae9834deb 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -264,9 +264,13 @@ class SecurePair extends EventEmitter { this.credentials = secureContext; this.encrypted = socket1; - this.cleartext = new exports.TLSSocket(socket2, Object.assign({ - secureContext, isServer, requestCert, rejectUnauthorized - }, options)); + this.cleartext = new exports.TLSSocket(socket2, { + secureContext, + isServer, + requestCert, + rejectUnauthorized, + ...options + }); this.cleartext.once('secure', () => this.emit('secure')); } diff --git a/lib/util.js b/lib/util.js index 922a01f357e408..06ce842934505a 100644 --- a/lib/util.js +++ b/lib/util.js @@ -123,11 +123,12 @@ function formatWithOptions(inspectOptions, f) { break; case 111: // 'o' { - const opts = Object.assign({}, inspectOptions, { + const opts = { showHidden: true, showProxy: true, - depth: 4 - }); + depth: 4, + ...inspectOptions + }; tempStr = inspect(arguments[a++], opts); break; } diff --git a/lib/vm.js b/lib/vm.js index e50b08d336b9b5..12c4efa1a29d4f 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -290,9 +290,7 @@ function runInContext(code, contextifiedSandbox, options) { [kParsingContext]: contextifiedSandbox }; } else { - options = Object.assign({}, options, { - [kParsingContext]: contextifiedSandbox - }); + options = { ...options, [kParsingContext]: contextifiedSandbox }; } return createScript(code, options) .runInContext(contextifiedSandbox, options); @@ -303,9 +301,7 @@ function runInNewContext(code, sandbox, options) { options = { filename: options }; } sandbox = createContext(sandbox, getContextOptions(options)); - options = Object.assign({}, options, { - [kParsingContext]: sandbox - }); + options = { ...options, [kParsingContext]: sandbox }; return createScript(code, options).runInNewContext(sandbox, options); } From ae50f480d20f3cdcb6bb8400751d6845c49712d5 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 5 Dec 2018 19:59:12 -0500 Subject: [PATCH 36/59] http: add maxHeaderSize property This commit exposes the value of --max-http-header-size as a property of the http module. PR-URL: https://github.com/nodejs/node/pull/24860 Reviewed-By: Richard Lau Reviewed-By: Matteo Collina Reviewed-By: Michael Dawson Reviewed-By: Shelley Vohr Reviewed-By: James M Snell --- doc/api/http.md | 11 +++++++++++ lib/http.js | 14 ++++++++++++++ test/parallel/test-http-max-header-size.js | 11 +++++++++++ 3 files changed, 36 insertions(+) create mode 100644 test/parallel/test-http-max-header-size.js diff --git a/doc/api/http.md b/doc/api/http.md index 63f4c58a85d9bd..4e56f4ad00a391 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1912,6 +1912,16 @@ added: v0.5.9 Global instance of `Agent` which is used as the default for all HTTP client requests. +## http.maxHeaderSize + + +* {number} + +Read-only property specifying the maximum allowed size of HTTP headers in bytes. +Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option. + ## http.request(options[, callback]) ## http.request(url[, options][, callback]) + +Node.js uses an internal `KeyObject` class which should not be accessed +directly. Instead, factory functions exist to create instances of this class +in a secure manner, see [`crypto.createSecretKey()`][], +[`crypto.createPublicKey()`][] and [`crypto.createPrivateKey()`][]. A +`KeyObject` can represent a symmetric or asymmetric key, and each kind of key +exposes different functions. + +Most applications should consider using the new `KeyObject` API instead of +passing keys as strings or `Buffer`s due to improved security features. + +### keyObject.asymmetricKeyType + +* {string} + +For asymmetric keys, this property represents the type of the embedded key +(`'rsa'`, `'dsa'` or `'ec'`). This property is `undefined` for symmetric keys. + +### keyObject.export([options]) + +* `options`: {Object} +* Returns: {string | Buffer} + +For symmetric keys, this function allocates a `Buffer` containing the key +material and ignores any options. + +For asymmetric keys, the `options` parameter is used to determine the export +format. + +For public keys, the following encoding options can be used: + +* `type`: {string} Must be one of `'pkcs1'` (RSA only) or `'spki'`. +* `format`: {string} Must be `'pem'` or `'der'`. + +For private keys, the following encoding options can be used: + +* `type`: {string} Must be one of `'pkcs1'` (RSA only), `'pkcs8'` or + `'sec1'` (EC only). +* `format`: {string} Must be `'pem'` or `'der'`. +* `cipher`: {string} If specified, the private key will be encrypted with + the given `cipher` and `passphrase` using PKCS#5 v2.0 password based + encryption. +* `passphrase`: {string | Buffer} The passphrase to use for encryption, see + `cipher`. + +When PEM encoding was selected, the result will be a string, otherwise it will +be a buffer containing the data encoded as DER. + +### keyObject.symmetricSize + +* {number} + +For secret keys, this property represents the size of the key in bytes. This +property is `undefined` for asymmetric keys. + +### keyObject.type + +* {string} + +Depending on the type of this `KeyObject`, this property is either +`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys +or `'private'` for private (asymmetric) keys. + ## Class: Sign -* `privateKey` {string | Object} - - `key` {string} - - `passphrase` {string} +* `privateKey` {Object | string | Buffer | KeyObject} - `padding` {integer} - `saltLength` {integer} * `outputEncoding` {string} The [encoding][] of the return value. @@ -1184,12 +1260,10 @@ changes: Calculates the signature on all the data passed through using either [`sign.update()`][] or [`sign.write()`][stream-writable-write]. -The `privateKey` argument can be an object or a string. If `privateKey` is a -string, it is treated as a raw key with no passphrase. If `privateKey` is an -object, it must contain one or more of the following properties: +If `privateKey` is not a [`KeyObject`][], this function behaves as if +`privateKey` had been passed to [`crypto.createPrivateKey()`][]. If it is an +object, the following additional properties can be passed: -* `key`: {string} - PEM encoded private key (required) -* `passphrase`: {string} - passphrase for the private key * `padding`: {integer} - Optional padding value for RSA, one of the following: * `crypto.constants.RSA_PKCS1_PADDING` (default) * `crypto.constants.RSA_PKCS1_PSS_PADDING` @@ -1299,18 +1373,20 @@ changes: pr-url: https://github.com/nodejs/node/pull/11705 description: Support for RSASSA-PSS and additional options was added. --> -* `object` {string | Object} +* `object` {Object | string | Buffer | KeyObject} + - `padding` {integer} + - `saltLength` {integer} * `signature` {string | Buffer | TypedArray | DataView} * `signatureEncoding` {string} The [encoding][] of the `signature` string. * Returns: {boolean} `true` or `false` depending on the validity of the signature for the data and public key. Verifies the provided data using the given `object` and `signature`. -The `object` argument can be either a string containing a PEM encoded object, -which can be an RSA public key, a DSA public key, or an X.509 certificate, -or an object with one or more of the following properties: -* `key`: {string} - PEM encoded public key (required) +If `object` is not a [`KeyObject`][], this function behaves as if +`object` had been passed to [`crypto.createPublicKey()`][]. If it is an +object, the following additional properties can be passed: + * `padding`: {integer} - Optional padding value for RSA, one of the following: * `crypto.constants.RSA_PKCS1_PADDING` (default) * `crypto.constants.RSA_PKCS1_PSS_PADDING` @@ -1436,6 +1512,9 @@ Adversaries][] for details. * `algorithm` {string} -* `key` {string | Buffer | TypedArray | DataView} +* `key` {string | Buffer | TypedArray | DataView | KeyObject} * `iv` {string | Buffer | TypedArray | DataView} * `options` {Object} [`stream.transform` options][] * Returns: {Cipher} @@ -1474,7 +1553,8 @@ display the available cipher algorithms. The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector][]. Both arguments must be `'utf8'` encoded strings, -[Buffers][`Buffer`], `TypedArray`, or `DataView`s. If the cipher does not need +[Buffers][`Buffer`], `TypedArray`, or `DataView`s. The `key` may optionally be +a [`KeyObject`][] of type `secret`. If the cipher does not need an initialization vector, `iv` may be `null`. Initialization vectors should be unpredictable and unique; ideally, they will be @@ -1525,6 +1605,9 @@ to create the `Decipher` object. * `algorithm` {string} -* `key` {string | Buffer | TypedArray | DataView} +* `key` {string | Buffer | TypedArray | DataView | KeyObject} * `options` {Object} [`stream.transform` options][] * Returns: {Hmac} @@ -1689,7 +1777,8 @@ On recent releases of OpenSSL, `openssl list -digest-algorithms` (`openssl list-message-digest-algorithms` for older versions of OpenSSL) will display the available digest algorithms. -The `key` is the HMAC key used to generate the cryptographic HMAC hash. +The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is +a [`KeyObject`][], its type must be `secret`. Example: generating the sha256 HMAC of a file @@ -1711,6 +1800,47 @@ input.on('readable', () => { }); ``` +### crypto.createPrivateKey(key) + +* `key` {Object | string | Buffer} + - `key`: {string | Buffer} The key material, either in PEM or DER format. + - `format`: {string} Must be `'pem'` or `'der'`. **Default:** `'pem'`. + - `type`: {string} Must be `'pkcs1'`, `'pkcs8'` or `'sec1'`. This option is + required only if the `format` is `'der'` and ignored if it is `'pem'`. + - `passphrase`: {string | Buffer} The passphrase to use for decryption. +* Returns: {KeyObject} + +Creates and returns a new key object containing a private key. If `key` is a +string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` +must be an object with the properties described above. + +### crypto.createPublicKey(key) + +* `key` {Object | string | Buffer} + - `key`: {string | Buffer} + - `format`: {string} Must be `'pem'` or `'der'`. **Default:** `'pem'`. + - `type`: {string} Must be `'pkcs1'` or `'spki'`. This option is required + only if the `format` is `'der'`. +* Returns: {KeyObject} + +Creates and returns a new key object containing a public key. If `key` is a +string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` +must be an object with the properties described above. + +### crypto.createSecretKey(key) + +* `key` {Buffer} +* Returns: {KeyObject} + +Creates and returns a new key object containing a secret key for symmetric +encryption or `Hmac`. + ### crypto.createSign(algorithm[, options]) * `type`: {string} Must be `'rsa'`, `'dsa'` or `'ec'`. * `options`: {Object} @@ -1747,27 +1882,22 @@ added: v10.12.0 - `publicExponent`: {number} Public exponent (RSA). **Default:** `0x10001`. - `divisorLength`: {number} Size of `q` in bits (DSA). - `namedCurve`: {string} Name of the curve to use (EC). - - `publicKeyEncoding`: {Object} - - `type`: {string} Must be one of `'pkcs1'` (RSA only) or `'spki'`. - - `format`: {string} Must be `'pem'` or `'der'`. - - `privateKeyEncoding`: {Object} - - `type`: {string} Must be one of `'pkcs1'` (RSA only), `'pkcs8'` or - `'sec1'` (EC only). - - `format`: {string} Must be `'pem'` or `'der'`. - - `cipher`: {string} If specified, the private key will be encrypted with - the given `cipher` and `passphrase` using PKCS#5 v2.0 password based - encryption. - - `passphrase`: {string} The passphrase to use for encryption, see `cipher`. + - `publicKeyEncoding`: {Object} See [`keyObject.export()`][]. + - `privateKeyEncoding`: {Object} See [`keyObject.export()`][]. * `callback`: {Function} - `err`: {Error} - - `publicKey`: {string|Buffer} - - `privateKey`: {string|Buffer} + - `publicKey`: {string | Buffer | KeyObject} + - `privateKey`: {string | Buffer | KeyObject} Generates a new asymmetric key pair of the given `type`. Only RSA, DSA and EC are currently supported. +If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function +behaves as if [`keyObject.export()`][] had been called on its result. Otherwise, +the respective part of the key is returned as a [`KeyObject`]. + It is recommended to encode public keys as `'spki'` and private keys as -`'pkcs8'` with encryption: +`'pkcs8'` with encryption for long-term storage: ```js const { generateKeyPair } = require('crypto'); @@ -1789,11 +1919,7 @@ generateKeyPair('rsa', { ``` On completion, `callback` will be called with `err` set to `undefined` and -`publicKey` / `privateKey` representing the generated key pair. When PEM -encoding was selected, the result will be a string, otherwise it will be a -buffer containing the data encoded as DER. Note that Node.js itself does not -accept DER, it is supported for interoperability with other libraries such as -WebCrypto only. +`publicKey` / `privateKey` representing the generated key pair. If this method is invoked as its [`util.promisify()`][]ed version, it returns a `Promise` for an `Object` with `publicKey` and `privateKey` properties. @@ -1801,6 +1927,11 @@ a `Promise` for an `Object` with `publicKey` and `privateKey` properties. ### crypto.generateKeyPairSync(type, options) * `type`: {string} Must be `'rsa'`, `'dsa'` or `'ec'`. * `options`: {Object} @@ -1818,10 +1949,11 @@ added: v10.12.0 - `cipher`: {string} If specified, the private key will be encrypted with the given `cipher` and `passphrase` using PKCS#5 v2.0 password based encryption. - - `passphrase`: {string} The passphrase to use for encryption, see `cipher`. + - `passphrase`: {string | Buffer} The passphrase to use for encryption, see + `cipher`. * Returns: {Object} - - `publicKey`: {string|Buffer} - - `privateKey`: {string|Buffer} + - `publicKey`: {string | Buffer | KeyObject} + - `privateKey`: {string | Buffer | KeyObject} Generates a new asymmetric key pair of the given `type`. Only RSA, DSA and EC are currently supported. @@ -2062,10 +2194,12 @@ An array of supported digest functions can be retrieved using ### crypto.privateDecrypt(privateKey, buffer) -* `privateKey` {Object | string} - - `key` {string} A PEM encoded private key. - - `passphrase` {string} An optional passphrase for the private key. +* `privateKey` {Object | string | Buffer | KeyObject} - `padding` {crypto.constants} An optional padding value defined in `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`, `crypto.constants.RSA_PKCS1_PADDING`, or @@ -2076,16 +2210,22 @@ added: v0.11.14 Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using the corresponding public key, for example using [`crypto.publicEncrypt()`][]. -`privateKey` can be an object or a string. If `privateKey` is a string, it is -treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`. +If `privateKey` is not a [`KeyObject`][], this function behaves as if +`privateKey` had been passed to [`crypto.createPrivateKey()`][]. If it is an +object, the `padding` property can be passed. Otherwise, this function uses +`RSA_PKCS1_OAEP_PADDING`. ### crypto.privateEncrypt(privateKey, buffer) -* `privateKey` {Object | string} - - `key` {string} A PEM encoded private key. - - `passphrase` {string} An optional passphrase for the private key. +* `privateKey` {Object | string | Buffer | KeyObject} + - `key` {string | Buffer | KeyObject} A PEM encoded private key. + - `passphrase` {string | Buffer} An optional passphrase for the private key. - `padding` {crypto.constants} An optional padding value defined in `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or `crypto.constants.RSA_PKCS1_PADDING`. @@ -2095,16 +2235,21 @@ added: v1.1.0 Encrypts `buffer` with `privateKey`. The returned data can be decrypted using the corresponding public key, for example using [`crypto.publicDecrypt()`][]. -`privateKey` can be an object or a string. If `privateKey` is a string, it is -treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`. +If `privateKey` is not a [`KeyObject`][], this function behaves as if +`privateKey` had been passed to [`crypto.createPrivateKey()`][]. If it is an +object, the `padding` property can be passed. Otherwise, this function uses +`RSA_PKCS1_PADDING`. ### crypto.publicDecrypt(key, buffer) -* `key` {Object | string} - - `key` {string} A PEM encoded public or private key. - - `passphrase` {string} An optional passphrase for the private key. +* `key` {Object | string | Buffer | KeyObject} + - `passphrase` {string | Buffer} An optional passphrase for the private key. - `padding` {crypto.constants} An optional padding value defined in `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or `crypto.constants.RSA_PKCS1_PADDING`. @@ -2114,8 +2259,10 @@ added: v1.1.0 Decrypts `buffer` with `key`.`buffer` was previously encrypted using the corresponding private key, for example using [`crypto.privateEncrypt()`][]. -`key` can be an object or a string. If `key` is a string, it is treated as -the key with no passphrase and will use `RSA_PKCS1_PADDING`. +If `key` is not a [`KeyObject`][], this function behaves as if +`key` had been passed to [`crypto.createPublicKey()`][]. If it is an +object, the `padding` property can be passed. Otherwise, this function uses +`RSA_PKCS1_PADDING`. Because RSA public keys can be derived from private keys, a private key may be passed instead of a public key. @@ -2123,10 +2270,14 @@ be passed instead of a public key. ### crypto.publicEncrypt(key, buffer) -* `key` {Object | string} - - `key` {string} A PEM encoded public or private key. - - `passphrase` {string} An optional passphrase for the private key. +* `key` {Object | string | Buffer | KeyObject} + - `key` {string | Buffer | KeyObject} A PEM encoded public or private key. + - `passphrase` {string | Buffer} An optional passphrase for the private key. - `padding` {crypto.constants} An optional padding value defined in `crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`, `crypto.constants.RSA_PKCS1_PADDING`, or @@ -2138,8 +2289,10 @@ Encrypts the content of `buffer` with `key` and returns a new [`Buffer`][] with encrypted content. The returned data can be decrypted using the corresponding private key, for example using [`crypto.privateDecrypt()`][]. -`key` can be an object or a string. If `key` is a string, it is treated as -the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`. +If `key` is not a [`KeyObject`][], this function behaves as if +`key` had been passed to [`crypto.createPublicKey()`][]. If it is an +object, the `padding` property can be passed. Otherwise, this function uses +`RSA_PKCS1_OAEP_PADDING`. Because RSA public keys can be derived from private keys, a private key may be passed instead of a public key. @@ -2917,6 +3070,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. [`Buffer`]: buffer.html [`EVP_BytesToKey`]: https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html +[`KeyObject`]: #crypto_class_keyobject [`UV_THREADPOOL_SIZE`]: cli.html#cli_uv_threadpool_size_size [`cipher.final()`]: #crypto_cipher_final_outputencoding [`cipher.update()`]: #crypto_cipher_update_data_inputencoding_outputencoding @@ -2928,6 +3082,9 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. [`crypto.createECDH()`]: #crypto_crypto_createecdh_curvename [`crypto.createHash()`]: #crypto_crypto_createhash_algorithm_options [`crypto.createHmac()`]: #crypto_crypto_createhmac_algorithm_key_options +[`crypto.createPrivateKey()`]: #crypto_crypto_createprivatekey_key +[`crypto.createPublicKey()`]: #crypto_crypto_createpublickey_key +[`crypto.createSecretKey()`]: #crypto_crypto_createsecretkey_key [`crypto.createSign()`]: #crypto_crypto_createsign_algorithm_options [`crypto.createVerify()`]: #crypto_crypto_createverify_algorithm_options [`crypto.getCurves()`]: #crypto_crypto_getcurves @@ -2949,6 +3106,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. [`hash.update()`]: #crypto_hash_update_data_inputencoding [`hmac.digest()`]: #crypto_hmac_digest_encoding [`hmac.update()`]: #crypto_hmac_update_data_inputencoding +[`keyObject.export()`]: #crypto_keyobject_export_options [`sign.sign()`]: #crypto_sign_sign_privatekey_outputencoding [`sign.update()`]: #crypto_sign_update_data_inputencoding [`stream.Writable` options]: stream.html#stream_constructor_new_stream_writable_options diff --git a/doc/api/errors.md b/doc/api/errors.md index 05ecad70214fb4..d7e0023e3e7830 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -763,6 +763,11 @@ The selected public or private key encoding is incompatible with other options. An invalid [crypto digest algorithm][] was specified. + +### ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE + +The given crypto key object's type is invalid for the attempted operation. + ### ERR_CRYPTO_INVALID_STATE diff --git a/lib/crypto.js b/lib/crypto.js index c1526e20fef8d0..5b83a669c643d7 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -59,6 +59,11 @@ const { generateKeyPair, generateKeyPairSync } = require('internal/crypto/keygen'); +const { + createSecretKey, + createPublicKey, + createPrivateKey +} = require('internal/crypto/keys'); const { DiffieHellman, DiffieHellmanGroup, @@ -149,6 +154,9 @@ module.exports = exports = { createECDH, createHash, createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, createSign, createVerify, getCiphers, diff --git a/lib/internal/crypto/cipher.js b/lib/internal/crypto/cipher.js index cdb92465ece578..0a0514103399a0 100644 --- a/lib/internal/crypto/cipher.js +++ b/lib/internal/crypto/cipher.js @@ -12,6 +12,11 @@ const { } = require('internal/errors').codes; const { validateString } = require('internal/validators'); +const { + preparePrivateKey, + preparePublicOrPrivateKey, + prepareSecretKey +} = require('internal/crypto/keys'); const { getDefaultEncoding, kHandle, @@ -38,19 +43,25 @@ const { deprecate, normalizeEncoding } = require('internal/util'); // Lazy loaded for startup performance. let StringDecoder; -function rsaFunctionFor(method, defaultPadding) { +function rsaFunctionFor(method, defaultPadding, keyType) { return (options, buffer) => { - const key = options.key || options; + const { format, type, data, passphrase } = + keyType === 'private' ? + preparePrivateKey(options) : + preparePublicOrPrivateKey(options); const padding = options.padding || defaultPadding; - const passphrase = options.passphrase || null; - return method(toBuf(key), buffer, padding, passphrase); + return method(data, format, type, passphrase, buffer, padding); }; } -const publicEncrypt = rsaFunctionFor(_publicEncrypt, RSA_PKCS1_OAEP_PADDING); -const publicDecrypt = rsaFunctionFor(_publicDecrypt, RSA_PKCS1_PADDING); -const privateEncrypt = rsaFunctionFor(_privateEncrypt, RSA_PKCS1_PADDING); -const privateDecrypt = rsaFunctionFor(_privateDecrypt, RSA_PKCS1_OAEP_PADDING); +const publicEncrypt = rsaFunctionFor(_publicEncrypt, RSA_PKCS1_OAEP_PADDING, + 'public'); +const publicDecrypt = rsaFunctionFor(_publicDecrypt, RSA_PKCS1_PADDING, + 'private'); +const privateEncrypt = rsaFunctionFor(_privateEncrypt, RSA_PKCS1_PADDING, + 'private'); +const privateDecrypt = rsaFunctionFor(_privateDecrypt, RSA_PKCS1_OAEP_PADDING, + 'public'); function getDecoder(decoder, encoding) { encoding = normalizeEncoding(encoding); @@ -105,11 +116,7 @@ function createCipher(cipher, password, options, decipher) { function createCipherWithIV(cipher, key, options, decipher, iv) { validateString(cipher, 'cipher'); - key = toBuf(key); - if (!isArrayBufferView(key)) { - throw invalidArrayBufferView('key', key); - } - + key = prepareSecretKey(key); iv = toBuf(iv); if (iv !== null && !isArrayBufferView(iv)) { throw invalidArrayBufferView('iv', iv); diff --git a/lib/internal/crypto/hash.js b/lib/internal/crypto/hash.js index 6803d8fa954e73..7c697eb4772a19 100644 --- a/lib/internal/crypto/hash.js +++ b/lib/internal/crypto/hash.js @@ -12,6 +12,10 @@ const { toBuf } = require('internal/crypto/util'); +const { + prepareSecretKey +} = require('internal/crypto/keys'); + const { Buffer } = require('buffer'); const { @@ -88,10 +92,7 @@ function Hmac(hmac, key, options) { if (!(this instanceof Hmac)) return new Hmac(hmac, key, options); validateString(hmac, 'hmac'); - if (typeof key !== 'string' && !isArrayBufferView(key)) { - throw new ERR_INVALID_ARG_TYPE('key', - ['string', 'TypedArray', 'DataView'], key); - } + key = prepareSecretKey(key); this[kHandle] = new _Hmac(); this[kHandle].init(hmac, toBuf(key)); this[kState] = { diff --git a/lib/internal/crypto/keygen.js b/lib/internal/crypto/keygen.js index 7222d301f08692..7c0c4110439860 100644 --- a/lib/internal/crypto/keygen.js +++ b/lib/internal/crypto/keygen.js @@ -6,24 +6,32 @@ const { generateKeyPairDSA, generateKeyPairEC, OPENSSL_EC_NAMED_CURVE, - OPENSSL_EC_EXPLICIT_CURVE, - PK_ENCODING_PKCS1, - PK_ENCODING_PKCS8, - PK_ENCODING_SPKI, - PK_ENCODING_SEC1, - PK_FORMAT_DER, - PK_FORMAT_PEM + OPENSSL_EC_EXPLICIT_CURVE } = internalBinding('crypto'); +const { + parsePublicKeyEncoding, + parsePrivateKeyEncoding, + + PublicKeyObject, + PrivateKeyObject +} = require('internal/crypto/keys'); const { customPromisifyArgs } = require('internal/util'); const { isUint32, validateString } = require('internal/validators'); const { - ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_INVALID_CALLBACK, ERR_INVALID_OPT_VALUE } = require('internal/errors').codes; +const { isArrayBufferView } = require('internal/util/types'); + +function wrapKey(key, ctor) { + if (typeof key === 'string' || isArrayBufferView(key)) + return key; + return new ctor(key); +} + function generateKeyPair(type, options, callback) { if (typeof options === 'function') { callback = options; @@ -38,6 +46,9 @@ function generateKeyPair(type, options, callback) { const wrap = new AsyncWrap(Providers.KEYPAIRGENREQUEST); wrap.ondone = (ex, pubkey, privkey) => { if (ex) return callback.call(wrap, ex); + // If no encoding was chosen, return key objects instead. + pubkey = wrapKey(pubkey, PublicKeyObject); + privkey = wrapKey(privkey, PrivateKeyObject); callback.call(wrap, null, pubkey, privkey); }; @@ -69,86 +80,32 @@ function handleError(impl, wrap) { function parseKeyEncoding(keyType, options) { const { publicKeyEncoding, privateKeyEncoding } = options; - if (publicKeyEncoding == null || typeof publicKeyEncoding !== 'object') - throw new ERR_INVALID_OPT_VALUE('publicKeyEncoding', publicKeyEncoding); - - const { format: strPublicFormat, type: strPublicType } = publicKeyEncoding; - - let publicType; - if (strPublicType === 'pkcs1') { - if (keyType !== 'rsa') { - throw new ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS( - strPublicType, 'can only be used for RSA keys'); - } - publicType = PK_ENCODING_PKCS1; - } else if (strPublicType === 'spki') { - publicType = PK_ENCODING_SPKI; + let publicFormat, publicType; + if (publicKeyEncoding == null) { + publicFormat = publicType = undefined; + } else if (typeof publicKeyEncoding === 'object') { + ({ + format: publicFormat, + type: publicType + } = parsePublicKeyEncoding(publicKeyEncoding, keyType, + 'publicKeyEncoding')); } else { - throw new ERR_INVALID_OPT_VALUE('publicKeyEncoding.type', strPublicType); + throw new ERR_INVALID_OPT_VALUE('publicKeyEncoding', publicKeyEncoding); } - let publicFormat; - if (strPublicFormat === 'der') { - publicFormat = PK_FORMAT_DER; - } else if (strPublicFormat === 'pem') { - publicFormat = PK_FORMAT_PEM; + let privateFormat, privateType, cipher, passphrase; + if (privateKeyEncoding == null) { + privateFormat = privateType = undefined; + } else if (typeof privateKeyEncoding === 'object') { + ({ + format: privateFormat, + type: privateType, + cipher, + passphrase + } = parsePrivateKeyEncoding(privateKeyEncoding, keyType, + 'privateKeyEncoding')); } else { - throw new ERR_INVALID_OPT_VALUE('publicKeyEncoding.format', - strPublicFormat); - } - - if (privateKeyEncoding == null || typeof privateKeyEncoding !== 'object') throw new ERR_INVALID_OPT_VALUE('privateKeyEncoding', privateKeyEncoding); - - const { - cipher, - passphrase, - format: strPrivateFormat, - type: strPrivateType - } = privateKeyEncoding; - - let privateType; - if (strPrivateType === 'pkcs1') { - if (keyType !== 'rsa') { - throw new ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS( - strPrivateType, 'can only be used for RSA keys'); - } - privateType = PK_ENCODING_PKCS1; - } else if (strPrivateType === 'pkcs8') { - privateType = PK_ENCODING_PKCS8; - } else if (strPrivateType === 'sec1') { - if (keyType !== 'ec') { - throw new ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS( - strPrivateType, 'can only be used for EC keys'); - } - privateType = PK_ENCODING_SEC1; - } else { - throw new ERR_INVALID_OPT_VALUE('privateKeyEncoding.type', strPrivateType); - } - - let privateFormat; - if (strPrivateFormat === 'der') { - privateFormat = PK_FORMAT_DER; - } else if (strPrivateFormat === 'pem') { - privateFormat = PK_FORMAT_PEM; - } else { - throw new ERR_INVALID_OPT_VALUE('privateKeyEncoding.format', - strPrivateFormat); - } - - if (cipher != null) { - if (typeof cipher !== 'string') - throw new ERR_INVALID_OPT_VALUE('privateKeyEncoding.cipher', cipher); - if (privateFormat === PK_FORMAT_DER && - (privateType === PK_ENCODING_PKCS1 || - privateType === PK_ENCODING_SEC1)) { - throw new ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS( - strPrivateType, 'does not support encryption'); - } - if (typeof passphrase !== 'string') { - throw new ERR_INVALID_OPT_VALUE('privateKeyEncoding.passphrase', - passphrase); - } } return { @@ -181,8 +138,8 @@ function check(type, options, callback) { } impl = (wrap) => generateKeyPairRSA(modulusLength, publicExponent, - publicType, publicFormat, - privateType, privateFormat, + publicFormat, publicType, + privateFormat, privateType, cipher, passphrase, wrap); } break; @@ -200,8 +157,8 @@ function check(type, options, callback) { } impl = (wrap) => generateKeyPairDSA(modulusLength, divisorLength, - publicType, publicFormat, - privateType, privateFormat, + publicFormat, publicType, + privateFormat, privateType, cipher, passphrase, wrap); } break; @@ -219,8 +176,8 @@ function check(type, options, callback) { throw new ERR_INVALID_OPT_VALUE('paramEncoding', paramEncoding); impl = (wrap) => generateKeyPairEC(namedCurve, paramEncoding, - publicType, publicFormat, - privateType, privateFormat, + publicFormat, publicType, + privateFormat, privateType, cipher, passphrase, wrap); } break; diff --git a/lib/internal/crypto/keys.js b/lib/internal/crypto/keys.js new file mode 100644 index 00000000000000..ad828350806f3a --- /dev/null +++ b/lib/internal/crypto/keys.js @@ -0,0 +1,337 @@ +'use strict'; + +const { + KeyObject: KeyObjectHandle, + kKeyTypeSecret, + kKeyTypePublic, + kKeyTypePrivate, + kKeyFormatPEM, + kKeyFormatDER, + kKeyEncodingPKCS1, + kKeyEncodingPKCS8, + kKeyEncodingSPKI, + kKeyEncodingSEC1 +} = internalBinding('crypto'); +const { + ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS, + ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE, + ERR_INVALID_ARG_TYPE, + ERR_INVALID_ARG_VALUE, + ERR_INVALID_OPT_VALUE, + ERR_OUT_OF_RANGE +} = require('internal/errors').codes; +const { kHandle } = require('internal/crypto/util'); + +const { isArrayBufferView } = require('internal/util/types'); + +const kKeyType = Symbol('kKeyType'); + +const encodingNames = []; +for (const m of [[kKeyEncodingPKCS1, 'pkcs1'], [kKeyEncodingPKCS8, 'pkcs8'], + [kKeyEncodingSPKI, 'spki'], [kKeyEncodingSEC1, 'sec1']]) + encodingNames[m[0]] = m[1]; + +class KeyObject { + constructor(type, handle) { + if (type !== 'secret' && type !== 'public' && type !== 'private') + throw new ERR_INVALID_ARG_VALUE('type', type); + if (typeof handle !== 'object') + throw new ERR_INVALID_ARG_TYPE('handle', 'string', handle); + + this[kKeyType] = type; + + Object.defineProperty(this, kHandle, { + value: handle, + enumerable: false, + configurable: false, + writable: false + }); + } + + get type() { + return this[kKeyType]; + } +} + +class SecretKeyObject extends KeyObject { + constructor(handle) { + super('secret', handle); + } + + get symmetricKeySize() { + return this[kHandle].getSymmetricKeySize(); + } + + export() { + return this[kHandle].export(); + } +} + +const kAsymmetricKeyType = Symbol('kAsymmetricKeyType'); + +class AsymmetricKeyObject extends KeyObject { + get asymmetricKeyType() { + return this[kAsymmetricKeyType] || + (this[kAsymmetricKeyType] = this[kHandle].getAsymmetricKeyType()); + } +} + +class PublicKeyObject extends AsymmetricKeyObject { + constructor(handle) { + super('public', handle); + } + + export(encoding) { + const { + format, + type + } = parsePublicKeyEncoding(encoding, this.asymmetricKeyType); + return this[kHandle].export(format, type); + } +} + +class PrivateKeyObject extends AsymmetricKeyObject { + constructor(handle) { + super('private', handle); + } + + export(encoding) { + const { + format, + type, + cipher, + passphrase + } = parsePrivateKeyEncoding(encoding, this.asymmetricKeyType); + return this[kHandle].export(format, type, cipher, passphrase); + } +} + +function parseKeyFormat(formatStr, defaultFormat, optionName) { + if (formatStr === undefined && defaultFormat !== undefined) + return defaultFormat; + else if (formatStr === 'pem') + return kKeyFormatPEM; + else if (formatStr === 'der') + return kKeyFormatDER; + throw new ERR_INVALID_OPT_VALUE(optionName, formatStr); +} + +function parseKeyType(typeStr, required, keyType, isPublic, optionName) { + if (typeStr === undefined && !required) { + return undefined; + } else if (typeStr === 'pkcs1') { + if (keyType !== undefined && keyType !== 'rsa') { + throw new ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS( + typeStr, 'can only be used for RSA keys'); + } + return kKeyEncodingPKCS1; + } else if (typeStr === 'spki' && isPublic !== false) { + return kKeyEncodingSPKI; + } else if (typeStr === 'pkcs8' && isPublic !== true) { + return kKeyEncodingPKCS8; + } else if (typeStr === 'sec1' && isPublic !== true) { + if (keyType !== undefined && keyType !== 'ec') { + throw new ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS( + typeStr, 'can only be used for EC keys'); + } + return kKeyEncodingSEC1; + } + + throw new ERR_INVALID_OPT_VALUE(optionName, typeStr); +} + +function option(name, objName) { + return objName === undefined ? name : `${objName}.${name}`; +} + +function parseKeyFormatAndType(enc, keyType, isPublic, objName) { + const { format: formatStr, type: typeStr } = enc; + + const isInput = keyType === undefined; + const format = parseKeyFormat(formatStr, + isInput ? kKeyFormatPEM : undefined, + option('format', objName)); + + const type = parseKeyType(typeStr, + !isInput || format === kKeyFormatDER, + keyType, + isPublic, + option('type', objName)); + + return { format, type }; +} + +function isStringOrBuffer(val) { + return typeof val === 'string' || isArrayBufferView(val); +} + +function parseKeyEncoding(enc, keyType, isPublic, objName) { + const isInput = keyType === undefined; + + const { + format, + type + } = parseKeyFormatAndType(enc, keyType, isPublic, objName); + + let cipher, passphrase; + if (isPublic !== true) { + ({ cipher, passphrase } = enc); + + if (!isInput && cipher != null) { + if (typeof cipher !== 'string') + throw new ERR_INVALID_OPT_VALUE(option('cipher', objName), cipher); + if (format === kKeyFormatDER && + (type === kKeyEncodingPKCS1 || + type === kKeyEncodingSEC1)) { + throw new ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS( + encodingNames[type], 'does not support encryption'); + } + } + + if ((isInput && passphrase !== undefined && + !isStringOrBuffer(passphrase)) || + (!isInput && cipher != null && !isStringOrBuffer(passphrase))) { + throw new ERR_INVALID_OPT_VALUE(option('passphrase', objName), + passphrase); + } + } + + return { format, type, cipher, passphrase }; +} + +// Parses the public key encoding based on an object. keyType must be undefined +// when this is used to parse an input encoding and must be a valid key type if +// used to parse an output encoding. +function parsePublicKeyEncoding(enc, keyType, objName) { + return parseKeyFormatAndType(enc, keyType, true, objName); +} + +// Parses the private key encoding based on an object. keyType must be undefined +// when this is used to parse an input encoding and must be a valid key type if +// used to parse an output encoding. +function parsePrivateKeyEncoding(enc, keyType, objName) { + return parseKeyEncoding(enc, keyType, false, objName); +} + +function getKeyObjectHandle(key, isPublic, allowKeyObject) { + if (!allowKeyObject) { + return new ERR_INVALID_ARG_TYPE( + 'key', + ['string', 'Buffer', 'TypedArray', 'DataView'], + key + ); + } + if (isPublic != null) { + const expectedType = isPublic ? 'public' : 'private'; + if (key.type !== expectedType) + throw new ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE(key.type, expectedType); + } + return key[kHandle]; +} + +function prepareAsymmetricKey(key, isPublic, allowKeyObject = true) { + if (isKeyObject(key)) { + // Best case: A key object, as simple as that. + return { data: getKeyObjectHandle(key, isPublic, allowKeyObject) }; + } else if (typeof key === 'string' || isArrayBufferView(key)) { + // Expect PEM by default, mostly for backward compatibility. + return { format: kKeyFormatPEM, data: key }; + } else if (typeof key === 'object') { + const data = key.key; + // The 'key' property can be a KeyObject as well to allow specifying + // additional options such as padding along with the key. + if (isKeyObject(data)) + return { data: getKeyObjectHandle(data, isPublic, allowKeyObject) }; + // Either PEM or DER using PKCS#1 or SPKI. + if (!isStringOrBuffer(data)) { + throw new ERR_INVALID_ARG_TYPE( + 'key', + ['string', 'Buffer', 'TypedArray', 'DataView', + ...(allowKeyObject ? ['KeyObject'] : [])], + key); + } + return { data, ...parseKeyEncoding(key, undefined, isPublic) }; + } else { + throw new ERR_INVALID_ARG_TYPE( + 'key', + ['string', 'Buffer', 'TypedArray', 'DataView', + ...(allowKeyObject ? ['KeyObject'] : [])], + key + ); + } +} + +function preparePublicKey(key, allowKeyObject) { + return prepareAsymmetricKey(key, true, allowKeyObject); +} + +function preparePrivateKey(key, allowKeyObject) { + return prepareAsymmetricKey(key, false, allowKeyObject); +} + +function preparePublicOrPrivateKey(key, allowKeyObject) { + return prepareAsymmetricKey(key, undefined, allowKeyObject); +} + +function prepareSecretKey(key, bufferOnly = false) { + if (!isArrayBufferView(key) && (bufferOnly || typeof key !== 'string')) { + if (isKeyObject(key) && !bufferOnly) { + if (key.type !== 'secret') + throw new ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE(key.type, 'secret'); + return key[kHandle]; + } else { + throw new ERR_INVALID_ARG_TYPE( + 'key', + ['Buffer', 'TypedArray', 'DataView', + ...(bufferOnly ? [] : ['string', 'KeyObject'])], + key); + } + } + return key; +} + +function createSecretKey(key) { + key = prepareSecretKey(key, true); + if (key.byteLength === 0) + throw new ERR_OUT_OF_RANGE('key.byteLength', '> 0', key.byteLength); + const handle = new KeyObjectHandle(kKeyTypeSecret); + handle.init(key); + return new SecretKeyObject(handle); +} + +function createPublicKey(key) { + const { format, type, data } = preparePublicKey(key, false); + const handle = new KeyObjectHandle(kKeyTypePublic); + handle.init(data, format, type); + return new PublicKeyObject(handle); +} + +function createPrivateKey(key) { + const { format, type, data, passphrase } = preparePrivateKey(key, false); + const handle = new KeyObjectHandle(kKeyTypePrivate); + handle.init(data, format, type, passphrase); + return new PrivateKeyObject(handle); +} + +function isKeyObject(key) { + return key instanceof KeyObject; +} + +module.exports = { + // Public API. + createSecretKey, + createPublicKey, + createPrivateKey, + + // These are designed for internal use only and should not be exposed. + parsePublicKeyEncoding, + parsePrivateKeyEncoding, + preparePublicKey, + preparePrivateKey, + preparePublicOrPrivateKey, + prepareSecretKey, + SecretKeyObject, + PublicKeyObject, + PrivateKeyObject, + isKeyObject +}; diff --git a/lib/internal/crypto/sig.js b/lib/internal/crypto/sig.js index 9f02c866739f24..a694ba856777c1 100644 --- a/lib/internal/crypto/sig.js +++ b/lib/internal/crypto/sig.js @@ -17,6 +17,10 @@ const { toBuf, validateArrayBufferView, } = require('internal/crypto/util'); +const { + preparePrivateKey, + preparePublicKey +} = require('internal/crypto/keys'); const { Writable } = require('stream'); const { inherits } = require('util'); @@ -71,21 +75,18 @@ Sign.prototype.sign = function sign(options, encoding) { if (!options) throw new ERR_CRYPTO_SIGN_KEY_REQUIRED(); - var key = options.key || options; - var passphrase = options.passphrase || null; + const { data, format, type, passphrase } = preparePrivateKey(options, true); // Options specific to RSA - var rsaPadding = getPadding(options); - - var pssSaltLength = getSaltLength(options); + const rsaPadding = getPadding(options); + const pssSaltLength = getSaltLength(options); - key = validateArrayBufferView(key, 'key'); - - var ret = this[kHandle].sign(key, passphrase, rsaPadding, pssSaltLength); + const ret = this[kHandle].sign(data, format, type, passphrase, rsaPadding, + pssSaltLength); encoding = encoding || getDefaultEncoding(); if (encoding && encoding !== 'buffer') - ret = ret.toString(encoding); + return ret.toString(encoding); return ret; }; @@ -107,7 +108,12 @@ Verify.prototype._write = Sign.prototype._write; Verify.prototype.update = Sign.prototype.update; Verify.prototype.verify = function verify(options, signature, sigEncoding) { - var key = options.key || options; + const { + data, + format, + type + } = preparePublicKey(options, true); + sigEncoding = sigEncoding || getDefaultEncoding(); // Options specific to RSA @@ -115,12 +121,11 @@ Verify.prototype.verify = function verify(options, signature, sigEncoding) { var pssSaltLength = getSaltLength(options); - key = validateArrayBufferView(key, 'key'); - signature = validateArrayBufferView(toBuf(signature, sigEncoding), 'signature'); - return this[kHandle].verify(key, signature, rsaPadding, pssSaltLength); + return this[kHandle].verify(data, format, type, signature, + rsaPadding, pssSaltLength); }; legacyNativeHandle(Verify); diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 04c68c2af21874..f1965e825ec3d2 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -573,6 +573,8 @@ E('ERR_CRYPTO_HASH_UPDATE_FAILED', 'Hash update failed', Error); E('ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS', 'The selected key encoding %s %s.', Error); E('ERR_CRYPTO_INVALID_DIGEST', 'Invalid digest: %s', TypeError); +E('ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE', + 'Invalid key object type %s, expected %s.', TypeError); E('ERR_CRYPTO_INVALID_STATE', 'Invalid state for operation %s', Error); E('ERR_CRYPTO_PBKDF2_ERROR', 'PBKDF2 error', Error); E('ERR_CRYPTO_SCRYPT_INVALID_PARAMETER', 'Invalid scrypt parameter', Error); diff --git a/node.gyp b/node.gyp index f2d5fe8db83d03..9dc31b98ca5af7 100644 --- a/node.gyp +++ b/node.gyp @@ -100,6 +100,7 @@ 'lib/internal/crypto/diffiehellman.js', 'lib/internal/crypto/hash.js', 'lib/internal/crypto/keygen.js', + 'lib/internal/crypto/keys.js', 'lib/internal/crypto/pbkdf2.js', 'lib/internal/crypto/random.js', 'lib/internal/crypto/scrypt.js', diff --git a/src/env.h b/src/env.h index 8363a7cee30004..a1ace30c59bc94 100644 --- a/src/env.h +++ b/src/env.h @@ -139,6 +139,9 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2; V(chunks_sent_since_last_write_string, "chunksSentSinceLastWrite") \ V(code_string, "code") \ V(constants_string, "constants") \ + V(crypto_dsa_string, "dsa") \ + V(crypto_ec_string, "ec") \ + V(crypto_rsa_string, "rsa") \ V(cwd_string, "cwd") \ V(dest_string, "dest") \ V(destroyed_string, "destroyed") \ @@ -321,6 +324,7 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2; V(async_wrap_object_ctor_template, v8::FunctionTemplate) \ V(buffer_prototype_object, v8::Object) \ V(context, v8::Context) \ + V(crypto_key_object_constructor, v8::Function) \ V(domain_callback, v8::Function) \ V(domexception_function, v8::Function) \ V(fd_constructor_template, v8::ObjectTemplate) \ diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 42fe00b1d0458b..655929343df904 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -71,6 +71,7 @@ using v8::DontDelete; using v8::EscapableHandleScope; using v8::Exception; using v8::External; +using v8::Function; using v8::FunctionCallback; using v8::FunctionCallbackInfo; using v8::FunctionTemplate; @@ -2668,6 +2669,837 @@ static bool IsSupportedAuthenticatedMode(const EVP_CIPHER_CTX* ctx) { return IsSupportedAuthenticatedMode(cipher); } +template +static T* MallocOpenSSL(size_t count) { + void* mem = OPENSSL_malloc(MultiplyWithOverflowCheck(count, sizeof(T))); + CHECK_NOT_NULL(mem); + return static_cast(mem); +} + +enum class ParsePublicKeyResult { + kParsePublicOk, + kParsePublicNotRecognized, + kParsePublicFailed +}; + +static ParsePublicKeyResult TryParsePublicKey( + EVPKeyPointer* pkey, + const BIOPointer& bp, + const char* name, + // NOLINTNEXTLINE(runtime/int) + std::function parse) { + unsigned char* der_data; + long der_len; // NOLINT(runtime/int) + + // This skips surrounding data and decodes PEM to DER. + { + MarkPopErrorOnReturn mark_pop_error_on_return; + if (PEM_bytes_read_bio(&der_data, &der_len, nullptr, name, + bp.get(), nullptr, nullptr) != 1) + return ParsePublicKeyResult::kParsePublicNotRecognized; + } + + // OpenSSL might modify the pointer, so we need to make a copy before parsing. + const unsigned char* p = der_data; + pkey->reset(parse(&p, der_len)); + OPENSSL_clear_free(der_data, der_len); + + return *pkey ? ParsePublicKeyResult::kParsePublicOk : + ParsePublicKeyResult::kParsePublicFailed; +} + +static ParsePublicKeyResult ParsePublicKeyPEM(EVPKeyPointer* pkey, + const char* key_pem, + int key_pem_len, + bool allow_certificate) { + BIOPointer bp(BIO_new_mem_buf(const_cast(key_pem), key_pem_len)); + if (!bp) + return ParsePublicKeyResult::kParsePublicFailed; + + ParsePublicKeyResult ret; + + // Try PKCS#8 first. + ret = TryParsePublicKey(pkey, bp, "PUBLIC KEY", + [](const unsigned char** p, long l) { // NOLINT(runtime/int) + return d2i_PUBKEY(nullptr, p, l); + }); + if (ret != ParsePublicKeyResult::kParsePublicNotRecognized) + return ret; + + // Maybe it is PKCS#1. + CHECK(BIO_reset(bp.get())); + ret = TryParsePublicKey(pkey, bp, "RSA PUBLIC KEY", + [](const unsigned char** p, long l) { // NOLINT(runtime/int) + return d2i_PublicKey(EVP_PKEY_RSA, nullptr, p, l); + }); + if (ret != ParsePublicKeyResult::kParsePublicNotRecognized || + !allow_certificate) + return ret; + + // X.509 fallback. + CHECK(BIO_reset(bp.get())); + return TryParsePublicKey(pkey, bp, "CERTIFICATE", + [](const unsigned char** p, long l) { // NOLINT(runtime/int) + X509Pointer x509(d2i_X509(nullptr, p, l)); + return x509 ? X509_get_pubkey(x509.get()) : nullptr; + }); +} + +static bool ParsePublicKey(EVPKeyPointer* pkey, + const PublicKeyEncodingConfig& config, + const char* key, + size_t key_len, + bool allow_certificate) { + if (config.format_ == kKeyFormatPEM) { + ParsePublicKeyResult r = + ParsePublicKeyPEM(pkey, key, key_len, allow_certificate); + return r == ParsePublicKeyResult::kParsePublicOk; + } else { + CHECK_EQ(config.format_, kKeyFormatDER); + const unsigned char* p = reinterpret_cast(key); + if (config.type_.ToChecked() == kKeyEncodingPKCS1) { + pkey->reset(d2i_PublicKey(EVP_PKEY_RSA, nullptr, &p, key_len)); + return pkey; + } else { + CHECK_EQ(config.type_.ToChecked(), kKeyEncodingSPKI); + pkey->reset(d2i_PUBKEY(nullptr, &p, key_len)); + return pkey; + } + } +} + +static inline Local BIOToStringOrBuffer(Environment* env, + BIO* bio, + PKFormatType format) { + BUF_MEM* bptr; + BIO_get_mem_ptr(bio, &bptr); + if (format == kKeyFormatPEM) { + // PEM is an ASCII format, so we will return it as a string. + return String::NewFromUtf8(env->isolate(), bptr->data, + NewStringType::kNormal, + bptr->length).ToLocalChecked(); + } else { + CHECK_EQ(format, kKeyFormatDER); + // DER is binary, return it as a buffer. + return Buffer::Copy(env, bptr->data, bptr->length).ToLocalChecked(); + } +} + +static bool WritePublicKeyInner(EVP_PKEY* pkey, + const BIOPointer& bio, + const PublicKeyEncodingConfig& config) { + if (config.type_.ToChecked() == kKeyEncodingPKCS1) { + // PKCS#1 is only valid for RSA keys. + CHECK_EQ(EVP_PKEY_id(pkey), EVP_PKEY_RSA); + RSAPointer rsa(EVP_PKEY_get1_RSA(pkey)); + if (config.format_ == kKeyFormatPEM) { + // Encode PKCS#1 as PEM. + return PEM_write_bio_RSAPublicKey(bio.get(), rsa.get()) == 1; + } else { + // Encode PKCS#1 as DER. + CHECK_EQ(config.format_, kKeyFormatDER); + return i2d_RSAPublicKey_bio(bio.get(), rsa.get()) == 1; + } + } else { + CHECK_EQ(config.type_.ToChecked(), kKeyEncodingSPKI); + if (config.format_ == kKeyFormatPEM) { + // Encode SPKI as PEM. + return PEM_write_bio_PUBKEY(bio.get(), pkey) == 1; + } else { + // Encode SPKI as DER. + CHECK_EQ(config.format_, kKeyFormatDER); + return i2d_PUBKEY_bio(bio.get(), pkey) == 1; + } + } +} + +static MaybeLocal WritePublicKey(Environment* env, + EVP_PKEY* pkey, + const PublicKeyEncodingConfig& config) { + BIOPointer bio(BIO_new(BIO_s_mem())); + CHECK(bio); + + if (!WritePublicKeyInner(pkey, bio, config)) { + ThrowCryptoError(env, ERR_get_error(), "Failed to encode public key"); + return MaybeLocal(); + } + return BIOToStringOrBuffer(env, bio.get(), config.format_); +} + +static EVPKeyPointer ParsePrivateKey(const PrivateKeyEncodingConfig& config, + const char* key, + size_t key_len) { + EVPKeyPointer pkey; + + if (config.format_ == kKeyFormatPEM) { + BIOPointer bio(BIO_new_mem_buf(key, key_len)); + CHECK(bio); + + char* pass = const_cast(config.passphrase_.get()); + pkey.reset(PEM_read_bio_PrivateKey(bio.get(), + nullptr, + PasswordCallback, + pass)); + } else { + CHECK_EQ(config.format_, kKeyFormatDER); + + if (config.type_.ToChecked() == kKeyEncodingPKCS1) { + const unsigned char* p = reinterpret_cast(key); + pkey.reset(d2i_PrivateKey(EVP_PKEY_RSA, nullptr, &p, key_len)); + } else if (config.type_.ToChecked() == kKeyEncodingPKCS8) { + BIOPointer bio(BIO_new_mem_buf(key, key_len)); + CHECK(bio); + char* pass = const_cast(config.passphrase_.get()); + pkey.reset(d2i_PKCS8PrivateKey_bio(bio.get(), + nullptr, + PasswordCallback, + pass)); + } else { + CHECK_EQ(config.type_.ToChecked(), kKeyEncodingSEC1); + const unsigned char* p = reinterpret_cast(key); + pkey.reset(d2i_PrivateKey(EVP_PKEY_EC, nullptr, &p, key_len)); + } + } + + // OpenSSL can fail to parse the key but still return a non-null pointer. + if (ERR_peek_error() != 0) + pkey.reset(); + + return pkey; +} + +ByteSource::ByteSource(ByteSource&& other) + : data_(other.data_), + allocated_data_(other.allocated_data_), + size_(other.size_) { + other.allocated_data_ = nullptr; +} + +ByteSource::~ByteSource() { + OPENSSL_clear_free(allocated_data_, size_); +} + +ByteSource& ByteSource::operator=(ByteSource&& other) { + if (&other != this) { + OPENSSL_clear_free(allocated_data_, size_); + data_ = other.data_; + allocated_data_ = other.allocated_data_; + other.allocated_data_ = nullptr; + size_ = other.size_; + } + return *this; +} + +const char* ByteSource::get() const { + return data_; +} + +size_t ByteSource::size() const { + return size_; +} + +ByteSource ByteSource::FromStringOrBuffer(Environment* env, + Local value) { + return Buffer::HasInstance(value) ? FromBuffer(value) + : FromString(env, value.As()); +} + +ByteSource ByteSource::FromString(Environment* env, Local str, + bool ntc) { + CHECK(str->IsString()); + size_t size = str->Utf8Length(env->isolate()); + size_t alloc_size = ntc ? size + 1 : size; + char* data = MallocOpenSSL(alloc_size); + int opts = String::NO_OPTIONS; + if (!ntc) opts |= String::NO_NULL_TERMINATION; + str->WriteUtf8(env->isolate(), data, alloc_size, nullptr, opts); + return Allocated(data, size); +} + +ByteSource ByteSource::FromBuffer(Local buffer, bool ntc) { + size_t size = Buffer::Length(buffer); + if (ntc) { + char* data = MallocOpenSSL(size + 1); + memcpy(data, Buffer::Data(buffer), size); + data[size] = 0; + return Allocated(data, size); + } + return Foreign(Buffer::Data(buffer), size); +} + +ByteSource ByteSource::NullTerminatedCopy(Environment* env, + Local value) { + return Buffer::HasInstance(value) ? FromBuffer(value, true) + : FromString(env, value.As(), true); +} + +ByteSource ByteSource::FromSymmetricKeyObject(Local handle) { + CHECK(handle->IsObject()); + KeyObject* key = Unwrap(handle.As()); + CHECK(key); + return Foreign(key->GetSymmetricKey(), key->GetSymmetricKeySize()); +} + +ByteSource::ByteSource(const char* data, char* allocated_data, size_t size) + : data_(data), + allocated_data_(allocated_data), + size_(size) {} + +ByteSource ByteSource::Allocated(char* data, size_t size) { + return ByteSource(data, data, size); +} + +ByteSource ByteSource::Foreign(const char* data, size_t size) { + return ByteSource(data, nullptr, size); +} + +enum KeyEncodingContext { + kKeyContextInput, + kKeyContextExport, + kKeyContextGenerate +}; + +static void GetKeyFormatAndTypeFromJs( + AsymmetricKeyEncodingConfig* config, + const FunctionCallbackInfo& args, + unsigned int* offset, + KeyEncodingContext context) { + // During key pair generation, it is possible not to specify a key encoding, + // which will lead to a key object being returned. + if (args[*offset]->IsUndefined()) { + CHECK_EQ(context, kKeyContextGenerate); + CHECK(args[*offset + 1]->IsUndefined()); + config->output_key_object_ = true; + } else { + config->output_key_object_ = false; + + CHECK(args[*offset]->IsInt32()); + config->format_ = static_cast( + args[*offset].As()->Value()); + + if (args[*offset + 1]->IsInt32()) { + config->type_ = Just(static_cast( + args[*offset + 1].As()->Value())); + } else { + CHECK(context == kKeyContextInput && config->format_ == kKeyFormatPEM); + CHECK(args[*offset + 1]->IsNullOrUndefined()); + config->type_ = Nothing(); + } + } + + *offset += 2; +} + +static PublicKeyEncodingConfig GetPublicKeyEncodingFromJs( + const FunctionCallbackInfo& args, + unsigned int* offset, + KeyEncodingContext context) { + PublicKeyEncodingConfig result; + GetKeyFormatAndTypeFromJs(&result, args, offset, context); + return result; +} + +static ManagedEVPPKey GetPublicKeyFromJs( + const FunctionCallbackInfo& args, + unsigned int* offset, + bool allow_key_object, + bool allow_certificate) { + if (args[*offset]->IsString() || Buffer::HasInstance(args[*offset])) { + Environment* env = Environment::GetCurrent(args); + ByteSource key = ByteSource::FromStringOrBuffer(env, args[(*offset)++]); + PublicKeyEncodingConfig config = + GetPublicKeyEncodingFromJs(args, offset, kKeyContextInput); + EVPKeyPointer pkey; + ParsePublicKey(&pkey, config, key.get(), key.size(), allow_certificate); + if (!pkey) + ThrowCryptoError(env, ERR_get_error(), "Failed to read public key"); + return ManagedEVPPKey(pkey.release()); + } else { + CHECK(args[*offset]->IsObject() && allow_key_object); + KeyObject* key; + ASSIGN_OR_RETURN_UNWRAP(&key, args[*offset].As(), ManagedEVPPKey()); + CHECK_EQ(key->GetKeyType(), kKeyTypePublic); + (*offset) += 3; + return key->GetAsymmetricKey(); + } +} + +static NonCopyableMaybe GetPrivateKeyEncodingFromJs( + const FunctionCallbackInfo& args, + unsigned int* offset, + KeyEncodingContext context) { + Environment* env = Environment::GetCurrent(args); + + PrivateKeyEncodingConfig result; + GetKeyFormatAndTypeFromJs(&result, args, offset, context); + + if (result.output_key_object_) { + if (context != kKeyContextInput) + (*offset)++; + } else { + bool needs_passphrase = false; + if (context != kKeyContextInput) { + if (args[*offset]->IsString()) { + String::Utf8Value cipher_name(env->isolate(), + args[*offset].As()); + result.cipher_ = EVP_get_cipherbyname(*cipher_name); + if (result.cipher_ == nullptr) { + env->ThrowError("Unknown cipher"); + return NonCopyableMaybe(); + } + needs_passphrase = true; + } else { + CHECK(args[*offset]->IsNullOrUndefined()); + result.cipher_ = nullptr; + } + (*offset)++; + } + + if (args[*offset]->IsString() || Buffer::HasInstance(args[*offset])) { + CHECK_IMPLIES(context != kKeyContextInput, result.cipher_ != nullptr); + + result.passphrase_ = ByteSource::NullTerminatedCopy(env, args[*offset]); + } else { + CHECK(args[*offset]->IsNullOrUndefined() && !needs_passphrase); + } + } + + (*offset)++; + return NonCopyableMaybe(std::move(result)); +} + +static ManagedEVPPKey GetPrivateKeyFromJs( + const FunctionCallbackInfo& args, + unsigned int* offset, + bool allow_key_object) { + if (args[*offset]->IsString() || Buffer::HasInstance(args[*offset])) { + Environment* env = Environment::GetCurrent(args); + ByteSource key = ByteSource::FromStringOrBuffer(env, args[(*offset)++]); + NonCopyableMaybe config = + GetPrivateKeyEncodingFromJs(args, offset, kKeyContextInput); + if (config.IsEmpty()) + return ManagedEVPPKey(); + EVPKeyPointer pkey = + ParsePrivateKey(config.Release(), key.get(), key.size()); + if (!pkey) + ThrowCryptoError(env, ERR_get_error(), "Failed to read private key"); + return ManagedEVPPKey(pkey.release()); + } else { + CHECK(args[*offset]->IsObject() && allow_key_object); + KeyObject* key; + ASSIGN_OR_RETURN_UNWRAP(&key, args[*offset].As(), ManagedEVPPKey()); + CHECK_EQ(key->GetKeyType(), kKeyTypePrivate); + (*offset) += 4; + return key->GetAsymmetricKey(); + } +} + +static bool IsRSAPrivateKey(const unsigned char* data, size_t size) { + // Both RSAPrivateKey and RSAPublicKey structures start with a SEQUENCE. + if (size >= 2 && data[0] == 0x30) { + size_t offset; + if (data[1] & 0x80) { + // Long form. + size_t n_bytes = data[1] & ~0x80; + if (n_bytes + 2 > size || n_bytes > sizeof(size_t)) + return false; + size_t i, length = 0; + for (i = 0; i < n_bytes; i++) + length = (length << 8) | data[i + 2]; + offset = 2 + n_bytes; + size = std::min(size, length + 2); + } else { + // Short form. + offset = 2; + size = std::min(size, data[1] + 2); + } + + // An RSAPrivateKey sequence always starts with a single-byte integer whose + // value is either 0 or 1, whereas an RSAPublicKey starts with the modulus + // (which is the product of two primes and therefore at least 4), so we can + // decide the type of the structure based on the first three bytes of the + // sequence. + return size - offset >= 3 && + data[offset] == 2 && + data[offset + 1] == 1 && + !(data[offset + 2] & 0xfe); + } + + return false; +} + +static ManagedEVPPKey GetPublicOrPrivateKeyFromJs( + const FunctionCallbackInfo& args, + unsigned int* offset, + bool allow_key_object, + bool allow_certificate) { + if (args[*offset]->IsString() || Buffer::HasInstance(args[*offset])) { + Environment* env = Environment::GetCurrent(args); + ByteSource data = ByteSource::FromStringOrBuffer(env, args[(*offset)++]); + NonCopyableMaybe config_ = + GetPrivateKeyEncodingFromJs(args, offset, kKeyContextInput); + if (config_.IsEmpty()) + return ManagedEVPPKey(); + PrivateKeyEncodingConfig config = config_.Release(); + EVPKeyPointer pkey; + if (config.format_ == kKeyFormatPEM) { + // For PEM, we can easily determine whether it is a public or private key + // by looking for the respective PEM tags. + ParsePublicKeyResult ret = ParsePublicKeyPEM(&pkey, data.get(), + data.size(), + allow_certificate); + if (ret == ParsePublicKeyResult::kParsePublicNotRecognized) { + pkey = ParsePrivateKey(config, data.get(), data.size()); + } + } else { + // For DER, the type determines how to parse it. SPKI, PKCS#8 and SEC1 are + // easy, but PKCS#1 can be a public key or a private key. + bool is_public; + switch (config.type_.ToChecked()) { + case kKeyEncodingPKCS1: + is_public = !IsRSAPrivateKey( + reinterpret_cast(data.get()), data.size()); + break; + case kKeyEncodingSPKI: + is_public = true; + break; + case kKeyEncodingPKCS8: + case kKeyEncodingSEC1: + is_public = false; + break; + default: + CHECK(!"Invalid key encoding type"); + } + + if (is_public) { + ParsePublicKey(&pkey, config, data.get(), data.size(), + allow_certificate); + } else { + pkey = ParsePrivateKey(config, data.get(), data.size()); + } + } + if (!pkey) + ThrowCryptoError(env, ERR_get_error(), "Failed to read asymmetric key"); + return ManagedEVPPKey(pkey.release()); + } else { + CHECK(args[*offset]->IsObject() && allow_key_object); + KeyObject* key = Unwrap(args[*offset].As()); + CHECK(key); + CHECK_NE(key->GetKeyType(), kKeyTypeSecret); + (*offset) += 4; + return key->GetAsymmetricKey(); + } +} + +static MaybeLocal WritePrivateKey( + Environment* env, + EVP_PKEY* pkey, + const PrivateKeyEncodingConfig& config) { + BIOPointer bio(BIO_new(BIO_s_mem())); + CHECK(bio); + + bool err; + + if (config.type_.ToChecked() == kKeyEncodingPKCS1) { + // PKCS#1 is only permitted for RSA keys. + CHECK_EQ(EVP_PKEY_id(pkey), EVP_PKEY_RSA); + + RSAPointer rsa(EVP_PKEY_get1_RSA(pkey)); + if (config.format_ == kKeyFormatPEM) { + // Encode PKCS#1 as PEM. + const char* pass = config.passphrase_.get(); + err = PEM_write_bio_RSAPrivateKey( + bio.get(), rsa.get(), + config.cipher_, + reinterpret_cast(const_cast(pass)), + config.passphrase_.size(), + nullptr, nullptr) != 1; + } else { + // Encode PKCS#1 as DER. This does not permit encryption. + CHECK_EQ(config.format_, kKeyFormatDER); + CHECK_NULL(config.cipher_); + err = i2d_RSAPrivateKey_bio(bio.get(), rsa.get()) != 1; + } + } else if (config.type_.ToChecked() == kKeyEncodingPKCS8) { + if (config.format_ == kKeyFormatPEM) { + // Encode PKCS#8 as PEM. + err = PEM_write_bio_PKCS8PrivateKey( + bio.get(), pkey, + config.cipher_, + const_cast(config.passphrase_.get()), + config.passphrase_.size(), + nullptr, nullptr) != 1; + } else { + // Encode PKCS#8 as DER. + CHECK_EQ(config.format_, kKeyFormatDER); + err = i2d_PKCS8PrivateKey_bio( + bio.get(), pkey, + config.cipher_, + const_cast(config.passphrase_.get()), + config.passphrase_.size(), + nullptr, nullptr) != 1; + } + } else { + CHECK_EQ(config.type_.ToChecked(), kKeyEncodingSEC1); + + // SEC1 is only permitted for EC keys. + CHECK_EQ(EVP_PKEY_id(pkey), EVP_PKEY_EC); + + ECKeyPointer ec_key(EVP_PKEY_get1_EC_KEY(pkey)); + if (config.format_ == kKeyFormatPEM) { + // Encode SEC1 as PEM. + const char* pass = config.passphrase_.get(); + err = PEM_write_bio_ECPrivateKey( + bio.get(), ec_key.get(), + config.cipher_, + reinterpret_cast(const_cast(pass)), + config.passphrase_.size(), + nullptr, nullptr) != 1; + } else { + // Encode SEC1 as DER. This does not permit encryption. + CHECK_EQ(config.format_, kKeyFormatDER); + CHECK_NULL(config.cipher_); + err = i2d_ECPrivateKey_bio(bio.get(), ec_key.get()) != 1; + } + } + + if (err) { + ThrowCryptoError(env, ERR_get_error(), "Failed to encode private key"); + return MaybeLocal(); + } + return BIOToStringOrBuffer(env, bio.get(), config.format_); +} + +ManagedEVPPKey::ManagedEVPPKey() : pkey_(nullptr) {} + +ManagedEVPPKey::ManagedEVPPKey(EVP_PKEY* pkey) : pkey_(pkey) {} + +ManagedEVPPKey::ManagedEVPPKey(const ManagedEVPPKey& key) : pkey_(nullptr) { + *this = key; +} + +ManagedEVPPKey::ManagedEVPPKey(ManagedEVPPKey&& key) { + *this = key; +} + +ManagedEVPPKey::~ManagedEVPPKey() { + EVP_PKEY_free(pkey_); +} + +ManagedEVPPKey& ManagedEVPPKey::operator=(const ManagedEVPPKey& key) { + EVP_PKEY_free(pkey_); + pkey_ = key.pkey_; + EVP_PKEY_up_ref(pkey_); + return *this; +} + +ManagedEVPPKey& ManagedEVPPKey::operator=(ManagedEVPPKey&& key) { + EVP_PKEY_free(pkey_); + pkey_ = key.pkey_; + key.pkey_ = nullptr; + return *this; +} + +ManagedEVPPKey::operator bool() const { + return pkey_ != nullptr; +} + +EVP_PKEY* ManagedEVPPKey::get() const { + return pkey_; +} + +Local KeyObject::Initialize(Environment* env, Local target) { + Local t = env->NewFunctionTemplate(New); + t->InstanceTemplate()->SetInternalFieldCount(1); + + env->SetProtoMethod(t, "init", Init); + env->SetProtoMethodNoSideEffect(t, "getSymmetricKeySize", + GetSymmetricKeySize); + env->SetProtoMethodNoSideEffect(t, "getAsymmetricKeyType", + GetAsymmetricKeyType); + env->SetProtoMethod(t, "export", Export); + + target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "KeyObject"), + t->GetFunction(env->context()).ToLocalChecked()); + + return t->GetFunction(); +} + +Local KeyObject::Create(Environment* env, + KeyType key_type, + const ManagedEVPPKey& pkey) { + CHECK_NE(key_type, kKeyTypeSecret); + Local type = Integer::New(env->isolate(), key_type); + Local obj = + env->crypto_key_object_constructor()->NewInstance(env->context(), + 1, &type) + .ToLocalChecked(); + KeyObject* key = Unwrap(obj); + CHECK(key); + if (key_type == kKeyTypePublic) + key->InitPublic(pkey); + else + key->InitPrivate(pkey); + return obj; +} + +ManagedEVPPKey KeyObject::GetAsymmetricKey() const { + CHECK_NE(key_type_, kKeyTypeSecret); + return this->asymmetric_key_; +} + +const char* KeyObject::GetSymmetricKey() const { + CHECK_EQ(key_type_, kKeyTypeSecret); + return this->symmetric_key_.get(); +} + +size_t KeyObject::GetSymmetricKeySize() const { + CHECK_EQ(key_type_, kKeyTypeSecret); + return this->symmetric_key_len_; +} + +void KeyObject::New(const FunctionCallbackInfo& args) { + CHECK(args.IsConstructCall()); + CHECK(args[0]->IsInt32()); + KeyType key_type = static_cast(args[0].As()->Value()); + Environment* env = Environment::GetCurrent(args); + new KeyObject(env, args.This(), key_type); +} + +KeyType KeyObject::GetKeyType() const { + return this->key_type_; +} + +void KeyObject::Init(const FunctionCallbackInfo& args) { + KeyObject* key; + ASSIGN_OR_RETURN_UNWRAP(&key, args.Holder()); + + unsigned int offset; + ManagedEVPPKey pkey; + + switch (key->key_type_) { + case kKeyTypeSecret: + CHECK_EQ(args.Length(), 1); + key->InitSecret(Buffer::Data(args[0]), Buffer::Length(args[0])); + break; + case kKeyTypePublic: + CHECK_EQ(args.Length(), 3); + + offset = 0; + pkey = GetPublicKeyFromJs(args, &offset, false, false); + if (!pkey) + return; + key->InitPublic(pkey); + break; + case kKeyTypePrivate: + CHECK_EQ(args.Length(), 4); + + offset = 0; + pkey = GetPrivateKeyFromJs(args, &offset, false); + if (!pkey) + return; + key->InitPrivate(pkey); + break; + default: + CHECK(false); + } +} + +void KeyObject::InitSecret(const char* key, size_t key_len) { + CHECK_EQ(this->key_type_, kKeyTypeSecret); + + char* mem = MallocOpenSSL(key_len); + memcpy(mem, key, key_len); + this->symmetric_key_ = std::unique_ptr>(mem, + [key_len](char* p) { + OPENSSL_clear_free(p, key_len); + }); + this->symmetric_key_len_ = key_len; +} + +void KeyObject::InitPublic(const ManagedEVPPKey& pkey) { + CHECK_EQ(this->key_type_, kKeyTypePublic); + CHECK(pkey); + this->asymmetric_key_ = pkey; +} + +void KeyObject::InitPrivate(const ManagedEVPPKey& pkey) { + CHECK_EQ(this->key_type_, kKeyTypePrivate); + CHECK(pkey); + this->asymmetric_key_ = pkey; +} + +Local KeyObject::GetAsymmetricKeyType() const { + CHECK_NE(this->key_type_, kKeyTypeSecret); + switch (EVP_PKEY_id(this->asymmetric_key_.get())) { + case EVP_PKEY_RSA: + return env()->crypto_rsa_string(); + case EVP_PKEY_DSA: + return env()->crypto_dsa_string(); + case EVP_PKEY_EC: + return env()->crypto_ec_string(); + default: + CHECK(false); + } +} + +void KeyObject::GetAsymmetricKeyType(const FunctionCallbackInfo& args) { + KeyObject* key; + ASSIGN_OR_RETURN_UNWRAP(&key, args.Holder()); + + args.GetReturnValue().Set(key->GetAsymmetricKeyType()); +} + +void KeyObject::GetSymmetricKeySize(const FunctionCallbackInfo& args) { + KeyObject* key; + ASSIGN_OR_RETURN_UNWRAP(&key, args.Holder()); + args.GetReturnValue().Set(static_cast(key->GetSymmetricKeySize())); +} + +void KeyObject::Export(const v8::FunctionCallbackInfo& args) { + KeyObject* key; + ASSIGN_OR_RETURN_UNWRAP(&key, args.Holder()); + + MaybeLocal result; + if (key->key_type_ == kKeyTypeSecret) { + result = key->ExportSecretKey(); + } else if (key->key_type_ == kKeyTypePublic) { + unsigned int offset = 0; + PublicKeyEncodingConfig config = + GetPublicKeyEncodingFromJs(args, &offset, kKeyContextExport); + CHECK_EQ(offset, static_cast(args.Length())); + result = key->ExportPublicKey(config); + } else { + CHECK_EQ(key->key_type_, kKeyTypePrivate); + unsigned int offset = 0; + NonCopyableMaybe config = + GetPrivateKeyEncodingFromJs(args, &offset, kKeyContextExport); + if (config.IsEmpty()) + return; + CHECK_EQ(offset, static_cast(args.Length())); + result = key->ExportPrivateKey(config.Release()); + } + + if (!result.IsEmpty()) + args.GetReturnValue().Set(result.ToLocalChecked()); +} + +Local KeyObject::ExportSecretKey() const { + return Buffer::Copy(env(), symmetric_key_.get(), symmetric_key_len_) + .ToLocalChecked(); +} + +MaybeLocal KeyObject::ExportPublicKey( + const PublicKeyEncodingConfig& config) const { + return WritePublicKey(env(), asymmetric_key_.get(), config); +} + +MaybeLocal KeyObject::ExportPrivateKey( + const PrivateKeyEncodingConfig& config) const { + return WritePrivateKey(env(), asymmetric_key_.get(), config); +} + + void CipherBase::Initialize(Environment* env, Local target) { Local t = env->NewFunctionTemplate(New); @@ -2837,6 +3669,15 @@ void CipherBase::InitIv(const char* cipher_type, } +static ByteSource GetSecretKeyBytes(Environment* env, Local value) { + // A key can be passed as a string, buffer or KeyObject with type 'secret'. + // If it is a string, we need to convert it to a buffer. We are not doing that + // in JS to avoid creating an unprotected copy on the heap. + return value->IsString() || Buffer::HasInstance(value) ? + ByteSource::FromStringOrBuffer(env, value) : + ByteSource::FromSymmetricKeyObject(value); +} + void CipherBase::InitIv(const FunctionCallbackInfo& args) { CipherBase* cipher; ASSIGN_OR_RETURN_UNWRAP(&cipher, args.Holder()); @@ -2845,9 +3686,8 @@ void CipherBase::InitIv(const FunctionCallbackInfo& args) { CHECK_GE(args.Length(), 4); const node::Utf8Value cipher_type(env->isolate(), args[0]); - ssize_t key_len = Buffer::Length(args[1]); - const unsigned char* key_buf = reinterpret_cast( - Buffer::Data(args[1])); + const ByteSource key = GetSecretKeyBytes(env, args[1]); + ssize_t iv_len; const unsigned char* iv_buf; if (args[2]->IsNull()) { @@ -2868,7 +3708,12 @@ void CipherBase::InitIv(const FunctionCallbackInfo& args) { auth_tag_len = kNoAuthTagLength; } - cipher->InitIv(*cipher_type, key_buf, key_len, iv_buf, iv_len, auth_tag_len); + cipher->InitIv(*cipher_type, + reinterpret_cast(key.get()), + key.size(), + iv_buf, + iv_len, + auth_tag_len); } @@ -3324,9 +4169,8 @@ void Hmac::HmacInit(const FunctionCallbackInfo& args) { Environment* env = hmac->env(); const node::Utf8Value hash_type(env->isolate(), args[0]); - const char* buffer_data = Buffer::Data(args[1]); - size_t buffer_length = Buffer::Length(args[1]); - hmac->HmacInit(*hash_type, buffer_data, buffer_length); + ByteSource key = GetSecretKeyBytes(env, args[1]); + hmac->HmacInit(*hash_type, key.get(), key.size()); } @@ -3575,7 +4419,7 @@ void SignBase::CheckThrow(SignBase::Error error) { } } -static bool ApplyRSAOptions(const EVPKeyPointer& pkey, +static bool ApplyRSAOptions(const ManagedEVPPKey& pkey, EVP_PKEY_CTX* pkctx, int padding, int salt_len) { @@ -3637,7 +4481,7 @@ void Sign::SignUpdate(const FunctionCallbackInfo& args) { } static MallocedBuffer Node_SignFinal(EVPMDPointer&& mdctx, - const EVPKeyPointer& pkey, + const ManagedEVPPKey& pkey, int padding, int pss_salt_len) { unsigned char m[EVP_MAX_MD_SIZE]; @@ -3666,9 +4510,7 @@ static MallocedBuffer Node_SignFinal(EVPMDPointer&& mdctx, } Sign::SignResult Sign::SignFinal( - const char* key_pem, - int key_pem_len, - const char* passphrase, + const ManagedEVPPKey& pkey, int padding, int salt_len) { if (!mdctx_) @@ -3676,21 +4518,6 @@ Sign::SignResult Sign::SignFinal( EVPMDPointer mdctx = std::move(mdctx_); - BIOPointer bp(BIO_new_mem_buf(const_cast(key_pem), key_pem_len)); - if (!bp) - return SignResult(kSignPrivateKey); - - EVPKeyPointer pkey(PEM_read_bio_PrivateKey(bp.get(), - nullptr, - PasswordCallback, - const_cast(passphrase))); - - // Errors might be injected into OpenSSL's error stack - // without `pkey` being set to nullptr; - // cf. the test of `test_bad_rsa_privkey.pem` for an example. - if (!pkey || 0 != ERR_peek_error()) - return SignResult(kSignPrivateKey); - #ifdef NODE_FIPS_MODE /* Validate DSA2 parameters from FIPS 186-4 */ if (FIPS_mode() && EVP_PKEY_DSA == pkey->type) { @@ -3726,25 +4553,21 @@ void Sign::SignFinal(const FunctionCallbackInfo& args) { Sign* sign; ASSIGN_OR_RETURN_UNWRAP(&sign, args.Holder()); - unsigned int len = args.Length(); - - node::Utf8Value passphrase(env->isolate(), args[1]); - - size_t buf_len = Buffer::Length(args[0]); - char* buf = Buffer::Data(args[0]); + unsigned int offset = 0; + ManagedEVPPKey key = GetPrivateKeyFromJs(args, &offset, true); + if (!key) + return; - CHECK(args[2]->IsInt32()); - int padding = args[2].As()->Value(); + CHECK(args[offset]->IsInt32()); + int padding = args[offset].As()->Value(); - CHECK(args[3]->IsInt32()); - int salt_len = args[3].As()->Value(); + CHECK(args[offset + 1]->IsInt32()); + int salt_len = args[offset + 1].As()->Value(); ClearErrorOnReturn clear_error_on_return; SignResult ret = sign->SignFinal( - buf, - buf_len, - len >= 2 && !args[1]->IsNull() ? *passphrase : nullptr, + key, padding, salt_len); @@ -3760,72 +4583,6 @@ void Sign::SignFinal(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(rc); } -enum ParsePublicKeyResult { - kParsePublicOk, - kParsePublicNotRecognized, - kParsePublicFailed -}; - -static ParsePublicKeyResult TryParsePublicKey( - EVPKeyPointer* pkey, - const BIOPointer& bp, - const char* name, - // NOLINTNEXTLINE(runtime/int) - std::function parse) { - unsigned char* der_data; - long der_len; // NOLINT(runtime/int) - - // This skips surrounding data and decodes PEM to DER. - { - MarkPopErrorOnReturn mark_pop_error_on_return; - if (PEM_bytes_read_bio(&der_data, &der_len, nullptr, name, - bp.get(), nullptr, nullptr) != 1) - return kParsePublicNotRecognized; - } - - // OpenSSL might modify the pointer, so we need to make a copy before parsing. - const unsigned char* p = der_data; - pkey->reset(parse(&p, der_len)); - OPENSSL_clear_free(der_data, der_len); - - return *pkey ? kParsePublicOk : kParsePublicFailed; -} - -static ParsePublicKeyResult ParsePublicKey(EVPKeyPointer* pkey, - const char* key_pem, - int key_pem_len) { - BIOPointer bp(BIO_new_mem_buf(const_cast(key_pem), key_pem_len)); - if (!bp) - return kParsePublicFailed; - - ParsePublicKeyResult ret; - - // Try PKCS#8 first. - ret = TryParsePublicKey(pkey, bp, "PUBLIC KEY", - [](const unsigned char** p, long l) { // NOLINT(runtime/int) - return d2i_PUBKEY(nullptr, p, l); - }); - if (ret != kParsePublicNotRecognized) - return ret; - - // Maybe it is PKCS#1. - CHECK(BIO_reset(bp.get())); - ret = TryParsePublicKey(pkey, bp, "RSA PUBLIC KEY", - [](const unsigned char** p, long l) { // NOLINT(runtime/int) - return d2i_PublicKey(EVP_PKEY_RSA, nullptr, p, l); - }); - if (ret != kParsePublicNotRecognized) - return ret; - - // X.509 fallback. - CHECK(BIO_reset(bp.get())); - return TryParsePublicKey(pkey, bp, "CERTIFICATE", - [](const unsigned char** p, long l) { // NOLINT(runtime/int) - X509Pointer x509(d2i_X509(nullptr, p, l)); - return x509 ? X509_get_pubkey(x509.get()) : nullptr; - }); -} - void Verify::Initialize(Environment* env, Local target) { Local t = env->NewFunctionTemplate(New); @@ -3869,8 +4626,7 @@ void Verify::VerifyUpdate(const FunctionCallbackInfo& args) { } -SignBase::Error Verify::VerifyFinal(const char* key_pem, - int key_pem_len, +SignBase::Error Verify::VerifyFinal(const ManagedEVPPKey& pkey, const char* sig, int siglen, int padding, @@ -3879,15 +4635,11 @@ SignBase::Error Verify::VerifyFinal(const char* key_pem, if (!mdctx_) return kSignNotInitialised; - EVPKeyPointer pkey; unsigned char m[EVP_MAX_MD_SIZE]; unsigned int m_len; *verify_result = false; EVPMDPointer mdctx = std::move(mdctx_); - if (ParsePublicKey(&pkey, key_pem, key_pem_len) != kParsePublicOk) - return kSignPublicKey; - if (!EVP_DigestFinal_ex(mdctx.get(), m, &m_len)) return kSignPublicKey; @@ -3915,20 +4667,20 @@ void Verify::VerifyFinal(const FunctionCallbackInfo& args) { Verify* verify; ASSIGN_OR_RETURN_UNWRAP(&verify, args.Holder()); - char* kbuf = Buffer::Data(args[0]); - ssize_t klen = Buffer::Length(args[0]); + unsigned int offset = 0; + ManagedEVPPKey pkey = GetPublicKeyFromJs(args, &offset, true, true); - char* hbuf = Buffer::Data(args[1]); - ssize_t hlen = Buffer::Length(args[1]); + char* hbuf = Buffer::Data(args[offset]); + ssize_t hlen = Buffer::Length(args[offset]); - CHECK(args[2]->IsInt32()); - int padding = args[2].As()->Value(); + CHECK(args[offset + 1]->IsInt32()); + int padding = args[offset + 1].As()->Value(); - CHECK(args[3]->IsInt32()); - int salt_len = args[3].As()->Value(); + CHECK(args[offset + 2]->IsInt32()); + int salt_len = args[offset + 2].As()->Value(); bool verify_result; - Error err = verify->VerifyFinal(kbuf, klen, hbuf, hlen, padding, salt_len, + Error err = verify->VerifyFinal(pkey, hbuf, hlen, padding, salt_len, &verify_result); if (err != kSignOk) return verify->CheckThrow(err); @@ -3939,36 +4691,12 @@ void Verify::VerifyFinal(const FunctionCallbackInfo& args) { template -bool PublicKeyCipher::Cipher(const char* key_pem, - int key_pem_len, - const char* passphrase, +bool PublicKeyCipher::Cipher(const ManagedEVPPKey& pkey, int padding, const unsigned char* data, int len, unsigned char** out, size_t* out_len) { - EVPKeyPointer pkey; - - // Check if this is a PKCS#8 or RSA public key before trying as X.509 and - // private key. - if (operation == kPublic) { - ParsePublicKeyResult pkeyres = ParsePublicKey(&pkey, key_pem, key_pem_len); - if (pkeyres == kParsePublicFailed) - return false; - } - if (!pkey) { - // Private key fallback. - BIOPointer bp(BIO_new_mem_buf(const_cast(key_pem), key_pem_len)); - if (!bp) - return false; - pkey.reset(PEM_read_bio_PrivateKey(bp.get(), - nullptr, - PasswordCallback, - const_cast(passphrase))); - if (!pkey) - return false; - } - EVPKeyCtxPointer ctx(EVP_PKEY_CTX_new(pkey.get(), nullptr)); if (!ctx) return false; @@ -3995,18 +4723,17 @@ template & args) { Environment* env = Environment::GetCurrent(args); - THROW_AND_RETURN_IF_NOT_BUFFER(env, args[0], "Key"); - char* kbuf = Buffer::Data(args[0]); - ssize_t klen = Buffer::Length(args[0]); + unsigned int offset = 0; + ManagedEVPPKey pkey = GetPublicOrPrivateKeyFromJs(args, &offset, true, true); + if (!pkey) + return; - THROW_AND_RETURN_IF_NOT_BUFFER(env, args[1], "Data"); - char* buf = Buffer::Data(args[1]); - ssize_t len = Buffer::Length(args[1]); + THROW_AND_RETURN_IF_NOT_BUFFER(env, args[offset], "Data"); + char* buf = Buffer::Data(args[offset]); + ssize_t len = Buffer::Length(args[offset]); uint32_t padding; - if (!args[2]->Uint32Value(env->context()).To(&padding)) return; - - String::Utf8Value passphrase(args.GetIsolate(), args[3]); + if (!args[offset + 1]->Uint32Value(env->context()).To(&padding)) return; unsigned char* out_value = nullptr; size_t out_len = 0; @@ -4014,9 +4741,7 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo& args) { ClearErrorOnReturn clear_error_on_return; bool r = Cipher( - kbuf, - klen, - args.Length() >= 4 && !args[3]->IsNull() ? *passphrase : nullptr, + pkey, padding, reinterpret_cast(buf), len, @@ -5021,46 +5746,17 @@ class ECKeyPairGenerationConfig : public KeyPairGenerationConfig { const int param_encoding_; }; -enum PKEncodingType { - // RSAPublicKey / RSAPrivateKey according to PKCS#1. - PK_ENCODING_PKCS1, - // PrivateKeyInfo or EncryptedPrivateKeyInfo according to PKCS#8. - PK_ENCODING_PKCS8, - // SubjectPublicKeyInfo according to X.509. - PK_ENCODING_SPKI, - // ECPrivateKey according to SEC1. - PK_ENCODING_SEC1 -}; - -enum PKFormatType { - PK_FORMAT_DER, - PK_FORMAT_PEM -}; - -struct KeyPairEncodingConfig { - PKEncodingType type_; - PKFormatType format_; -}; - -typedef KeyPairEncodingConfig PublicKeyEncodingConfig; - -struct PrivateKeyEncodingConfig : public KeyPairEncodingConfig { - const EVP_CIPHER* cipher_; - // This char* will be passed to OPENSSL_clear_free. - std::shared_ptr passphrase_; - unsigned int passphrase_length_; -}; - class GenerateKeyPairJob : public CryptoJob { public: GenerateKeyPairJob(Environment* env, std::unique_ptr config, PublicKeyEncodingConfig public_key_encoding, - PrivateKeyEncodingConfig private_key_encoding) + PrivateKeyEncodingConfig&& private_key_encoding) : CryptoJob(env), config_(std::move(config)), public_key_encoding_(public_key_encoding), - private_key_encoding_(private_key_encoding), + private_key_encoding_(std::forward( + private_key_encoding)), pkey_(nullptr) {} inline void DoThreadPoolWork() override { @@ -5089,7 +5785,7 @@ class GenerateKeyPairJob : public CryptoJob { EVP_PKEY* pkey = nullptr; if (EVP_PKEY_keygen(ctx.get(), &pkey) != 1) return false; - pkey_.reset(pkey); + pkey_ = ManagedEVPPKey(pkey); return true; } @@ -5116,197 +5812,59 @@ class GenerateKeyPairJob : public CryptoJob { } inline bool EncodeKeys(Local* pubkey, Local* privkey) { - EVP_PKEY* pkey = pkey_.get(); - BIOPointer bio(BIO_new(BIO_s_mem())); - CHECK(bio); - // Encode the public key. - if (public_key_encoding_.type_ == PK_ENCODING_PKCS1) { - // PKCS#1 is only valid for RSA keys. - CHECK_EQ(EVP_PKEY_id(pkey), EVP_PKEY_RSA); - RSAPointer rsa(EVP_PKEY_get1_RSA(pkey)); - if (public_key_encoding_.format_ == PK_FORMAT_PEM) { - // Encode PKCS#1 as PEM. - if (PEM_write_bio_RSAPublicKey(bio.get(), rsa.get()) != 1) - return false; - } else { - // Encode PKCS#1 as DER. - CHECK_EQ(public_key_encoding_.format_, PK_FORMAT_DER); - if (i2d_RSAPublicKey_bio(bio.get(), rsa.get()) != 1) - return false; - } + if (public_key_encoding_.output_key_object_) { + // Note that this has the downside of containing sensitive data of the + // private key. + *pubkey = KeyObject::Create(env, kKeyTypePublic, pkey_); } else { - CHECK_EQ(public_key_encoding_.type_, PK_ENCODING_SPKI); - if (public_key_encoding_.format_ == PK_FORMAT_PEM) { - // Encode SPKI as PEM. - if (PEM_write_bio_PUBKEY(bio.get(), pkey) != 1) - return false; - } else { - // Encode SPKI as DER. - CHECK_EQ(public_key_encoding_.format_, PK_FORMAT_DER); - if (i2d_PUBKEY_bio(bio.get(), pkey) != 1) - return false; - } + MaybeLocal maybe_pubkey = + WritePublicKey(env, pkey_.get(), public_key_encoding_); + if (maybe_pubkey.IsEmpty()) + return false; + *pubkey = maybe_pubkey.ToLocalChecked(); } - // Convert the contents of the BIO to a JavaScript object. - BIOToStringOrBuffer(bio.get(), public_key_encoding_.format_, pubkey); - USE(BIO_reset(bio.get())); - - // Now do the same for the private key (which is a bit more difficult). - if (private_key_encoding_.type_ == PK_ENCODING_PKCS1) { - // PKCS#1 is only permitted for RSA keys. - CHECK_EQ(EVP_PKEY_id(pkey), EVP_PKEY_RSA); - - RSAPointer rsa(EVP_PKEY_get1_RSA(pkey)); - if (private_key_encoding_.format_ == PK_FORMAT_PEM) { - // Encode PKCS#1 as PEM. - char* pass = private_key_encoding_.passphrase_.get(); - if (PEM_write_bio_RSAPrivateKey( - bio.get(), rsa.get(), - private_key_encoding_.cipher_, - reinterpret_cast(pass), - private_key_encoding_.passphrase_length_, - nullptr, nullptr) != 1) - return false; - } else { - // Encode PKCS#1 as DER. This does not permit encryption. - CHECK_EQ(private_key_encoding_.format_, PK_FORMAT_DER); - CHECK_NULL(private_key_encoding_.cipher_); - if (i2d_RSAPrivateKey_bio(bio.get(), rsa.get()) != 1) - return false; - } - } else if (private_key_encoding_.type_ == PK_ENCODING_PKCS8) { - if (private_key_encoding_.format_ == PK_FORMAT_PEM) { - // Encode PKCS#8 as PEM. - if (PEM_write_bio_PKCS8PrivateKey( - bio.get(), pkey, - private_key_encoding_.cipher_, - private_key_encoding_.passphrase_.get(), - private_key_encoding_.passphrase_length_, - nullptr, nullptr) != 1) - return false; - } else { - // Encode PKCS#8 as DER. - CHECK_EQ(private_key_encoding_.format_, PK_FORMAT_DER); - if (i2d_PKCS8PrivateKey_bio( - bio.get(), pkey, - private_key_encoding_.cipher_, - private_key_encoding_.passphrase_.get(), - private_key_encoding_.passphrase_length_, - nullptr, nullptr) != 1) - return false; - } + // Now do the same for the private key. + if (private_key_encoding_.output_key_object_) { + *privkey = KeyObject::Create(env, kKeyTypePrivate, pkey_); } else { - CHECK_EQ(private_key_encoding_.type_, PK_ENCODING_SEC1); - - // SEC1 is only permitted for EC keys. - CHECK_EQ(EVP_PKEY_id(pkey), EVP_PKEY_EC); - - ECKeyPointer ec_key(EVP_PKEY_get1_EC_KEY(pkey)); - if (private_key_encoding_.format_ == PK_FORMAT_PEM) { - // Encode SEC1 as PEM. - char* pass = private_key_encoding_.passphrase_.get(); - if (PEM_write_bio_ECPrivateKey( - bio.get(), ec_key.get(), - private_key_encoding_.cipher_, - reinterpret_cast(pass), - private_key_encoding_.passphrase_length_, - nullptr, nullptr) != 1) - return false; - } else { - // Encode SEC1 as DER. This does not permit encryption. - CHECK_EQ(private_key_encoding_.format_, PK_FORMAT_DER); - CHECK_NULL(private_key_encoding_.cipher_); - if (i2d_ECPrivateKey_bio(bio.get(), ec_key.get()) != 1) - return false; - } + MaybeLocal maybe_privkey = + WritePrivateKey(env, pkey_.get(), private_key_encoding_); + if (maybe_privkey.IsEmpty()) + return false; + *privkey = maybe_privkey.ToLocalChecked(); } - BIOToStringOrBuffer(bio.get(), private_key_encoding_.format_, privkey); return true; } - inline void BIOToStringOrBuffer(BIO* bio, PKFormatType format, - Local* out) const { - BUF_MEM* bptr; - BIO_get_mem_ptr(bio, &bptr); - if (format == PK_FORMAT_PEM) { - // PEM is an ASCII format, so we will return it as a string. - *out = String::NewFromUtf8(env->isolate(), bptr->data, - NewStringType::kNormal, - bptr->length).ToLocalChecked(); - } else { - CHECK_EQ(format, PK_FORMAT_DER); - // DER is binary, return it as a buffer. - *out = Buffer::Copy(env, bptr->data, bptr->length).ToLocalChecked(); - } - } - private: CryptoErrorVector errors_; std::unique_ptr config_; PublicKeyEncodingConfig public_key_encoding_; PrivateKeyEncodingConfig private_key_encoding_; - EVPKeyPointer pkey_; + ManagedEVPPKey pkey_; }; void GenerateKeyPair(const FunctionCallbackInfo& args, - unsigned int n_opts, + unsigned int offset, std::unique_ptr config) { Environment* env = Environment::GetCurrent(args); - PublicKeyEncodingConfig public_key_encoding; - PrivateKeyEncodingConfig private_key_encoding; - - // Public key encoding: type (int) + pem (bool) - CHECK(args[n_opts]->IsInt32()); - public_key_encoding.type_ = static_cast( - args[n_opts].As()->Value()); - CHECK(args[n_opts + 1]->IsInt32()); - public_key_encoding.format_ = static_cast( - args[n_opts + 1].As()->Value()); - - // Private key encoding: type (int) + pem (bool) + cipher (optional, string) + - // passphrase (optional, string) - CHECK(args[n_opts + 2]->IsInt32()); - private_key_encoding.type_ = static_cast( - args[n_opts + 2].As()->Value()); - CHECK(args[n_opts + 1]->IsInt32()); - private_key_encoding.format_ = static_cast( - args[n_opts + 3].As()->Value()); - if (args[n_opts + 4]->IsString()) { - String::Utf8Value cipher_name(env->isolate(), - args[n_opts + 4].As()); - private_key_encoding.cipher_ = EVP_get_cipherbyname(*cipher_name); - if (private_key_encoding.cipher_ == nullptr) - return env->ThrowError("Unknown cipher"); - - // We need to take ownership of the string and want to avoid creating an - // unnecessary copy in memory, that's why we are not using String::Utf8Value - // here. - CHECK(args[n_opts + 5]->IsString()); - Local passphrase = args[n_opts + 5].As(); - int len = passphrase->Utf8Length(env->isolate()); - private_key_encoding.passphrase_length_ = len; - void* mem = OPENSSL_malloc(private_key_encoding.passphrase_length_ + 1); - CHECK_NOT_NULL(mem); - private_key_encoding.passphrase_.reset(static_cast(mem), - [len](char* p) { - OPENSSL_clear_free(p, len); - }); - passphrase->WriteUtf8(env->isolate(), - private_key_encoding.passphrase_.get()); - } else { - CHECK(args[n_opts + 5]->IsNullOrUndefined()); - private_key_encoding.cipher_ = nullptr; - private_key_encoding.passphrase_length_ = 0; - } + + PublicKeyEncodingConfig public_key_encoding = + GetPublicKeyEncodingFromJs(args, &offset, kKeyContextGenerate); + NonCopyableMaybe private_key_encoding = + GetPrivateKeyEncodingFromJs(args, &offset, kKeyContextGenerate); + + if (private_key_encoding.IsEmpty()) + return; std::unique_ptr job( new GenerateKeyPairJob(env, std::move(config), public_key_encoding, - private_key_encoding)); - if (args[n_opts + 6]->IsObject()) - return GenerateKeyPairJob::Run(std::move(job), args[n_opts + 6]); + private_key_encoding.Release())); + if (args[offset]->IsObject()) + return GenerateKeyPairJob::Run(std::move(job), args[offset]); env->PrintSyncTrace(); job->DoThreadPoolWork(); Local err, pubkey, privkey; @@ -5750,6 +6308,7 @@ void Initialize(Local target, Environment* env = Environment::GetCurrent(context); SecureContext::Initialize(env, target); + env->set_crypto_key_object_constructor(KeyObject::Initialize(env, target)); CipherBase::Initialize(env, target); DiffieHellman::Initialize(env, target); ECDH::Initialize(env, target); @@ -5778,12 +6337,15 @@ void Initialize(Local target, env->SetMethod(target, "generateKeyPairEC", GenerateKeyPairEC); NODE_DEFINE_CONSTANT(target, OPENSSL_EC_NAMED_CURVE); NODE_DEFINE_CONSTANT(target, OPENSSL_EC_EXPLICIT_CURVE); - NODE_DEFINE_CONSTANT(target, PK_ENCODING_PKCS1); - NODE_DEFINE_CONSTANT(target, PK_ENCODING_PKCS8); - NODE_DEFINE_CONSTANT(target, PK_ENCODING_SPKI); - NODE_DEFINE_CONSTANT(target, PK_ENCODING_SEC1); - NODE_DEFINE_CONSTANT(target, PK_FORMAT_DER); - NODE_DEFINE_CONSTANT(target, PK_FORMAT_PEM); + NODE_DEFINE_CONSTANT(target, kKeyEncodingPKCS1); + NODE_DEFINE_CONSTANT(target, kKeyEncodingPKCS8); + NODE_DEFINE_CONSTANT(target, kKeyEncodingSPKI); + NODE_DEFINE_CONSTANT(target, kKeyEncodingSEC1); + NODE_DEFINE_CONSTANT(target, kKeyFormatDER); + NODE_DEFINE_CONSTANT(target, kKeyFormatPEM); + NODE_DEFINE_CONSTANT(target, kKeyTypeSecret); + NODE_DEFINE_CONSTANT(target, kKeyTypePublic); + NODE_DEFINE_CONSTANT(target, kKeyTypePrivate); env->SetMethod(target, "randomBytes", RandomBytes); env->SetMethodNoSideEffect(target, "timingSafeEqual", TimingSafeEqual); env->SetMethodNoSideEffect(target, "getSSLCiphers", GetSSLCiphers); diff --git a/src/node_crypto.h b/src/node_crypto.h index 0ee45cf9ea2c02..ef8f2bce2e99f4 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -341,6 +341,163 @@ class SSLWrap { friend class SecureContext; }; +// A helper class representing a read-only byte array. When deallocated, its +// contents are zeroed. +class ByteSource { + public: + ByteSource() = default; + ByteSource(ByteSource&& other); + ~ByteSource(); + + ByteSource& operator=(ByteSource&& other); + + const char* get() const; + size_t size() const; + + static ByteSource FromStringOrBuffer(Environment* env, + v8::Local value); + + static ByteSource FromString(Environment* env, + v8::Local str, + bool ntc = false); + + static ByteSource FromBuffer(v8::Local buffer, + bool ntc = false); + + static ByteSource NullTerminatedCopy(Environment* env, + v8::Local value); + + static ByteSource FromSymmetricKeyObject(v8::Local handle); + + private: + const char* data_ = nullptr; + char* allocated_data_ = nullptr; + size_t size_ = 0; + + ByteSource(const char* data, char* allocated_data, size_t size); + + static ByteSource Allocated(char* data, size_t size); + static ByteSource Foreign(const char* data, size_t size); + + DISALLOW_COPY_AND_ASSIGN(ByteSource); +}; + +enum PKEncodingType { + // RSAPublicKey / RSAPrivateKey according to PKCS#1. + kKeyEncodingPKCS1, + // PrivateKeyInfo or EncryptedPrivateKeyInfo according to PKCS#8. + kKeyEncodingPKCS8, + // SubjectPublicKeyInfo according to X.509. + kKeyEncodingSPKI, + // ECPrivateKey according to SEC1. + kKeyEncodingSEC1 +}; + +enum PKFormatType { + kKeyFormatDER, + kKeyFormatPEM +}; + +struct AsymmetricKeyEncodingConfig { + bool output_key_object_; + PKFormatType format_; + v8::Maybe type_ = v8::Nothing(); +}; + +typedef AsymmetricKeyEncodingConfig PublicKeyEncodingConfig; + +struct PrivateKeyEncodingConfig : public AsymmetricKeyEncodingConfig { + const EVP_CIPHER* cipher_; + ByteSource passphrase_; +}; + +enum KeyType { + kKeyTypeSecret, + kKeyTypePublic, + kKeyTypePrivate +}; + +// This uses the built-in reference counter of OpenSSL to manage an EVP_PKEY +// which is slightly more efficient than using a shared pointer and easier to +// use. +class ManagedEVPPKey { + public: + ManagedEVPPKey(); + explicit ManagedEVPPKey(EVP_PKEY* pkey); + ManagedEVPPKey(const ManagedEVPPKey& key); + ManagedEVPPKey(ManagedEVPPKey&& key); + ~ManagedEVPPKey(); + + ManagedEVPPKey& operator=(const ManagedEVPPKey& key); + ManagedEVPPKey& operator=(ManagedEVPPKey&& key); + + operator bool() const; + EVP_PKEY* get() const; + + private: + EVP_PKEY* pkey_; +}; + +class KeyObject : public BaseObject { + public: + static v8::Local Initialize(Environment* env, + v8::Local target); + + static v8::Local Create(Environment* env, + KeyType type, + const ManagedEVPPKey& pkey); + + // TODO(tniessen): track the memory used by OpenSSL types + SET_NO_MEMORY_INFO() + SET_MEMORY_INFO_NAME(KeyObject) + SET_SELF_SIZE(KeyObject) + + KeyType GetKeyType() const; + + // These functions allow unprotected access to the raw key material and should + // only be used to implement cryptograohic operations requiring the key. + ManagedEVPPKey GetAsymmetricKey() const; + const char* GetSymmetricKey() const; + size_t GetSymmetricKeySize() const; + + protected: + static void New(const v8::FunctionCallbackInfo& args); + + static void Init(const v8::FunctionCallbackInfo& args); + void InitSecret(const char* key, size_t key_len); + void InitPublic(const ManagedEVPPKey& pkey); + void InitPrivate(const ManagedEVPPKey& pkey); + + static void GetAsymmetricKeyType( + const v8::FunctionCallbackInfo& args); + v8::Local GetAsymmetricKeyType() const; + + static void GetSymmetricKeySize( + const v8::FunctionCallbackInfo& args); + + static void Export(const v8::FunctionCallbackInfo& args); + v8::Local ExportSecretKey() const; + v8::MaybeLocal ExportPublicKey( + const PublicKeyEncodingConfig& config) const; + v8::MaybeLocal ExportPrivateKey( + const PrivateKeyEncodingConfig& config) const; + + KeyObject(Environment* env, + v8::Local wrap, + KeyType key_type) + : BaseObject(env, wrap), + key_type_(key_type), + symmetric_key_(nullptr, nullptr) { + MakeWeak(); + } + + private: + const KeyType key_type_; + std::unique_ptr> symmetric_key_; + unsigned int symmetric_key_len_; + ManagedEVPPKey asymmetric_key_; +}; + class CipherBase : public BaseObject { public: static void Initialize(Environment* env, v8::Local target); @@ -529,9 +686,7 @@ class Sign : public SignBase { }; SignResult SignFinal( - const char* key_pem, - int key_pem_len, - const char* passphrase, + const ManagedEVPPKey& pkey, int padding, int saltlen); @@ -550,8 +705,7 @@ class Verify : public SignBase { public: static void Initialize(Environment* env, v8::Local target); - Error VerifyFinal(const char* key_pem, - int key_pem_len, + Error VerifyFinal(const ManagedEVPPKey& key, const char* sig, int siglen, int padding, @@ -584,9 +738,7 @@ class PublicKeyCipher { template - static bool Cipher(const char* key_pem, - int key_pem_len, - const char* passphrase, + static bool Cipher(const ManagedEVPPKey& pkey, int padding, const unsigned char* data, int len, diff --git a/src/util.h b/src/util.h index 9a10904394de61..36a2ec9e3a6270 100644 --- a/src/util.h +++ b/src/util.h @@ -473,6 +473,29 @@ struct MallocedBuffer { MallocedBuffer& operator=(const MallocedBuffer&) = delete; }; +template +class NonCopyableMaybe { + public: + NonCopyableMaybe() : empty_(true) {} + explicit NonCopyableMaybe(T&& value) + : empty_(false), + value_(std::move(value)) {} + + bool IsEmpty() const { + return empty_; + } + + T&& Release() { + CHECK_EQ(empty_, false); + empty_ = true; + return std::move(value_); + } + + private: + bool empty_; + T value_; +}; + // Test whether some value can be called with (). template struct is_callable : std::is_function { }; diff --git a/test/parallel/test-crypto-cipheriv-decipheriv.js b/test/parallel/test-crypto-cipheriv-decipheriv.js index c0073abcfd4ee9..e4c7fced584c5f 100644 --- a/test/parallel/test-crypto-cipheriv-decipheriv.js +++ b/test/parallel/test-crypto-cipheriv-decipheriv.js @@ -101,8 +101,8 @@ function testCipher3(key, iv) { { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "key" argument must be one of type string, Buffer, ' + - 'TypedArray, or DataView. Received type object' + message: 'The "key" argument must be one of type Buffer, TypedArray, ' + + 'DataView, string, or KeyObject. Received type object' }); common.expectsError( @@ -138,8 +138,8 @@ function testCipher3(key, iv) { { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "key" argument must be one of type string, Buffer, ' + - 'TypedArray, or DataView. Received type object' + message: 'The "key" argument must be one of type Buffer, TypedArray, ' + + 'DataView, string, or KeyObject. Received type object' }); common.expectsError( diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js index f21db29d36107f..9e0e364a4fa395 100644 --- a/test/parallel/test-crypto-hmac.js +++ b/test/parallel/test-crypto-hmac.js @@ -36,20 +36,37 @@ common.expectsError( { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, - message: 'The "key" argument must be one of type string, TypedArray, or ' + - 'DataView. Received type object' + message: 'The "key" argument must be one of type Buffer, TypedArray, ' + + 'DataView, string, or KeyObject. Received type object' }); +function testHmac(algo, key, data, expected) { + // FIPS does not support MD5. + if (common.hasFipsCrypto && algo === 'md5') + return; + + if (!Array.isArray(data)) + data = [data]; + + // If the key is a Buffer, test Hmac with a key object as well. + const keyWrappers = [ + (key) => key, + ...(typeof key === 'string' ? [] : [crypto.createSecretKey]) + ]; + + for (const keyWrapper of keyWrappers) { + const hmac = crypto.createHmac(algo, keyWrapper(key)); + for (const chunk of data) + hmac.update(chunk); + const actual = hmac.digest('hex'); + assert.strictEqual(actual, expected); + } +} + { - // Test HMAC - const actual = crypto.createHmac('sha1', 'Node') - .update('some data') - .update('to hmac') - .digest('hex'); - const expected = '19fd6e1ba73d9ed2224dd5094a71babe85d9a892'; - assert.strictEqual(actual, - expected, - `Test HMAC: ${actual} must be ${expected}`); + // Test HMAC with multiple updates. + testHmac('sha1', 'Node', ['some data', 'to hmac'], + '19fd6e1ba73d9ed2224dd5094a71babe85d9a892'); } // Test HMAC (Wikipedia Test Cases) @@ -96,24 +113,11 @@ const wikipedia = [ }, ]; -for (let i = 0, l = wikipedia.length; i < l; i++) { - for (const hash in wikipedia[i].hmac) { - // FIPS does not support MD5. - if (common.hasFipsCrypto && hash === 'md5') - continue; - const expected = wikipedia[i].hmac[hash]; - const actual = crypto.createHmac(hash, wikipedia[i].key) - .update(wikipedia[i].data) - .digest('hex'); - assert.strictEqual( - actual, - expected, - `Test HMAC-${hash} wikipedia case ${i + 1}: ${actual} must be ${expected}` - ); - } +for (const { key, data, hmac } of wikipedia) { + for (const hash in hmac) + testHmac(hash, key, data, hmac[hash]); } - // Test HMAC-SHA-* (rfc 4231 Test Cases) const rfc4231 = [ { @@ -342,6 +346,10 @@ const rfc2202_md5 = [ hmac: '6f630fad67cda0ee1fb1f562db3aa53e' } ]; + +for (const { key, data, hmac } of rfc2202_md5) + testHmac('md5', key, data, hmac); + const rfc2202_sha1 = [ { key: Buffer.from('0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b', 'hex'), @@ -397,30 +405,8 @@ const rfc2202_sha1 = [ } ]; -if (!common.hasFipsCrypto) { - for (let i = 0, l = rfc2202_md5.length; i < l; i++) { - const actual = crypto.createHmac('md5', rfc2202_md5[i].key) - .update(rfc2202_md5[i].data) - .digest('hex'); - const expected = rfc2202_md5[i].hmac; - assert.strictEqual( - actual, - expected, - `Test HMAC-MD5 rfc 2202 case ${i + 1}: ${actual} must be ${expected}` - ); - } -} -for (let i = 0, l = rfc2202_sha1.length; i < l; i++) { - const actual = crypto.createHmac('sha1', rfc2202_sha1[i].key) - .update(rfc2202_sha1[i].data) - .digest('hex'); - const expected = rfc2202_sha1[i].hmac; - assert.strictEqual( - actual, - expected, - `Test HMAC-SHA1 rfc 2202 case ${i + 1}: ${actual} must be ${expected}` - ); -} +for (const { key, data, hmac } of rfc2202_sha1) + testHmac('sha1', key, data, hmac); common.expectsError( () => crypto.createHmac('sha256', 'w00t').digest('ucs2'), diff --git a/test/parallel/test-crypto-key-objects.js b/test/parallel/test-crypto-key-objects.js new file mode 100644 index 00000000000000..dddbd5f2703d93 --- /dev/null +++ b/test/parallel/test-crypto-key-objects.js @@ -0,0 +1,107 @@ +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { + createCipheriv, + createDecipheriv, + createSecretKey, + createPublicKey, + createPrivateKey, + randomBytes, + publicEncrypt, + privateDecrypt +} = require('crypto'); + +const fixtures = require('../common/fixtures'); + +const publicPem = fixtures.readSync('test_rsa_pubkey.pem', 'ascii'); +const privatePem = fixtures.readSync('test_rsa_privkey.pem', 'ascii'); + +{ + // Attempting to create an empty key should throw. + common.expectsError(() => { + createSecretKey(Buffer.alloc(0)); + }, { + type: RangeError, + code: 'ERR_OUT_OF_RANGE', + message: 'The value of "key.byteLength" is out of range. ' + + 'It must be > 0. Received 0' + }); +} + +{ + const keybuf = randomBytes(32); + const key = createSecretKey(keybuf); + assert.strictEqual(key.type, 'secret'); + assert.strictEqual(key.symmetricKeySize, 32); + assert.strictEqual(key.asymmetricKeyType, undefined); + + const exportedKey = key.export(); + assert(keybuf.equals(exportedKey)); + + const plaintext = Buffer.from('Hello world', 'utf8'); + + const cipher = createCipheriv('aes-256-ecb', key, null); + const ciphertext = Buffer.concat([ + cipher.update(plaintext), cipher.final() + ]); + + const decipher = createDecipheriv('aes-256-ecb', key, null); + const deciphered = Buffer.concat([ + decipher.update(ciphertext), decipher.final() + ]); + + assert(plaintext.equals(deciphered)); +} + +{ + const publicKey = createPublicKey(publicPem); + assert.strictEqual(publicKey.type, 'public'); + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa'); + assert.strictEqual(publicKey.symmetricKeySize, undefined); + + const privateKey = createPrivateKey(privatePem); + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa'); + assert.strictEqual(privateKey.symmetricKeySize, undefined); + + const publicDER = publicKey.export({ + format: 'der', + type: 'pkcs1' + }); + + const privateDER = privateKey.export({ + format: 'der', + type: 'pkcs1' + }); + + assert(Buffer.isBuffer(publicDER)); + assert(Buffer.isBuffer(privateDER)); + + const plaintext = Buffer.from('Hello world', 'utf8'); + const ciphertexts = [ + publicEncrypt(publicKey, plaintext), + publicEncrypt({ key: publicKey }, plaintext), + // Test distinguishing PKCS#1 public and private keys based on the + // DER-encoded data only. + publicEncrypt({ format: 'der', type: 'pkcs1', key: publicDER }, plaintext), + publicEncrypt({ format: 'der', type: 'pkcs1', key: privateDER }, plaintext) + ]; + + const decryptionKeys = [ + privateKey, + { format: 'pem', key: privatePem }, + { format: 'der', type: 'pkcs1', key: privateDER } + ]; + + for (const ciphertext of ciphertexts) { + for (const key of decryptionKeys) { + const deciphered = privateDecrypt(key, ciphertext); + assert(plaintext.equals(deciphered)); + } + } +} diff --git a/test/parallel/test-crypto-keygen.js b/test/parallel/test-crypto-keygen.js index 241e4aa73ac684..43319c38599ebf 100644 --- a/test/parallel/test-crypto-keygen.js +++ b/test/parallel/test-crypto-keygen.js @@ -65,23 +65,6 @@ const pkcs8EncExp = getRegExpForPEM('ENCRYPTED PRIVATE KEY'); const sec1Exp = getRegExpForPEM('EC PRIVATE KEY'); const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher); -// Since our own APIs only accept PEM, not DER, we need to convert DER to PEM -// for testing. -function convertDERToPEM(label, der) { - const base64 = der.toString('base64'); - const lines = []; - let i = 0; - while (i < base64.length) { - const n = Math.min(base64.length - i, 64); - lines.push(base64.substr(i, n)); - i += n; - } - const body = lines.join('\n'); - const r = `-----BEGIN ${label}-----\n${body}\n-----END ${label}-----\n`; - assert(getRegExpForPEM(label).test(r)); - return r; -} - { // To make the test faster, we will only test sync key generation once and // with a relatively small key. @@ -113,14 +96,16 @@ function convertDERToPEM(label, der) { } { + const publicKeyEncoding = { + type: 'pkcs1', + format: 'der' + }; + // Test async RSA key generation. generateKeyPair('rsa', { publicExponent: 0x10001, modulusLength: 512, - publicKeyEncoding: { - type: 'pkcs1', - format: 'der' - }, + publicKeyEncoding, privateKeyEncoding: { type: 'pkcs1', format: 'pem' @@ -128,16 +113,14 @@ function convertDERToPEM(label, der) { }, common.mustCall((err, publicKeyDER, privateKey) => { assert.ifError(err); - // The public key is encoded as DER (which is binary) instead of PEM. We - // will still need to convert it to PEM for testing. assert(Buffer.isBuffer(publicKeyDER)); - const publicKey = convertDERToPEM('RSA PUBLIC KEY', publicKeyDER); - assertApproximateSize(publicKey, 180); + assertApproximateSize(publicKeyDER, 74); assert.strictEqual(typeof privateKey, 'string'); assert(pkcs1PrivExp.test(privateKey)); assertApproximateSize(privateKey, 512); + const publicKey = { key: publicKeyDER, ...publicKeyEncoding }; testEncryptDecrypt(publicKey, privateKey); testSignVerify(publicKey, privateKey); })); @@ -146,10 +129,7 @@ function convertDERToPEM(label, der) { generateKeyPair('rsa', { publicExponent: 0x10001, modulusLength: 512, - publicKeyEncoding: { - type: 'pkcs1', - format: 'der' - }, + publicKeyEncoding, privateKeyEncoding: { type: 'pkcs1', format: 'pem', @@ -159,16 +139,14 @@ function convertDERToPEM(label, der) { }, common.mustCall((err, publicKeyDER, privateKey) => { assert.ifError(err); - // The public key is encoded as DER (which is binary) instead of PEM. We - // will still need to convert it to PEM for testing. assert(Buffer.isBuffer(publicKeyDER)); - const publicKey = convertDERToPEM('RSA PUBLIC KEY', publicKeyDER); - assertApproximateSize(publicKey, 180); + assertApproximateSize(publicKeyDER, 74); assert.strictEqual(typeof privateKey, 'string'); assert(pkcs1EncExp('AES-256-CBC').test(privateKey)); // Since the private key is encrypted, signing shouldn't work anymore. + const publicKey = { key: publicKeyDER, ...publicKeyEncoding }; assert.throws(() => { testSignVerify(publicKey, privateKey); }, /bad decrypt|asn1 encoding routines/); @@ -180,6 +158,11 @@ function convertDERToPEM(label, der) { } { + const privateKeyEncoding = { + type: 'pkcs8', + format: 'der' + }; + // Test async DSA key generation. generateKeyPair('dsa', { modulusLength: 512, @@ -189,10 +172,9 @@ function convertDERToPEM(label, der) { format: 'pem' }, privateKeyEncoding: { - type: 'pkcs8', - format: 'der', cipher: 'aes-128-cbc', - passphrase: 'secret' + passphrase: 'secret', + ...privateKeyEncoding } }, common.mustCall((err, publicKey, privateKeyDER) => { assert.ifError(err); @@ -201,19 +183,22 @@ function convertDERToPEM(label, der) { assert(spkiExp.test(publicKey)); // The private key is DER-encoded. assert(Buffer.isBuffer(privateKeyDER)); - const privateKey = convertDERToPEM('ENCRYPTED PRIVATE KEY', privateKeyDER); assertApproximateSize(publicKey, 440); - assertApproximateSize(privateKey, 512); + assertApproximateSize(privateKeyDER, 336); // Since the private key is encrypted, signing shouldn't work anymore. assert.throws(() => { - testSignVerify(publicKey, privateKey); + testSignVerify(publicKey, { + key: privateKeyDER, + ...privateKeyEncoding + }); }, /bad decrypt|asn1 encoding routines/); // Signing should work with the correct password. testSignVerify(publicKey, { - key: privateKey, + key: privateKeyDER, + ...privateKeyEncoding, passphrase: 'secret' }); })); @@ -369,8 +354,52 @@ function convertDERToPEM(label, der) { } { - // Missing / invalid publicKeyEncoding. - for (const enc of [undefined, null, 0, 'a', true]) { + // If no publicKeyEncoding is specified, a key object should be returned. + generateKeyPair('rsa', { + modulusLength: 1024, + privateKeyEncoding: { + type: 'pkcs1', + format: 'pem' + } + }, common.mustCall((err, publicKey, privateKey) => { + assert.ifError(err); + + assert.strictEqual(typeof publicKey, 'object'); + assert.strictEqual(publicKey.type, 'public'); + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa'); + + // The private key should still be a string. + assert.strictEqual(typeof privateKey, 'string'); + + testEncryptDecrypt(publicKey, privateKey); + testSignVerify(publicKey, privateKey); + })); + + // If no privateKeyEncoding is specified, a key object should be returned. + generateKeyPair('rsa', { + modulusLength: 1024, + publicKeyEncoding: { + type: 'pkcs1', + format: 'pem' + } + }, common.mustCall((err, publicKey, privateKey) => { + assert.ifError(err); + + // The public key should still be a string. + assert.strictEqual(typeof publicKey, 'string'); + + assert.strictEqual(typeof privateKey, 'object'); + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa'); + + testEncryptDecrypt(publicKey, privateKey); + testSignVerify(publicKey, privateKey); + })); +} + +{ + // Invalid publicKeyEncoding. + for (const enc of [0, 'a', true]) { common.expectsError(() => generateKeyPairSync('rsa', { modulusLength: 4096, publicKeyEncoding: enc, @@ -425,8 +454,8 @@ function convertDERToPEM(label, der) { }); } - // Missing / invalid privateKeyEncoding. - for (const enc of [undefined, null, 0, 'a', true]) { + // Invalid privateKeyEncoding. + for (const enc of [0, 'a', true]) { common.expectsError(() => generateKeyPairSync('rsa', { modulusLength: 4096, publicKeyEncoding: { diff --git a/test/parallel/test-crypto-rsa-dsa.js b/test/parallel/test-crypto-rsa-dsa.js index 744dc5657b089d..348fd15b74d495 100644 --- a/test/parallel/test-crypto-rsa-dsa.js +++ b/test/parallel/test-crypto-rsa-dsa.js @@ -100,7 +100,7 @@ const decryptError = assert.throws(() => { crypto.publicDecrypt({ key: rsaKeyPemEncrypted, - passphrase: [].concat.apply([], Buffer.from('password')) + passphrase: Buffer.from('wrong') }, encryptedBuffer); }, decryptError); } diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js index eaf555ff57f9d8..0499b3091ca5a9 100644 --- a/test/parallel/test-crypto-sign-verify.js +++ b/test/parallel/test-crypto-sign-verify.js @@ -352,7 +352,7 @@ common.expectsError( code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError [ERR_INVALID_ARG_TYPE]', message: 'The "key" argument must be one of type string, Buffer, ' + - `TypedArray, or DataView. Received type ${type}` + `TypedArray, DataView, or KeyObject. Received type ${type}` }; assert.throws(() => sign.sign(input), errObj); diff --git a/tools/doc/type-parser.js b/tools/doc/type-parser.js index 527b44f969a77f..e3588856209e28 100644 --- a/tools/doc/type-parser.js +++ b/tools/doc/type-parser.js @@ -50,6 +50,7 @@ const customTypesMap = { 'ECDH': 'crypto.html#crypto_class_ecdh', 'Hash': 'crypto.html#crypto_class_hash', 'Hmac': 'crypto.html#crypto_class_hmac', + 'KeyObject': 'crypto.html#crypto_class_keyobject', 'Sign': 'crypto.html#crypto_class_sign', 'Verify': 'crypto.html#crypto_class_verify', 'crypto.constants': 'crypto.html#crypto_crypto_constants_1', From e6c1e8de951c093112d388c802636f68f22dac81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 20 Dec 2018 00:11:57 +0100 Subject: [PATCH 53/59] crypto: always accept certificates as public keys PR-URL: https://github.com/nodejs/node/pull/24234 Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- doc/api/crypto.md | 2 ++ src/node_crypto.cc | 31 ++++++++++++------------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 017eb91e67882f..fc1e2ae70cad2a 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1831,6 +1831,8 @@ Creates and returns a new key object containing a public key. If `key` is a string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above. +If the format is `'pem'`, the `'key'` may also be an X.509 certificate. + ### crypto.createSecretKey(key) + + + + + + + + diff --git a/deps/npm/node_modules/mute-stream/coverage/lcov-report/__root__/mute.js.html b/deps/npm/node_modules/mute-stream/coverage/lcov-report/__root__/mute.js.html new file mode 100644 index 00000000000000..375a83265228e9 --- /dev/null +++ b/deps/npm/node_modules/mute-stream/coverage/lcov-report/__root__/mute.js.html @@ -0,0 +1,500 @@ + + + + Code coverage report for mute.js + + + + + + + +
+
+

+ all files / __root__/ mute.js +

+
+
+ 77.03% + Statements + 57/74 +
+
+ 57.14% + Branches + 28/49 +
+
+ 93.33% + Functions + 14/15 +
+
+ 79.1% + Lines + 53/67 +
+
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +  + +  +  +  + + + + + + + +  +  +  +  + + +  +  + +  + +  +  +  +  + +10× +  +  + + +  +  + +  +  +  +  +  +  + + +  +  + +  +  +  +  +  +  + + +  +  +  +  +  +  + + +  +  +  +  +  +  +  + +  + +  +  +  +  + +  + +  +  +  +  +  + + + +  +  + + +  +  + + +  +  + +25× +13× + +  +  +  +  +  +  +  +  + +  +  +  +  +  + +  +  +20× +  +  + + + +  +  + +  +  + + +  +  + +  +  +  +  +  +  + + + + 
var Stream = require('stream')
+ 
+module.exports = MuteStream
+ 
+// var out = new MuteStream(process.stdout)
+// argument auto-pipes
+function MuteStream (opts) {
+  Stream.apply(this)
+  opts = opts || {}
+  this.writable = this.readable = true
+  this.muted = false
+  this.on('pipe', this._onpipe)
+  this.replace = opts.replace
+ 
+  // For readline-type situations
+  // This much at the start of a line being redrawn after a ctrl char
+  // is seen (such as backspace) won't be redrawn as the replacement
+  this._prompt = opts.prompt || null
+  this._hadControl = false
+}
+ 
+MuteStream.prototype = Object.create(Stream.prototype)
+ 
+Object.defineProperty(MuteStream.prototype, 'constructor', {
+  value: MuteStream,
+  enumerable: false
+})
+ 
+MuteStream.prototype.mute = function () {
+  this.muted = true
+}
+ 
+MuteStream.prototype.unmute = function () {
+  this.muted = false
+}
+ 
+Object.defineProperty(MuteStream.prototype, '_onpipe', {
+  value: onPipe,
+  enumerable: false,
+  writable: true,
+  configurable: true
+})
+ 
+function onPipe (src) {
+  this._src = src
+}
+ 
+Object.defineProperty(MuteStream.prototype, 'isTTY', {
+  get: getIsTTY,
+  set: setIsTTY,
+  enumerable: true,
+  configurable: true
+})
+ 
+function getIsTTY () {
+  return( (this._dest) ? this._dest.isTTY
+        : (this._src) ? this._src.isTTY
+        : false
+        )
+}
+ 
+// basically just get replace the getter/setter with a regular value
+function setIsTTY (isTTY) {
+  Object.defineProperty(this, 'isTTY', {
+    value: isTTY,
+    enumerable: true,
+    writable: true,
+    configurable: true
+  })
+}
+ 
+Object.defineProperty(MuteStream.prototype, 'rows', {
+  get: function () {
+    return( this._dest ? this._dest.rows
+          : this._src ? this._src.rows
+          : undefined )
+  }, enumerable: true, configurable: true })
+ 
+Object.defineProperty(MuteStream.prototype, 'columns', {
+  get: function () {
+    return( this._dest ? this._dest.columns
+          : this._src ? this._src.columns
+          : undefined )
+  }, enumerable: true, configurable: true })
+ 
+ 
+MuteStream.prototype.pipe = function (dest, options) {
+  this._dest = dest
+  return Stream.prototype.pipe.call(this, dest, options)
+}
+ 
+MuteStream.prototype.pause = function () {
+  Eif (this._src) return this._src.pause()
+}
+ 
+MuteStream.prototype.resume = function () {
+  Eif (this._src) return this._src.resume()
+}
+ 
+MuteStream.prototype.write = function (c) {
+  if (this.muted) {
+    if (!this.replace) return true
+    Iif (c.match(/^\u001b/)) {
+      if(c.indexOf(this._prompt) === 0) {
+        c = c.substr(this._prompt.length);
+        c = c.replace(/./g, this.replace);
+        c = this._prompt + c;
+      }
+      this._hadControl = true
+      return this.emit('data', c)
+    } else {
+      Iif (this._prompt && this._hadControl &&
+          c.indexOf(this._prompt) === 0) {
+        this._hadControl = false
+        this.emit('data', this._prompt)
+        c = c.substr(this._prompt.length)
+      }
+      c = c.toString().replace(/./g, this.replace)
+    }
+  }
+  this.emit('data', c)
+}
+ 
+MuteStream.prototype.end = function (c) {
+  Eif (this.muted) {
+    Iif (c && this.replace) {
+      c = c.toString().replace(/./g, this.replace)
+    } else {
+      c = null
+    }
+  }
+  Iif (c) this.emit('data', c)
+  this.emit('end')
+}
+ 
+function proxy (fn) { return function () {
+  var d = this._dest
+  var s = this._src
+  if (d && d[fn]) d[fn].apply(d, arguments)
+  if (s && s[fn]) s[fn].apply(s, arguments)
+}}
+ 
+MuteStream.prototype.destroy = proxy('destroy')
+MuteStream.prototype.destroySoon = proxy('destroySoon')
+MuteStream.prototype.close = proxy('close')
+ 
+
+
+ + + + + + + diff --git a/deps/npm/node_modules/mute-stream/coverage/lcov-report/base.css b/deps/npm/node_modules/mute-stream/coverage/lcov-report/base.css new file mode 100644 index 00000000000000..0c0571dad9ffc9 --- /dev/null +++ b/deps/npm/node_modules/mute-stream/coverage/lcov-report/base.css @@ -0,0 +1,212 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px;; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } + + +.medium .chart { border:1px solid #666; } +.medium .cover-fill { background: #666; } + +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +span.cline-neutral { background: #eaeaea; } +.medium { background: #eaeaea; } + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/deps/npm/node_modules/mute-stream/coverage/lcov-report/index.html b/deps/npm/node_modules/mute-stream/coverage/lcov-report/index.html new file mode 100644 index 00000000000000..17d7a760e804bd --- /dev/null +++ b/deps/npm/node_modules/mute-stream/coverage/lcov-report/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for All files + + + + + + + +
+
+

+ / +

+
+
+ 77.03% + Statements + 57/74 +
+
+ 57.14% + Branches + 28/49 +
+
+ 93.33% + Functions + 14/15 +
+
+ 79.1% + Lines + 53/67 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
__root__/
77.03%57/7457.14%28/4993.33%14/1579.1%53/67
+
+
+ + + + + + + diff --git a/deps/npm/node_modules/mute-stream/coverage/lcov-report/prettify.css b/deps/npm/node_modules/mute-stream/coverage/lcov-report/prettify.css new file mode 100644 index 00000000000000..b317a7cda31a44 --- /dev/null +++ b/deps/npm/node_modules/mute-stream/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/deps/npm/node_modules/mute-stream/coverage/lcov-report/prettify.js b/deps/npm/node_modules/mute-stream/coverage/lcov-report/prettify.js new file mode 100644 index 00000000000000..ef51e03866898f --- /dev/null +++ b/deps/npm/node_modules/mute-stream/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/deps/npm/node_modules/mute-stream/coverage/lcov-report/sort-arrow-sprite.png b/deps/npm/node_modules/mute-stream/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/deps/npm/node_modules/mute-stream/coverage/lcov.info b/deps/npm/node_modules/mute-stream/coverage/lcov.info new file mode 100644 index 00000000000000..5f2a58e42d2c4a --- /dev/null +++ b/deps/npm/node_modules/mute-stream/coverage/lcov.info @@ -0,0 +1,155 @@ +TN: +SF:./mute.js +FN:7,MuteStream +FN:29,(anonymous_2) +FN:33,(anonymous_3) +FN:44,onPipe +FN:55,getIsTTY +FN:63,setIsTTY +FN:73,(anonymous_7) +FN:80,(anonymous_8) +FN:87,(anonymous_9) +FN:92,(anonymous_10) +FN:96,(anonymous_11) +FN:100,(anonymous_12) +FN:124,(anonymous_13) +FN:136,proxy +FN:136,(anonymous_15) +FNF:15 +FNH:14 +FNDA:7,MuteStream +FNDA:10,(anonymous_2) +FNDA:6,(anonymous_3) +FNDA:5,onPipe +FNDA:8,getIsTTY +FNDA:2,setIsTTY +FNDA:5,(anonymous_7) +FNDA:5,(anonymous_8) +FNDA:2,(anonymous_9) +FNDA:2,(anonymous_10) +FNDA:2,(anonymous_11) +FNDA:25,(anonymous_12) +FNDA:2,(anonymous_13) +FNDA:3,proxy +FNDA:0,(anonymous_15) +DA:1,1 +DA:3,1 +DA:7,1 +DA:8,7 +DA:9,7 +DA:10,7 +DA:11,7 +DA:12,7 +DA:13,7 +DA:18,7 +DA:19,7 +DA:22,1 +DA:24,1 +DA:29,1 +DA:30,10 +DA:33,1 +DA:34,6 +DA:37,1 +DA:44,1 +DA:45,5 +DA:48,1 +DA:55,1 +DA:56,8 +DA:63,1 +DA:64,2 +DA:72,1 +DA:74,5 +DA:79,1 +DA:81,5 +DA:87,1 +DA:88,2 +DA:89,2 +DA:92,1 +DA:93,2 +DA:96,1 +DA:97,2 +DA:100,1 +DA:101,25 +DA:102,13 +DA:103,8 +DA:104,0 +DA:105,0 +DA:106,0 +DA:107,0 +DA:109,0 +DA:110,0 +DA:112,8 +DA:114,0 +DA:115,0 +DA:116,0 +DA:118,8 +DA:121,20 +DA:124,1 +DA:125,2 +DA:126,2 +DA:127,0 +DA:129,2 +DA:132,2 +DA:133,2 +DA:136,3 +DA:137,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:143,1 +DA:144,1 +DA:145,1 +LF:67 +LH:53 +BRDA:9,1,0,7 +BRDA:9,1,1,5 +BRDA:18,2,0,7 +BRDA:18,2,1,7 +BRDA:56,3,0,3 +BRDA:56,3,1,5 +BRDA:57,4,0,3 +BRDA:57,4,1,2 +BRDA:74,5,0,4 +BRDA:74,5,1,1 +BRDA:75,6,0,0 +BRDA:75,6,1,1 +BRDA:81,7,0,4 +BRDA:81,7,1,1 +BRDA:82,8,0,0 +BRDA:82,8,1,1 +BRDA:93,9,0,2 +BRDA:93,9,1,0 +BRDA:97,10,0,2 +BRDA:97,10,1,0 +BRDA:101,11,0,13 +BRDA:101,11,1,12 +BRDA:102,12,0,5 +BRDA:102,12,1,8 +BRDA:103,13,0,0 +BRDA:103,13,1,8 +BRDA:104,14,0,0 +BRDA:104,14,1,0 +BRDA:112,15,0,0 +BRDA:112,15,1,8 +BRDA:112,16,0,8 +BRDA:112,16,1,0 +BRDA:112,16,2,0 +BRDA:125,17,0,2 +BRDA:125,17,1,0 +BRDA:126,18,0,0 +BRDA:126,18,1,2 +BRDA:126,19,0,2 +BRDA:126,19,1,1 +BRDA:132,20,0,0 +BRDA:132,20,1,2 +BRDA:139,21,0,0 +BRDA:139,21,1,0 +BRDA:139,22,0,0 +BRDA:139,22,1,0 +BRDA:140,23,0,0 +BRDA:140,23,1,0 +BRDA:140,24,0,0 +BRDA:140,24,1,0 +BRF:49 +BRH:28 +end_of_record diff --git a/deps/npm/node_modules/npm-packlist/index.js b/deps/npm/node_modules/npm-packlist/index.js index c1b8783596349c..2cdd37ec3df06b 100644 --- a/deps/npm/node_modules/npm-packlist/index.js +++ b/deps/npm/node_modules/npm-packlist/index.js @@ -20,10 +20,14 @@ const path = require('path') const defaultRules = [ '.npmignore', '.gitignore', - '**/.git/', - '**/.svn/', - '**/.hg/', - '**/CVS/', + '**/.git', + '**/.svn', + '**/.hg', + '**/CVS', + '**/.git/**', + '**/.svn/**', + '**/.hg/**', + '**/CVS/**', '/.lock-wscript', '/.wafpickle-*', '/build/config.gypi', @@ -33,7 +37,8 @@ const defaultRules = [ '.DS_Store', '._*', '*.orig', - 'package-lock.json' + 'package-lock.json', + 'archived-packages/**', ] // a decorator that applies our custom rules to an ignore walker @@ -131,7 +136,7 @@ const npmWalker = Class => class Walker extends Class { const rules = [ pkg.browser ? '!' + pkg.browser : '', pkg.main ? '!' + pkg.main : '', - '!@(readme|license|licence|notice|changes|changelog|history){,.*}' + '!@(readme|copying|license|licence|notice|changes|changelog|history){,.*}' ].filter(f => f).join('\n') + '\n' super.onReadIgnoreFile(packageNecessaryRules, rules, _=>_) diff --git a/deps/npm/node_modules/npm-packlist/package.json b/deps/npm/node_modules/npm-packlist/package.json index 7cefe9dd5815e8..f1188c393f2c99 100644 --- a/deps/npm/node_modules/npm-packlist/package.json +++ b/deps/npm/node_modules/npm-packlist/package.json @@ -1,28 +1,28 @@ { - "_from": "npm-packlist@1.1.11", - "_id": "npm-packlist@1.1.11", + "_from": "npm-packlist@1.1.12", + "_id": "npm-packlist@1.1.12", "_inBundle": false, - "_integrity": "sha512-CxKlZ24urLkJk+9kCm48RTQ7L4hsmgSVzEk0TLGPzzyuFxD7VNgy5Sl24tOLMzQv773a/NeJ1ce1DKeacqffEA==", + "_integrity": "sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g==", "_location": "/npm-packlist", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "npm-packlist@1.1.11", + "raw": "npm-packlist@1.1.12", "name": "npm-packlist", "escapedName": "npm-packlist", - "rawSpec": "1.1.11", + "rawSpec": "1.1.12", "saveSpec": null, - "fetchSpec": "1.1.11" + "fetchSpec": "1.1.12" }, "_requiredBy": [ "#USER", "/", "/pacote" ], - "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.11.tgz", - "_shasum": "84e8c683cbe7867d34b1d357d893ce29e28a02de", - "_spec": "npm-packlist@1.1.11", + "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.12.tgz", + "_shasum": "22bde2ebc12e72ca482abd67afc51eb49377243a", + "_spec": "npm-packlist@1.1.12", "_where": "/Users/zkat/Documents/code/work/npm", "author": { "name": "Isaac Z. Schlueter", @@ -64,5 +64,5 @@ "preversion": "npm test", "test": "tap test/*.js --100 -J" }, - "version": "1.1.11" + "version": "1.1.12" } diff --git a/deps/npm/node_modules/opener/lib/opener.js b/deps/npm/node_modules/opener/lib/opener.js index 2e299677d0d6e6..5fa88f375ac854 100644 --- a/deps/npm/node_modules/opener/lib/opener.js +++ b/deps/npm/node_modules/opener/lib/opener.js @@ -16,7 +16,7 @@ module.exports = function opener(args, options, callback) { var command; switch (platform) { case "win32": { - command = "cmd"; + command = "cmd.exe"; break; } case "darwin": { diff --git a/deps/npm/node_modules/opener/package.json b/deps/npm/node_modules/opener/package.json index bfd7aa7dabf36b..e69aa39637e2a5 100644 --- a/deps/npm/node_modules/opener/package.json +++ b/deps/npm/node_modules/opener/package.json @@ -1,29 +1,29 @@ { - "_from": "opener@1.5.0", - "_id": "opener@1.5.0", + "_from": "opener@1.5.1", + "_id": "opener@1.5.1", "_inBundle": false, - "_integrity": "sha512-MD4s/o61y2slS27zm2s4229V2gAUHX0/e3/XOmY/jsXwhysjjCIHN8lx7gqZCrZk19ym+HjCUWHeMKD7YJtKCQ==", + "_integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", "_location": "/opener", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "opener@1.5.0", + "raw": "opener@1.5.1", "name": "opener", "escapedName": "opener", - "rawSpec": "1.5.0", + "rawSpec": "1.5.1", "saveSpec": null, - "fetchSpec": "1.5.0" + "fetchSpec": "1.5.1" }, "_requiredBy": [ "#USER", "/", "/tap" ], - "_resolved": "https://registry.npmjs.org/opener/-/opener-1.5.0.tgz", - "_shasum": "24222fb4ad423ba21f5bf38855cebe44220f6531", - "_spec": "opener@1.5.0", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", + "_shasum": "6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed", + "_spec": "opener@1.5.1", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Domenic Denicola", "email": "d@domenic.me", @@ -56,5 +56,5 @@ "scripts": { "lint": "eslint ." }, - "version": "1.5.0" + "version": "1.5.1" } diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md index 951c53956a24b9..9f7161e2cef594 100644 --- a/deps/npm/node_modules/semver/README.md +++ b/deps/npm/node_modules/semver/README.md @@ -274,7 +274,7 @@ logical-or ::= ( ' ' ) * '||' ( ' ' ) * range ::= hyphen | simple ( ' ' simple ) * | '' hyphen ::= partial ' - ' partial simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? xr ::= 'x' | 'X' | '*' | nr nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json index 5919ebef9bc79c..d7d4cbb12892cc 100644 --- a/deps/npm/node_modules/semver/package.json +++ b/deps/npm/node_modules/semver/package.json @@ -1,27 +1,22 @@ { - "_args": [ - [ - "semver@5.5.0", - "/Users/rebecca/code/npm" - ] - ], - "_from": "semver@5.5.0", - "_id": "semver@5.5.0", + "_from": "semver@5.5.1", + "_id": "semver@5.5.1", "_inBundle": false, - "_integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "_integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", "_location": "/semver", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "semver@5.5.0", + "raw": "semver@5.5.1", "name": "semver", "escapedName": "semver", - "rawSpec": "5.5.0", + "rawSpec": "5.5.1", "saveSpec": null, - "fetchSpec": "5.5.0" + "fetchSpec": "5.5.1" }, "_requiredBy": [ + "#USER", "/", "/eslint", "/eslint-plugin-node", @@ -37,8 +32,9 @@ "/read-installed", "/semver-diff" ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "_spec": "5.5.0", + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "_shasum": "7dfdd8814bdb7cabc7be0fb1d734cfb66c940477", + "_spec": "semver@5.5.1", "_where": "/Users/rebecca/code/npm", "bin": { "semver": "./bin/semver" @@ -46,9 +42,11 @@ "bugs": { "url": "https://github.com/npm/node-semver/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "The semantic version parser used by npm.", "devDependencies": { - "tap": "^10.7.0" + "tap": "^12.0.1" }, "files": [ "bin", @@ -66,5 +64,5 @@ "scripts": { "test": "tap test/*.js --cov -J" }, - "version": "5.5.0" + "version": "5.5.1" } diff --git a/deps/npm/node_modules/ssri/CHANGELOG.md b/deps/npm/node_modules/ssri/CHANGELOG.md index a56594ae620320..d4c5897902d12e 100644 --- a/deps/npm/node_modules/ssri/CHANGELOG.md +++ b/deps/npm/node_modules/ssri/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [6.0.1](https://github.com/zkat/ssri/compare/v6.0.0...v6.0.1) (2018-08-27) + + +### Bug Fixes + +* **opts:** use figgy-pudding to specify consumed opts ([cf86553](https://github.com/zkat/ssri/commit/cf86553)) + + + # [6.0.0](https://github.com/zkat/ssri/compare/v5.3.0...v6.0.0) (2018-04-09) diff --git a/deps/npm/node_modules/ssri/index.js b/deps/npm/node_modules/ssri/index.js index d4c9e49c4db764..e102892b0bcd08 100644 --- a/deps/npm/node_modules/ssri/index.js +++ b/deps/npm/node_modules/ssri/index.js @@ -1,6 +1,7 @@ 'use strict' const crypto = require('crypto') +const figgyPudding = require('figgy-pudding') const Transform = require('stream').Transform const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512'] @@ -10,10 +11,24 @@ const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/ const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/ const VCHAR_REGEX = /^[\x21-\x7E]+$/ +const SsriOpts = figgyPudding({ + algorithms: {default: ['sha512']}, + error: {default: false}, + integrity: {}, + options: {default: []}, + pickAlgorithm: {default: () => getPrioritizedHash}, + Promise: {default: () => Promise}, + sep: {default: ' '}, + single: {default: false}, + size: {}, + strict: {default: false} +}) + class Hash { get isHash () { return true } constructor (hash, opts) { - const strict = !!(opts && opts.strict) + opts = SsriOpts(opts) + const strict = !!opts.strict this.source = hash.trim() // 3.1. Integrity metadata (called "Hash" by ssri) // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description @@ -37,7 +52,8 @@ class Hash { return this.toString() } toString (opts) { - if (opts && opts.strict) { + opts = SsriOpts(opts) + if (opts.strict) { // Strict mode enforces the standard as close to the foot of the // letter as it can. if (!( @@ -70,7 +86,7 @@ class Integrity { return this.toString() } toString (opts) { - opts = opts || {} + opts = SsriOpts(opts) let sep = opts.sep || ' ' if (opts.strict) { // Entries must be separated by whitespace, according to spec. @@ -83,6 +99,7 @@ class Integrity { }).filter(x => x.length).join(sep) } concat (integrity, opts) { + opts = SsriOpts(opts) const other = typeof integrity === 'string' ? integrity : stringify(integrity, opts) @@ -92,6 +109,7 @@ class Integrity { return parse(this, {single: true}).hexDigest() } match (integrity, opts) { + opts = SsriOpts(opts) const other = parse(integrity, opts) const algo = other.pickAlgorithm(opts) return ( @@ -105,7 +123,8 @@ class Integrity { ) || false } pickAlgorithm (opts) { - const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash + opts = SsriOpts(opts) + const pickAlgorithm = opts.pickAlgorithm const keys = Object.keys(this) if (!keys.length) { throw new Error(`No algorithms available for ${ @@ -120,7 +139,7 @@ class Integrity { module.exports.parse = parse function parse (sri, opts) { - opts = opts || {} + opts = SsriOpts(opts) if (typeof sri === 'string') { return _parse(sri, opts) } else if (sri.algorithm && sri.digest) { @@ -151,6 +170,7 @@ function _parse (integrity, opts) { module.exports.stringify = stringify function stringify (obj, opts) { + opts = SsriOpts(opts) if (obj.algorithm && obj.digest) { return Hash.prototype.toString.call(obj, opts) } else if (typeof obj === 'string') { @@ -162,7 +182,8 @@ function stringify (obj, opts) { module.exports.fromHex = fromHex function fromHex (hexDigest, algorithm, opts) { - const optString = (opts && opts.options && opts.options.length) + opts = SsriOpts(opts) + const optString = opts.options && opts.options.length ? `?${opts.options.join('?')}` : '' return parse( @@ -174,8 +195,8 @@ function fromHex (hexDigest, algorithm, opts) { module.exports.fromData = fromData function fromData (data, opts) { - opts = opts || {} - const algorithms = opts.algorithms || ['sha512'] + opts = SsriOpts(opts) + const algorithms = opts.algorithms const optString = opts.options && opts.options.length ? `?${opts.options.join('?')}` : '' @@ -196,7 +217,7 @@ function fromData (data, opts) { module.exports.fromStream = fromStream function fromStream (stream, opts) { - opts = opts || {} + opts = SsriOpts(opts) const P = opts.Promise || Promise const istream = integrityStream(opts) return new P((resolve, reject) => { @@ -212,7 +233,7 @@ function fromStream (stream, opts) { module.exports.checkData = checkData function checkData (data, sri, opts) { - opts = opts || {} + opts = SsriOpts(opts) sri = parse(sri, opts) if (!Object.keys(sri).length) { if (opts.error) { @@ -251,9 +272,9 @@ function checkData (data, sri, opts) { module.exports.checkStream = checkStream function checkStream (stream, sri, opts) { - opts = opts || {} + opts = SsriOpts(opts) const P = opts.Promise || Promise - const checker = integrityStream(Object.assign({}, opts, { + const checker = integrityStream(opts.concat({ integrity: sri })) return new P((resolve, reject) => { @@ -269,7 +290,7 @@ function checkStream (stream, sri, opts) { module.exports.integrityStream = integrityStream function integrityStream (opts) { - opts = opts || {} + opts = SsriOpts(opts) // For verification const sri = opts.integrity && parse(opts.integrity, opts) const goodSri = sri && Object.keys(sri).length @@ -277,10 +298,7 @@ function integrityStream (opts) { const digests = goodSri && sri[algorithm] // Calculating stream const algorithms = Array.from( - new Set( - (opts.algorithms || ['sha512']) - .concat(algorithm ? [algorithm] : []) - ) + new Set(opts.algorithms.concat(algorithm ? [algorithm] : [])) ) const hashes = algorithms.map(crypto.createHash) let streamSize = 0 @@ -325,9 +343,9 @@ function integrityStream (opts) { module.exports.create = createIntegrity function createIntegrity (opts) { - opts = opts || {} - const algorithms = opts.algorithms || ['sha512'] - const optString = opts.options && opts.options.length + opts = SsriOpts(opts) + const algorithms = opts.algorithms + const optString = opts.options.length ? `?${opts.options.join('?')}` : '' diff --git a/deps/npm/node_modules/ssri/package.json b/deps/npm/node_modules/ssri/package.json index ec561fc3f73075..5dd740daa27827 100644 --- a/deps/npm/node_modules/ssri/package.json +++ b/deps/npm/node_modules/ssri/package.json @@ -1,35 +1,31 @@ { - "_args": [ - [ - "ssri@6.0.0", - "/Users/rebecca/code/npm" - ] - ], - "_from": "ssri@6.0.0", - "_id": "ssri@6.0.0", + "_from": "ssri@latest", + "_id": "ssri@6.0.1", "_inBundle": false, - "_integrity": "sha512-zYOGfVHPhxyzwi8MdtdNyxv3IynWCIM4jYReR48lqu0VngxgH1c+C6CmipRdJ55eVByTJV/gboFEEI7TEQI8DA==", + "_integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "_location": "/ssri", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "tag", "registry": true, - "raw": "ssri@6.0.0", + "raw": "ssri@latest", "name": "ssri", "escapedName": "ssri", - "rawSpec": "6.0.0", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "6.0.0" + "fetchSpec": "latest" }, "_requiredBy": [ + "#USER", "/", "/cacache", "/make-fetch-happen", "/pacote" ], - "_resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.0.tgz", - "_spec": "6.0.0", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "_shasum": "2a3c41b28dd45b62b63676ecb74001265ae9edd8", + "_spec": "ssri@latest", + "_where": "/Users/zkat/Documents/code/work/npm", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -37,6 +33,7 @@ "bugs": { "url": "https://github.com/zkat/ssri/issues" }, + "bundleDependencies": false, "config": { "nyc": { "exclude": [ @@ -45,7 +42,10 @@ ] } }, - "dependencies": {}, + "dependencies": { + "figgy-pudding": "^3.5.1" + }, + "deprecated": false, "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.", "devDependencies": { "nyc": "^11.4.1", @@ -89,5 +89,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "6.0.0" + "version": "6.0.1" } diff --git a/deps/npm/node_modules/tar/README.md b/deps/npm/node_modules/tar/README.md index 262dd063eb5904..034e4865c729af 100644 --- a/deps/npm/node_modules/tar/README.md +++ b/deps/npm/node_modules/tar/README.md @@ -108,7 +108,7 @@ tar.c( // or tar.create gzip: }, ['some', 'files', 'and', 'folders'] -).pipe(fs.createWriteStream('my-tarball.tgz') +).pipe(fs.createWriteStream('my-tarball.tgz')) ``` To replicate `tar xf my-tarball.tgz` you'd do: diff --git a/deps/npm/node_modules/tar/lib/parse.js b/deps/npm/node_modules/tar/lib/parse.js index df84079fd370a4..34e3cd70c2fe9b 100644 --- a/deps/npm/node_modules/tar/lib/parse.js +++ b/deps/npm/node_modules/tar/lib/parse.js @@ -29,6 +29,7 @@ const maxMetaEntrySize = 1024 * 1024 const Entry = require('./read-entry.js') const Pax = require('./pax.js') const zlib = require('minizlib') +const Buffer = require('./buffer.js') const gzipHeader = Buffer.from([0x1f, 0x8b]) const STATE = Symbol('state') diff --git a/deps/npm/node_modules/tar/lib/unpack.js b/deps/npm/node_modules/tar/lib/unpack.js index dcbdd19e1c860e..fc765096efd119 100644 --- a/deps/npm/node_modules/tar/lib/unpack.js +++ b/deps/npm/node_modules/tar/lib/unpack.js @@ -178,6 +178,12 @@ class Unpack extends Parser { if (parts.length < this.strip) return false entry.path = parts.slice(this.strip).join('/') + + if (entry.type === 'Link') { + const linkparts = entry.linkpath.split(/\/|\\/) + if (linkparts.length >= this.strip) + entry.linkpath = linkparts.slice(this.strip).join('/') + } } if (!this.preservePaths) { diff --git a/deps/npm/node_modules/tar/lib/write-entry.js b/deps/npm/node_modules/tar/lib/write-entry.js index 3a4c99b9ebe10f..63f749488c55fd 100644 --- a/deps/npm/node_modules/tar/lib/write-entry.js +++ b/deps/npm/node_modules/tar/lib/write-entry.js @@ -227,11 +227,21 @@ const WriteEntry = warner(class WriteEntry extends MiniPass { [ONREAD] (fd, buf, offset, length, pos, remain, blockRemain, bytesRead) { if (bytesRead <= 0 && remain > 0) { - const er = new Error('unexpected EOF') + const er = new Error('encountered unexpected EOF') er.path = this.absolute er.syscall = 'read' er.code = 'EOF' - this.emit('error', er) + this[CLOSE](fd) + return this.emit('error', er) + } + + if (bytesRead > remain) { + const er = new Error('did not encounter expected EOF') + er.path = this.absolute + er.syscall = 'read' + er.code = 'EOF' + this[CLOSE](fd) + return this.emit('error', er) } // null out the rest of the buffer, if we could fit the block padding diff --git a/deps/npm/node_modules/tar/node_modules/chownr/LICENSE b/deps/npm/node_modules/tar/node_modules/chownr/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/deps/npm/node_modules/tar/node_modules/chownr/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/tar/node_modules/chownr/README.md b/deps/npm/node_modules/tar/node_modules/chownr/README.md new file mode 100644 index 00000000000000..70e9a54a32b8e0 --- /dev/null +++ b/deps/npm/node_modules/tar/node_modules/chownr/README.md @@ -0,0 +1,3 @@ +Like `chown -R`. + +Takes the same arguments as `fs.chown()` diff --git a/deps/npm/node_modules/tar/node_modules/chownr/chownr.js b/deps/npm/node_modules/tar/node_modules/chownr/chownr.js new file mode 100644 index 00000000000000..7e63928827e2c6 --- /dev/null +++ b/deps/npm/node_modules/tar/node_modules/chownr/chownr.js @@ -0,0 +1,88 @@ +'use strict' +const fs = require('fs') +const path = require('path') + +/* istanbul ignore next */ +const LCHOWN = fs.lchown ? 'lchown' : 'chown' +/* istanbul ignore next */ +const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' + +// fs.readdir could only accept an options object as of node v6 +const nodeVersion = process.version +let readdir = (path, options, cb) => fs.readdir(path, options, cb) +let readdirSync = (path, options) => fs.readdirSync(path, options) +/* istanbul ignore next */ +if (/^v4\./.test(nodeVersion)) + readdir = (path, options, cb) => fs.readdir(path, cb) + +const chownrKid = (p, child, uid, gid, cb) => { + if (typeof child === 'string') + return fs.lstat(path.resolve(p, child), (er, stats) => { + if (er) + return cb(er) + stats.name = child + chownrKid(p, stats, uid, gid, cb) + }) + + if (child.isDirectory()) { + chownr(path.resolve(p, child.name), uid, gid, er => { + if (er) + return cb(er) + fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb) + }) + } else + fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb) +} + + +const chownr = (p, uid, gid, cb) => { + readdir(p, { withFileTypes: true }, (er, children) => { + // any error other than ENOTDIR or ENOTSUP means it's not readable, + // or doesn't exist. give up. + if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') + return cb(er) + if (er || !children.length) return fs[LCHOWN](p, uid, gid, cb) + + let len = children.length + let errState = null + const then = er => { + if (errState) return + if (er) return cb(errState = er) + if (-- len === 0) return fs[LCHOWN](p, uid, gid, cb) + } + + children.forEach(child => chownrKid(p, child, uid, gid, then)) + }) +} + +const chownrKidSync = (p, child, uid, gid) => { + if (typeof child === 'string') { + const stats = fs.lstatSync(path.resolve(p, child)) + stats.name = child + child = stats + } + + if (child.isDirectory()) + chownrSync(path.resolve(p, child.name), uid, gid) + + fs[LCHOWNSYNC](path.resolve(p, child.name), uid, gid) +} + +const chownrSync = (p, uid, gid) => { + let children + try { + children = readdirSync(p, { withFileTypes: true }) + } catch (er) { + if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP') + return fs[LCHOWNSYNC](p, uid, gid) + throw er + } + + if (children.length) + children.forEach(child => chownrKidSync(p, child, uid, gid)) + + return fs[LCHOWNSYNC](p, uid, gid) +} + +module.exports = chownr +chownr.sync = chownrSync diff --git a/deps/npm/node_modules/tar/node_modules/chownr/package.json b/deps/npm/node_modules/tar/node_modules/chownr/package.json new file mode 100644 index 00000000000000..41e75b7fa66791 --- /dev/null +++ b/deps/npm/node_modules/tar/node_modules/chownr/package.json @@ -0,0 +1,59 @@ +{ + "_from": "chownr@^1.1.1", + "_id": "chownr@1.1.1", + "_inBundle": false, + "_integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "_location": "/tar/chownr", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "chownr@^1.1.1", + "name": "chownr", + "escapedName": "chownr", + "rawSpec": "^1.1.1", + "saveSpec": null, + "fetchSpec": "^1.1.1" + }, + "_requiredBy": [ + "/tar" + ], + "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "_shasum": "54726b8b8fff4df053c42187e801fb4412df1494", + "_spec": "chownr@^1.1.1", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/tar", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/chownr/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "like `chown -R`", + "devDependencies": { + "mkdirp": "0.3", + "rimraf": "", + "tap": "^12.0.1" + }, + "files": [ + "chownr.js" + ], + "homepage": "https://github.com/isaacs/chownr#readme", + "license": "ISC", + "main": "chownr.js", + "name": "chownr", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chownr.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --cov" + }, + "version": "1.1.1" +} diff --git a/deps/npm/node_modules/tar/node_modules/minipass/LICENSE b/deps/npm/node_modules/tar/node_modules/minipass/LICENSE new file mode 100644 index 00000000000000..20a47625409237 --- /dev/null +++ b/deps/npm/node_modules/tar/node_modules/minipass/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) npm, Inc. and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/tar/node_modules/minipass/README.md b/deps/npm/node_modules/tar/node_modules/minipass/README.md new file mode 100644 index 00000000000000..7a83c59ffd709f --- /dev/null +++ b/deps/npm/node_modules/tar/node_modules/minipass/README.md @@ -0,0 +1,124 @@ +# minipass + +A _very_ minimal implementation of a [PassThrough +stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough) + +[It's very +fast](https://docs.google.com/spreadsheets/d/1oObKSrVwLX_7Ut4Z6g3fZW-AX1j1-k6w-cDsrkaSbHM/edit#gid=0) +for objects, strings, and buffers. + +Supports pipe()ing (including multi-pipe() and backpressure +transmission), buffering data until either a `data` event handler or +`pipe()` is added (so you don't lose the first chunk), and most other +cases where PassThrough is a good idea. + +There is a `read()` method, but it's much more efficient to consume +data from this stream via `'data'` events or by calling `pipe()` into +some other stream. Calling `read()` requires the buffer to be +flattened in some cases, which requires copying memory. + +There is also no `unpipe()` method. Once you start piping, there is +no stopping it! + +If you set `objectMode: true` in the options, then whatever is written +will be emitted. Otherwise, it'll do a minimal amount of Buffer +copying to ensure proper Streams semantics when `read(n)` is called. + +This is not a `through` or `through2` stream. It doesn't transform +the data, it just passes it right through. If you want to transform +the data, extend the class, and override the `write()` method. Once +you're done transforming the data however you want, call +`super.write()` with the transform output. + +For an example of a stream that extends MiniPass to provide transform +capabilities, check out [minizlib](http://npm.im/minizlib). + +## USAGE + +```js +const MiniPass = require('minipass') +const mp = new MiniPass(options) // optional: { encoding } +mp.write('foo') +mp.pipe(someOtherStream) +mp.end('bar') +``` + +### collecting + +```js +mp.collect().then(all => { + // all is an array of all the data emitted + // encoding is supported in this case, so + // so the result will be a collection of strings if + // an encoding is specified, or buffers/objects if not. + // + // In an async function, you may do + // const data = await stream.collect() +}) +``` + +### iteration + +You can iterate over streams synchronously or asynchronously in +platforms that support it. + +Synchronous iteration will end when the currently available data is +consumed, even if the `end` event has not been reached. In string and +buffer mode, the data is concatenated, so unless multiple writes are +occurring in the same tick as the `read()`, sync iteration loops will +generally only have a single iteration. + +To consume chunks in this way exactly as they have been written, with +no flattening, create the stream with the `{ objectMode: true }` +option. + +```js +const mp = new Minipass({ objectMode: true }) +mp.write('a') +mp.write('b') +for (let letter of mp) { + console.log(letter) // a, b +} +mp.write('c') +mp.write('d') +for (let letter of mp) { + console.log(letter) // c, d +} +mp.write('e') +mp.end() +for (let letter of mp) { + console.log(letter) // e +} +for (let letter of mp) { + console.log(letter) // nothing +} +``` + +Asynchronous iteration will continue until the end event is reached, +consuming all of the data. + +```js +const mp = new Minipass({ encoding: 'utf8' }) + +// some source of some data +let i = 5 +const inter = setInterval(() => { + if (i --> 0) + mp.write(Buffer.from('foo\n', 'utf8')) + else { + mp.end() + clearInterval(inter) + } +}, 100) + +// consume the data with asynchronous iteration +async function consume () { + for await (let chunk of mp) { + console.log(chunk) + } + return 'ok' +} + +consume().then(res => console.log(res)) +// logs `foo\n` 5 times, and then `ok` +``` diff --git a/deps/npm/node_modules/tar/node_modules/minipass/index.js b/deps/npm/node_modules/tar/node_modules/minipass/index.js new file mode 100644 index 00000000000000..de472c36e76847 --- /dev/null +++ b/deps/npm/node_modules/tar/node_modules/minipass/index.js @@ -0,0 +1,375 @@ +'use strict' +const EE = require('events') +const Yallist = require('yallist') +const EOF = Symbol('EOF') +const MAYBE_EMIT_END = Symbol('maybeEmitEnd') +const EMITTED_END = Symbol('emittedEnd') +const CLOSED = Symbol('closed') +const READ = Symbol('read') +const FLUSH = Symbol('flush') +const doIter = process.env._MP_NO_ITERATOR_SYMBOLS_ !== '1' +const ASYNCITERATOR = doIter && Symbol.asyncIterator || Symbol('asyncIterator not implemented') +const ITERATOR = doIter && Symbol.iterator || Symbol('iterator not implemented') +const FLUSHCHUNK = Symbol('flushChunk') +const SD = require('string_decoder').StringDecoder +const ENCODING = Symbol('encoding') +const DECODER = Symbol('decoder') +const FLOWING = Symbol('flowing') +const RESUME = Symbol('resume') +const BUFFERLENGTH = Symbol('bufferLength') +const BUFFERPUSH = Symbol('bufferPush') +const BUFFERSHIFT = Symbol('bufferShift') +const OBJECTMODE = Symbol('objectMode') + +// Buffer in node 4.x < 4.5.0 doesn't have working Buffer.from +// or Buffer.alloc, and Buffer in node 10 deprecated the ctor. +// .M, this is fine .\^/M.. +let B = Buffer +/* istanbul ignore next */ +if (!B.alloc) { + B = require('safe-buffer').Buffer +} + +module.exports = class MiniPass extends EE { + constructor (options) { + super() + this[FLOWING] = false + this.pipes = new Yallist() + this.buffer = new Yallist() + this[OBJECTMODE] = options && options.objectMode || false + if (this[OBJECTMODE]) + this[ENCODING] = null + else + this[ENCODING] = options && options.encoding || null + if (this[ENCODING] === 'buffer') + this[ENCODING] = null + this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null + this[EOF] = false + this[EMITTED_END] = false + this[CLOSED] = false + this.writable = true + this.readable = true + this[BUFFERLENGTH] = 0 + } + + get bufferLength () { return this[BUFFERLENGTH] } + + get encoding () { return this[ENCODING] } + set encoding (enc) { + if (this[OBJECTMODE]) + throw new Error('cannot set encoding in objectMode') + + if (this[ENCODING] && enc !== this[ENCODING] && + (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) + throw new Error('cannot change encoding') + + if (this[ENCODING] !== enc) { + this[DECODER] = enc ? new SD(enc) : null + if (this.buffer.length) + this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) + } + + this[ENCODING] = enc + } + + setEncoding (enc) { + this.encoding = enc + } + + write (chunk, encoding, cb) { + if (this[EOF]) + throw new Error('write after end') + + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + + if (!encoding) + encoding = 'utf8' + + // fast-path writing strings of same encoding to a stream with + // an empty buffer, skipping the buffer/decoder dance + if (typeof chunk === 'string' && !this[OBJECTMODE] && + // unless it is a string already ready for us to use + !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { + chunk = B.from(chunk, encoding) + } + + if (B.isBuffer(chunk) && this[ENCODING]) + chunk = this[DECODER].write(chunk) + + try { + return this.flowing + ? (this.emit('data', chunk), this.flowing) + : (this[BUFFERPUSH](chunk), false) + } finally { + this.emit('readable') + if (cb) + cb() + } + } + + read (n) { + try { + if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) + return null + + if (this[OBJECTMODE]) + n = null + + if (this.buffer.length > 1 && !this[OBJECTMODE]) { + if (this.encoding) + this.buffer = new Yallist([ + Array.from(this.buffer).join('') + ]) + else + this.buffer = new Yallist([ + B.concat(Array.from(this.buffer), this[BUFFERLENGTH]) + ]) + } + + return this[READ](n || null, this.buffer.head.value) + } finally { + this[MAYBE_EMIT_END]() + } + } + + [READ] (n, chunk) { + if (n === chunk.length || n === null) + this[BUFFERSHIFT]() + else { + this.buffer.head.value = chunk.slice(n) + chunk = chunk.slice(0, n) + this[BUFFERLENGTH] -= n + } + + this.emit('data', chunk) + + if (!this.buffer.length && !this[EOF]) + this.emit('drain') + + return chunk + } + + end (chunk, encoding, cb) { + if (typeof chunk === 'function') + cb = chunk, chunk = null + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + if (chunk) + this.write(chunk, encoding) + if (cb) + this.once('end', cb) + this[EOF] = true + this.writable = false + if (this.flowing) + this[MAYBE_EMIT_END]() + } + + // don't let the internal resume be overwritten + [RESUME] () { + this[FLOWING] = true + this.emit('resume') + if (this.buffer.length) + this[FLUSH]() + else if (this[EOF]) + this[MAYBE_EMIT_END]() + else + this.emit('drain') + } + + resume () { + return this[RESUME]() + } + + pause () { + this[FLOWING] = false + } + + get flowing () { + return this[FLOWING] + } + + [BUFFERPUSH] (chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1 + else + this[BUFFERLENGTH] += chunk.length + return this.buffer.push(chunk) + } + + [BUFFERSHIFT] () { + if (this.buffer.length) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1 + else + this[BUFFERLENGTH] -= this.buffer.head.value.length + } + return this.buffer.shift() + } + + [FLUSH] () { + do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) + + if (!this.buffer.length && !this[EOF]) + this.emit('drain') + } + + [FLUSHCHUNK] (chunk) { + return chunk ? (this.emit('data', chunk), this.flowing) : false + } + + pipe (dest, opts) { + if (dest === process.stdout || dest === process.stderr) + (opts = opts || {}).end = false + const p = { dest: dest, opts: opts, ondrain: _ => this[RESUME]() } + this.pipes.push(p) + + dest.on('drain', p.ondrain) + this[RESUME]() + return dest + } + + addListener (ev, fn) { + return this.on(ev, fn) + } + + on (ev, fn) { + try { + return super.on(ev, fn) + } finally { + if (ev === 'data' && !this.pipes.length && !this.flowing) + this[RESUME]() + else if (ev === 'end' && this[EMITTED_END]) { + super.emit('end') + this.removeAllListeners('end') + } + } + } + + get emittedEnd () { + return this[EMITTED_END] + } + + [MAYBE_EMIT_END] () { + if (!this[EMITTED_END] && this.buffer.length === 0 && this[EOF]) { + this.emit('end') + this.emit('prefinish') + this.emit('finish') + if (this[CLOSED]) + this.emit('close') + } + } + + emit (ev, data) { + if (ev === 'data') { + if (!data) + return + + if (this.pipes.length) + this.pipes.forEach(p => p.dest.write(data) || this.pause()) + } else if (ev === 'end') { + if (this[EMITTED_END] === true) + return + + this[EMITTED_END] = true + this.readable = false + + if (this[DECODER]) { + data = this[DECODER].end() + if (data) { + this.pipes.forEach(p => p.dest.write(data)) + super.emit('data', data) + } + } + + this.pipes.forEach(p => { + p.dest.removeListener('drain', p.ondrain) + if (!p.opts || p.opts.end !== false) + p.dest.end() + }) + } else if (ev === 'close') { + this[CLOSED] = true + // don't emit close before 'end' and 'finish' + if (!this[EMITTED_END]) + return + } + + const args = new Array(arguments.length) + args[0] = ev + args[1] = data + if (arguments.length > 2) { + for (let i = 2; i < arguments.length; i++) { + args[i] = arguments[i] + } + } + + try { + return super.emit.apply(this, args) + } finally { + if (ev !== 'end') + this[MAYBE_EMIT_END]() + else + this.removeAllListeners('end') + } + } + + // const all = await stream.collect() + collect () { + return new Promise((resolve, reject) => { + const buf = [] + this.on('data', c => buf.push(c)) + this.on('end', () => resolve(buf)) + this.on('error', reject) + }) + } + + // for await (let chunk of stream) + [ASYNCITERATOR] () { + const next = () => { + const res = this.read() + if (res !== null) + return Promise.resolve({ done: false, value: res }) + + if (this[EOF]) + return Promise.resolve({ done: true }) + + let resolve = null + let reject = null + const onerr = er => { + this.removeListener('data', ondata) + this.removeListener('end', onend) + reject(er) + } + const ondata = value => { + this.removeListener('error', onerr) + this.removeListener('end', onend) + this.pause() + resolve({ value: value, done: !!this[EOF] }) + } + const onend = () => { + this.removeListener('error', onerr) + this.removeListener('data', ondata) + resolve({ done: true }) + } + return new Promise((res, rej) => { + reject = rej + resolve = res + this.once('error', onerr) + this.once('end', onend) + this.once('data', ondata) + }) + } + + return { next } + } + + // for (let chunk of stream) + [ITERATOR] () { + const next = () => { + const value = this.read() + const done = value === null + return { value, done } + } + return { next } + } +} diff --git a/deps/npm/node_modules/tar/node_modules/minipass/package.json b/deps/npm/node_modules/tar/node_modules/minipass/package.json new file mode 100644 index 00000000000000..d38e18f6ef00f2 --- /dev/null +++ b/deps/npm/node_modules/tar/node_modules/minipass/package.json @@ -0,0 +1,67 @@ +{ + "_from": "minipass@^2.3.4", + "_id": "minipass@2.3.5", + "_inBundle": false, + "_integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "_location": "/tar/minipass", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "minipass@^2.3.4", + "name": "minipass", + "escapedName": "minipass", + "rawSpec": "^2.3.4", + "saveSpec": null, + "fetchSpec": "^2.3.4" + }, + "_requiredBy": [ + "/tar" + ], + "_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "_shasum": "cacebe492022497f656b0f0f51e2682a9ed2d848", + "_spec": "minipass@^2.3.4", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/tar", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/minipass/issues" + }, + "bundleDependencies": false, + "dependencies": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + }, + "deprecated": false, + "description": "minimal implementation of a PassThrough stream", + "devDependencies": { + "end-of-stream": "^1.4.0", + "tap": "^12.0.1", + "through2": "^2.0.3" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/isaacs/minipass#readme", + "keywords": [ + "passthrough", + "stream" + ], + "license": "ISC", + "main": "index.js", + "name": "minipass", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/minipass.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.3.5" +} diff --git a/deps/npm/node_modules/tar/node_modules/yallist/iterator.js b/deps/npm/node_modules/tar/node_modules/yallist/iterator.js index 9149b364889d1e..d41c97a19f9849 100644 --- a/deps/npm/node_modules/tar/node_modules/yallist/iterator.js +++ b/deps/npm/node_modules/tar/node_modules/yallist/iterator.js @@ -1,8 +1,8 @@ 'use strict' -var Yallist = require('./yallist.js') - -Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } } } diff --git a/deps/npm/node_modules/tar/node_modules/yallist/package.json b/deps/npm/node_modules/tar/node_modules/yallist/package.json index ac8e7c54a130ff..f24c8d0c7a140e 100644 --- a/deps/npm/node_modules/tar/node_modules/yallist/package.json +++ b/deps/npm/node_modules/tar/node_modules/yallist/package.json @@ -1,8 +1,8 @@ { "_from": "yallist@^3.0.2", - "_id": "yallist@3.0.2", + "_id": "yallist@3.0.3", "_inBundle": false, - "_integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", + "_integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "_location": "/tar/yallist", "_phantomChildren": {}, "_requested": { @@ -16,12 +16,13 @@ "fetchSpec": "^3.0.2" }, "_requiredBy": [ - "/tar" + "/tar", + "/tar/minipass" ], - "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "_shasum": "8452b4bb7e83c7c188d8041c1a837c773d6d8bb9", + "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "_shasum": "b4b049e314be545e3ce802236d6cd22cd91c3de9", "_spec": "yallist@^3.0.2", - "_where": "/Users/rebecca/code/npm/node_modules/tar", + "_where": "/Users/zkat/Documents/code/work/npm/node_modules/tar", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -35,7 +36,7 @@ "deprecated": false, "description": "Yet Another Linked List", "devDependencies": { - "tap": "^10.3.0" + "tap": "^12.1.0" }, "directories": { "test": "test" @@ -58,5 +59,5 @@ "preversion": "npm test", "test": "tap test/*.js --100" }, - "version": "3.0.2" + "version": "3.0.3" } diff --git a/deps/npm/node_modules/tar/node_modules/yallist/yallist.js b/deps/npm/node_modules/tar/node_modules/yallist/yallist.js index 4805bc69fa760e..b0ab36cf31b7a6 100644 --- a/deps/npm/node_modules/tar/node_modules/yallist/yallist.js +++ b/deps/npm/node_modules/tar/node_modules/yallist/yallist.js @@ -371,6 +371,6 @@ function Node (value, prev, next, list) { } try { - // add if support or Symbol.iterator is present - require('./iterator.js') + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) } catch (er) {} diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json index 5cfb10128ed3e8..9d96d30ebed6d9 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -1,28 +1,30 @@ { - "_from": "tar@4.4.6", - "_id": "tar@4.4.6", + "_from": "tar@4.4.8", + "_id": "tar@4.4.8", "_inBundle": false, - "_integrity": "sha512-tMkTnh9EdzxyfW+6GK6fCahagXsnYk6kE6S9Gr9pjVdys769+laCTbodXDhPAjzVtEBazRgP0gYqOjnk9dQzLg==", + "_integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "_location": "/tar", - "_phantomChildren": {}, + "_phantomChildren": { + "safe-buffer": "5.1.2" + }, "_requested": { "type": "version", "registry": true, - "raw": "tar@4.4.6", + "raw": "tar@4.4.8", "name": "tar", "escapedName": "tar", - "rawSpec": "4.4.6", + "rawSpec": "4.4.8", "saveSpec": null, - "fetchSpec": "4.4.6" + "fetchSpec": "4.4.8" }, "_requiredBy": [ "#USER", "/", "/pacote" ], - "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.6.tgz", - "_shasum": "63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b", - "_spec": "tar@4.4.6", + "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "_shasum": "b19eec3fde2a96e64666df9fdb40c5ca1bc3747d", + "_spec": "tar@4.4.8", "_where": "/Users/zkat/Documents/code/work/npm", "author": { "name": "Isaac Z. Schlueter", @@ -34,10 +36,10 @@ }, "bundleDependencies": false, "dependencies": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.3", - "minizlib": "^1.1.0", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", "yallist": "^3.0.2" @@ -45,14 +47,14 @@ "deprecated": false, "description": "tar for node", "devDependencies": { - "chmodr": "^1.0.2", + "chmodr": "^1.2.0", "end-of-stream": "^1.4.1", "events-to-array": "^1.1.2", "mutate-fs": "^2.1.1", "rimraf": "^2.6.2", "tap": "^12.0.1", - "tar-fs": "^1.16.2", - "tar-stream": "^1.6.0" + "tar-fs": "^1.16.3", + "tar-stream": "^1.6.2" }, "engines": { "node": ">=4.5" @@ -76,5 +78,5 @@ "preversion": "npm test", "test": "tap test/*.js --100 -J --coverage-report=text -c" }, - "version": "4.4.6" + "version": "4.4.8" } diff --git a/deps/npm/package.json b/deps/npm/package.json index 5c79d1566c3517..83eaf3662d120c 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "6.4.1", + "version": "6.5.0-next.0", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -40,28 +40,28 @@ "aproba": "~1.2.0", "archy": "~1.0.0", "bin-links": "^1.1.2", - "bluebird": "~3.5.1", + "bluebird": "^3.5.3", "byte-size": "^4.0.3", "cacache": "^11.2.0", "call-limit": "~1.1.0", "chownr": "~1.0.1", - "ci-info": "^1.4.0", + "ci-info": "^1.6.0", "cli-columns": "^3.1.2", "cli-table3": "^0.5.0", "cmd-shim": "~2.0.2", "columnify": "~1.5.4", - "config-chain": "~1.1.11", + "config-chain": "^1.1.12", "detect-indent": "~5.0.0", "detect-newline": "^2.1.0", "dezalgo": "~1.0.3", "editor": "~1.0.0", - "figgy-pudding": "^3.4.1", + "figgy-pudding": "^3.5.1", "find-npm-prefix": "^1.0.2", "fs-vacuum": "~1.2.10", "fs-write-stream-atomic": "~1.0.10", "gentle-fs": "^2.0.1", - "glob": "~7.1.2", - "graceful-fs": "~4.1.11", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", "has-unicode": "~2.0.1", "hosted-git-info": "^2.7.1", "iferr": "^1.0.2", @@ -95,7 +95,7 @@ "npm-install-checks": "~3.0.0", "npm-lifecycle": "^2.1.0", "npm-package-arg": "^6.1.0", - "npm-packlist": "^1.1.11", + "npm-packlist": "^1.1.12", "npm-pick-manifest": "^2.1.0", "npm-profile": "^3.0.2", "npm-registry-client": "^8.6.0", @@ -103,7 +103,7 @@ "npm-user-validate": "~1.0.0", "npmlog": "~4.1.2", "once": "~1.4.0", - "opener": "^1.5.0", + "opener": "^1.5.1", "osenv": "^0.1.5", "pacote": "^8.1.6", "path-is-inside": "~1.0.2", @@ -121,14 +121,14 @@ "retry": "^0.12.0", "rimraf": "~2.6.2", "safe-buffer": "^5.1.2", - "semver": "^5.5.0", + "semver": "^5.5.1", "sha": "~2.0.1", "slide": "~1.1.6", "sorted-object": "~2.0.1", "sorted-union-stream": "~2.1.3", - "ssri": "^6.0.0", + "ssri": "^6.0.1", "stringify-package": "^1.0.0", - "tar": "^4.4.6", + "tar": "^4.4.8", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "uid-number": "0.0.6", @@ -265,6 +265,7 @@ ], "devDependencies": { "deep-equal": "~1.0.1", + "licensee": "^5.0.0", "marked": "^0.5.0", "marked-man": "~0.2.1", "npm-registry-couchapp": "^2.7.1", @@ -279,6 +280,7 @@ "dumpconf": "env | grep npm | sort | uniq", "prepare": "node bin/npm-cli.js --no-audit --no-timing prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc", "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", + "licenses": "licensee --production --errors-only", "tap": "tap --reporter=classic --timeout 300", "tap-cover": "tap --reporter=classic --nyc-arg='--cache' --coverage --timeout 600", "test": "standard && npm run test-tap", diff --git a/deps/npm/test/need-npm5-update/lifecycle-signal.js b/deps/npm/test/need-npm5-update/lifecycle-signal.js index a003fb54ab49fa..5f9f4c43cfeb0c 100644 --- a/deps/npm/test/need-npm5-update/lifecycle-signal.js +++ b/deps/npm/test/need-npm5-update/lifecycle-signal.js @@ -88,13 +88,13 @@ test('lifecycle wait for async child process exit', { skip: process.platform !== 'darwin' && 'broken' }, function (t) { var innerChildPid - var interupted + var interrupted var child = spawn(npm, ['run', 'async'], { cwd: pkg }) child.stderr.on('data', function (data) { - if (!interupted) { - interupted = true + if (!interrupted) { + interrupted = true child.kill('SIGINT') } else { innerChildPid = parseInt(data.toString(), 10) @@ -110,13 +110,13 @@ test('lifecycle force kill using multiple SIGINT signals', { skip: process.platform !== 'darwin' && 'broken' }, function (t) { var innerChildPid - var interupted + var interrupted var child = spawn(npm, ['run', 'zombie'], { cwd: pkg }) child.stderr.on('data', function (data) { - if (!interupted) { - interupted = true + if (!interrupted) { + interrupted = true child.kill('SIGINT') } else { innerChildPid = parseInt(data.toString(), 10) diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/32/c8/6992ba4671408a292bb3f2fae4cd10416dcedb6a214c169054af6bcc792b6ea56f7245333357cc59e4f84660380604b5ff338258ad46973218d864799b5e b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/32/c8/6992ba4671408a292bb3f2fae4cd10416dcedb6a214c169054af6bcc792b6ea56f7245333357cc59e4f84660380604b5ff338258ad46973218d864799b5e deleted file mode 100644 index 80ee92c7856849..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/32/c8/6992ba4671408a292bb3f2fae4cd10416dcedb6a214c169054af6bcc792b6ea56f7245333357cc59e4f84660380604b5ff338258ad46973218d864799b5e +++ /dev/null @@ -1 +0,0 @@ -{"myorg:myteam":"write","myorg:anotherteam":"read"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/35/39/721f705f621cffe30dbc828be387e253c50ed05fb0a8e3f418769996bdde1dd1cb8af2e47dfe9417aab7ac3d238d1f036ef2e9adb898c386f0cda9b6861e b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/35/39/721f705f621cffe30dbc828be387e253c50ed05fb0a8e3f418769996bdde1dd1cb8af2e47dfe9417aab7ac3d238d1f036ef2e9adb898c386f0cda9b6861e deleted file mode 100644 index fa4c213ed2bb85..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/35/39/721f705f621cffe30dbc828be387e253c50ed05fb0a8e3f418769996bdde1dd1cb8af2e47dfe9417aab7ac3d238d1f036ef2e9adb898c386f0cda9b6861e +++ /dev/null @@ -1 +0,0 @@ -{"latest":"2.0.0","a":"0.0.2","b":"0.6.0","c":"7.7.7"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/58/b1/93d5b57d457df2bbeb659e217fb7f664d7bc636d05204f8f11fe14d51eb820fe3e152e1bcbad31aeb95b7f152de30efb113f81f1e9ede493f76f8525359e b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/58/b1/93d5b57d457df2bbeb659e217fb7f664d7bc636d05204f8f11fe14d51eb820fe3e152e1bcbad31aeb95b7f152de30efb113f81f1e9ede493f76f8525359e deleted file mode 100644 index 69e6544f8ea5a5..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/58/b1/93d5b57d457df2bbeb659e217fb7f664d7bc636d05204f8f11fe14d51eb820fe3e152e1bcbad31aeb95b7f152de30efb113f81f1e9ede493f76f8525359e +++ /dev/null @@ -1 +0,0 @@ -{"org":{"name":"myorg","size":1},"user":"myuser"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/5d/92/13f769c546fc7ded5c1c4b66fdc7fc4ff5024cc37b34d50e8e9a15bc70e008d5993d247da707fcff0956d3b3cb0d25e01cc0f396c1023fd172bef126579c b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/5d/92/13f769c546fc7ded5c1c4b66fdc7fc4ff5024cc37b34d50e8e9a15bc70e008d5993d247da707fcff0956d3b3cb0d25e01cc0f396c1023fd172bef126579c deleted file mode 100644 index 1f59ba9bcde181..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/5d/92/13f769c546fc7ded5c1c4b66fdc7fc4ff5024cc37b34d50e8e9a15bc70e008d5993d247da707fcff0956d3b3cb0d25e01cc0f396c1023fd172bef126579c +++ /dev/null @@ -1 +0,0 @@ -["zkat","bcoe"] \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/6f/c7/3dd4508c2d9f17eeb1cfd288276948a1689ebdf6a8d3f4f7516d4c68be639063e7e5437ef7ff72547aabe86b49a6b1bf5c733bdece3877d82bc8bc1a9a7d b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/6f/c7/3dd4508c2d9f17eeb1cfd288276948a1689ebdf6a8d3f4f7516d4c68be639063e7e5437ef7ff72547aabe86b49a6b1bf5c733bdece3877d82bc8bc1a9a7d deleted file mode 100644 index 24c60e2ca60ee3..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/6f/c7/3dd4508c2d9f17eeb1cfd288276948a1689ebdf6a8d3f4f7516d4c68be639063e7e5437ef7ff72547aabe86b49a6b1bf5c733bdece3877d82bc8bc1a9a7d +++ /dev/null @@ -1 +0,0 @@ -{"otheruser":"admin"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/75/d9/a85d7203d0183c7ad4da442983b0f4fd3bfab1113b3cbf0db456557c1a310876b0bad767bb7243ec6454dc373098ccdbbfe6c6108d3e671b8b0c003391f7 b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/75/d9/a85d7203d0183c7ad4da442983b0f4fd3bfab1113b3cbf0db456557c1a310876b0bad767bb7243ec6454dc373098ccdbbfe6c6108d3e671b8b0c003391f7 deleted file mode 100644 index 2eef70ccba0237..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/75/d9/a85d7203d0183c7ad4da442983b0f4fd3bfab1113b3cbf0db456557c1a310876b0bad767bb7243ec6454dc373098ccdbbfe6c6108d3e671b8b0c003391f7 +++ /dev/null @@ -1 +0,0 @@ -{"objects":[]} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/76/39/4b378512c68bf209b433e06b71df27a45f7e7be35f174a0f83bce7799628b74dbe993c18b1c12e899a1ed7b159470b382180d1f0a5c4098ac6092cda1a8f b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/76/39/4b378512c68bf209b433e06b71df27a45f7e7be35f174a0f83bce7799628b74dbe993c18b1c12e899a1ed7b159470b382180d1f0a5c4098ac6092cda1a8f deleted file mode 100644 index 3ae97a65db0815..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/76/39/4b378512c68bf209b433e06b71df27a45f7e7be35f174a0f83bce7799628b74dbe993c18b1c12e899a1ed7b159470b382180d1f0a5c4098ac6092cda1a8f +++ /dev/null @@ -1 +0,0 @@ -{"objects":[{"id":"foo","type":"package","name":"@foo/pkg","endpoint":"foo.com"},{"id":"bar","type":"owner","name":"bar","endpoint":"bar.com"},{"id":"baz","type":"scope","name":"baz","endpoint":"baz.com"}]} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/9d/b3/095447c9b53fe88bbf190fb6a324c7a42a84bf51d3c345fc88cdeea00f026167ad7329b42369d79a67812738a2324b7aae42d4feeac49a2b895c57b48168 b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/9d/b3/095447c9b53fe88bbf190fb6a324c7a42a84bf51d3c345fc88cdeea00f026167ad7329b42369d79a67812738a2324b7aae42d4feeac49a2b895c57b48168 deleted file mode 100644 index f80dde8f725237..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/9d/b3/095447c9b53fe88bbf190fb6a324c7a42a84bf51d3c345fc88cdeea00f026167ad7329b42369d79a67812738a2324b7aae42d4feeac49a2b895c57b48168 +++ /dev/null @@ -1 +0,0 @@ -{"_rev":"3-deadcafebabebeef"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/a0/f8/5ae8b484bc71fb13ef636b9aee45f548ab6357488369ffb02f239f9473c6b94c5c2a5ef3b1b96e16ce6158dc05f13ef88bcef32de3bc415a48cdc5500355 b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/a0/f8/5ae8b484bc71fb13ef636b9aee45f548ab6357488369ffb02f239f9473c6b94c5c2a5ef3b1b96e16ce6158dc05f13ef88bcef32de3bc415a48cdc5500355 deleted file mode 100644 index 09b8eb5c183d5d..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/a0/f8/5ae8b484bc71fb13ef636b9aee45f548ab6357488369ffb02f239f9473c6b94c5c2a5ef3b1b96e16ce6158dc05f13ef88bcef32de3bc415a48cdc5500355 +++ /dev/null @@ -1 +0,0 @@ -{"latest":"4.0.0"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/a1/a1/072cae616c1f6479110e3e3ee54fa16978c081d8032999d62d207e5cd6c7643e463d73d3ff4b218ad717724c918013e03954f9729192cbdfa1d0bed6fd39 b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/a1/a1/072cae616c1f6479110e3e3ee54fa16978c081d8032999d62d207e5cd6c7643e463d73d3ff4b218ad717724c918013e03954f9729192cbdfa1d0bed6fd39 deleted file mode 100644 index 679abe4ac1ca50..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/a1/a1/072cae616c1f6479110e3e3ee54fa16978c081d8032999d62d207e5cd6c7643e463d73d3ff4b218ad717724c918013e03954f9729192cbdfa1d0bed6fd39 +++ /dev/null @@ -1 +0,0 @@ -{"latest":"2.0.0","b":"0.6.0"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/d6/d1/4eb9c846c1be933b090f391e14570c12b4078d0beb415e67ed6e6f8eda54a1dc2dc7e52ef875f9b8390b9a6e8e85cea9bdba6cf52a9c142c9beafc96bfce b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/d6/d1/4eb9c846c1be933b090f391e14570c12b4078d0beb415e67ed6e6f8eda54a1dc2dc7e52ef875f9b8390b9a6e8e85cea9bdba6cf52a9c142c9beafc96bfce deleted file mode 100644 index 54c0ad8ce182bc..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/d6/d1/4eb9c846c1be933b090f391e14570c12b4078d0beb415e67ed6e6f8eda54a1dc2dc7e52ef875f9b8390b9a6e8e85cea9bdba6cf52a9c142c9beafc96bfce +++ /dev/null @@ -1 +0,0 @@ -["myorg:team1","myorg:team2","myorg:team3"] \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/dc/2a/a4df42cd435623f4c2c3e274fa081cc942ff45dcfa98cdf4a9324b6a21c3721c34bb97e6809ee28051fc10f57749cff60aa970a1e38c7a6c354a9403554e b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/dc/2a/a4df42cd435623f4c2c3e274fa081cc942ff45dcfa98cdf4a9324b6a21c3721c34bb97e6809ee28051fc10f57749cff60aa970a1e38c7a6c354a9403554e deleted file mode 100644 index fa7bb7f467d7bd..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/dc/2a/a4df42cd435623f4c2c3e274fa081cc942ff45dcfa98cdf4a9324b6a21c3721c34bb97e6809ee28051fc10f57749cff60aa970a1e38c7a6c354a9403554e +++ /dev/null @@ -1 +0,0 @@ -{"@foo/bar":"write","@foo/util":"read"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/e7/06/de9d8e6ce16152be537cbccdf26321b3d678394ce42fb56aa4e69a37aba9d54df284700d066f7e6d005e461ab41d220fd6f268ff889e405809108a7b8676 b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/e7/06/de9d8e6ce16152be537cbccdf26321b3d678394ce42fb56aa4e69a37aba9d54df284700d066f7e6d005e461ab41d220fd6f268ff889e405809108a7b8676 deleted file mode 100644 index a04cd09944ea10..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/e7/06/de9d8e6ce16152be537cbccdf26321b3d678394ce42fb56aa4e69a37aba9d54df284700d066f7e6d005e461ab41d220fd6f268ff889e405809108a7b8676 +++ /dev/null @@ -1 +0,0 @@ -{"latest":"2.0.0","a":"0.0.2","b":"0.6.0"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/f3/e8/2d6a0b75ad5cebd09177d93f572dbd8b877ee9f1505b2e84e03810fa0412e4904060be7d2a4df4221b1bb92884db886826bf8cd26634667a2d103a999438 b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/f3/e8/2d6a0b75ad5cebd09177d93f572dbd8b877ee9f1505b2e84e03810fa0412e4904060be7d2a4df4221b1bb92884db886826bf8cd26634667a2d103a999438 deleted file mode 100644 index 9b3718b2d05897..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/f3/e8/2d6a0b75ad5cebd09177d93f572dbd8b877ee9f1505b2e84e03810fa0412e4904060be7d2a4df4221b1bb92884db886826bf8cd26634667a2d103a999438 +++ /dev/null @@ -1 +0,0 @@ -{"objects":[{"id":"foo"},{"id":"bar"},{"id":"baz"}]} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/f5/bd/a6b78fcf204b1ec0e6069045b44f6669e9aab878bfc891b946e4cecb843f4e87e428b6771ae7b4a2ce8f303e97746763b0642faf89a9b00425297dc78d6a b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/f5/bd/a6b78fcf204b1ec0e6069045b44f6669e9aab878bfc891b946e4cecb843f4e87e428b6771ae7b4a2ce8f303e97746763b0642faf89a9b00425297dc78d6a deleted file mode 100644 index 075750f8680f0d..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/f5/bd/a6b78fcf204b1ec0e6069045b44f6669e9aab878bfc891b946e4cecb843f4e87e428b6771ae7b4a2ce8f303e97746763b0642faf89a9b00425297dc78d6a +++ /dev/null @@ -1 +0,0 @@ -{"latest":"1.0.0","a":"0.0.1","b":"0.5.0"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/fd/37/65c30143da9bd36758e4f19cce0984aac9f6a6a90a2a1ea79ab8acec84841b7b2af4b20e52051d585ac12bef1930d35234d6556319315d5656391257472d b/deps/npm/test/npm_cache/_cacache/content-v2/sha512/fd/37/65c30143da9bd36758e4f19cce0984aac9f6a6a90a2a1ea79ab8acec84841b7b2af4b20e52051d585ac12bef1930d35234d6556319315d5656391257472d deleted file mode 100644 index fb33c40d3795ba..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/content-v2/sha512/fd/37/65c30143da9bd36758e4f19cce0984aac9f6a6a90a2a1ea79ab8acec84841b7b2af4b20e52051d585ac12bef1930d35234d6556319315d5656391257472d +++ /dev/null @@ -1 +0,0 @@ -{"username":"admin","username2":"foo"} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/00/35/36954ee0eaf596da0434975d2bf5aef10eee1dc6975ca51b8cdd43078de0 b/deps/npm/test/npm_cache/_cacache/index-v5/00/35/36954ee0eaf596da0434975d2bf5aef10eee1dc6975ca51b8cdd43078de0 deleted file mode 100644 index 3600ad47be5a7f..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/00/35/36954ee0eaf596da0434975d2bf5aef10eee1dc6975ca51b8cdd43078de0 +++ /dev/null @@ -1,11 +0,0 @@ - -95d6aba9282c02c23c03f8348c39af715fad2370 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535492955673,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["0f584c54100a37b5"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 21:49:15 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -8f7c3c19e06c52ea56ccbef21fe75c33fe2f8074 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535493030890,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["96d2241700f288cc"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 21:50:30 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -7c467a7b08cc3013a1625d9d8109b557ea8c3635 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535493037361,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["76a097347e5a54c2"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 21:50:37 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -41759f54b684361d9cbfcde0b3d89f4268f60376 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535493102807,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["e012e50a32f16f8a"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 21:51:42 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -503ec89890df34186c041a497247c67fc2892e36 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535493139213,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["6250a5422fd7d03d"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 21:52:19 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -61ba3892fb72ca27d0ba2282837ca47fee1fb82f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535493205910,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["ef2edb6874dd38b6"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 21:53:25 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -b951d015bcfc70a1cc9df8ae1c6c6c48eb2df206 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535494204488,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["15d442cbf8859f58"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 22:10:04 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -176361a9cd6659c5e9151e53f08d03ff11967bc3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535497755533,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20&quality=0.65&popularity=0.98&maintenance=0.5","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["9ae0079658501fdd"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 23:09:15 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -a9342e11793311df25a54d7506a4594c6e486990 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535497781207,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20&quality=0.65&popularity=0.98&maintenance=0.5","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["899c92291616fbee"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 23:09:41 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -ff36631f3a8f53b1469488301aaf85adde91fd1c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/search","integrity":"sha512-ddmoXXID0Bg8etTaRCmDsPT9O/qxETs8vw20VlV8GjEIdrC612e7ckPsZFTcNzCYzNu/5sYQjT5nG4sMADOR9w==","time":1535498072189,"size":14,"metadata":{"url":"http://localhost:1337/-/v1/search?text=none&size=20&quality=0.65&popularity=0.98&maintenance=0.5","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["25a1f5d4d7a8d03c"],"referer":["search none"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 28 Aug 2018 23:14:32 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/03/83/ad7a98c4301ee656fb9748d3cfd341e7953f8be5bbc7e46e4df546f3332e b/deps/npm/test/npm_cache/_cacache/index-v5/03/83/ad7a98c4301ee656fb9748d3cfd341e7953f8be5bbc7e46e4df546f3332e deleted file mode 100644 index c5493bbaf702ad..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/03/83/ad7a98c4301ee656fb9748d3cfd341e7953f8be5bbc7e46e4df546f3332e +++ /dev/null @@ -1,6 +0,0 @@ - -b7b8a139f65802e7d943f776eb6ac759db7613d1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam","integrity":null,"time":1534466264207} -1acc6e8fcc4a346526bfb0b446501102e243cc39 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam","integrity":null,"time":1534466336237} -4957dfa692c00135f561de920df79db7cf52a929 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam","integrity":null,"time":1534466388909} -45fa3a21a34683ac7508be3128505ce8dc3908e2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam","integrity":null,"time":1534466460466} -aec18881db02578eecf9452a3e79752fdc0ade70 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam","integrity":null,"time":1534466473427} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/19/db/491ce5fd3b8f5521f62a3d208c8b91325f3f8fe347347649e2e7cb8c10b2 b/deps/npm/test/npm_cache/_cacache/index-v5/19/db/491ce5fd3b8f5521f62a3d208c8b91325f3f8fe347347649e2e7cb8c10b2 deleted file mode 100644 index 35aaf658ea1f00..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/19/db/491ce5fd3b8f5521f62a3d208c8b91325f3f8fe347347649e2e7cb8c10b2 +++ /dev/null @@ -1,3 +0,0 @@ - -c8d410da5272e1432c5d3791cb82b7a6fcda7943 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook","integrity":null,"time":1535147321803} -9cd3610b40fa2209e6c317071c60b89e2cd30b9e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook","integrity":null,"time":1535147322264} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/1e/c1/c1f0fea37e015610f77e0486d0c90745de8da2029e042c59f6197901f5fb b/deps/npm/test/npm_cache/_cacache/index-v5/1e/c1/c1f0fea37e015610f77e0486d0c90745de8da2029e042c59f6197901f5fb deleted file mode 100644 index 0062e251e4efc9..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/1e/c1/c1f0fea37e015610f77e0486d0c90745de8da2029e042c59f6197901f5fb +++ /dev/null @@ -1,49 +0,0 @@ - -4c6efa8beb4f9ee09a548030f8f49421384ed856 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535507205379} -6f083cbb7ee77586732ec3f86ad79664680b84df {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535507357951} -6322acaf2498a1fe7fddf6c6123a50a0196c288b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535507405178} -3efc4c6989f9979bee5131c53c380372dc3d5eac {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535507642304} -7a63704f1a587f39a8cbc29a1b423456f4ce83ed {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535507673689} -25260663d66f589376912c38c209032e2a96d956 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535507771597} -13c8843e05096eecb7041cb64e33ec806a481172 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535507814077} -1db20ba78b69e06203cfd3771980a1d556d81228 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535508087483} -e1fe3047fb1d79f54e4afafe9b731a3993075ab9 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535508176773} -d3a0e25a7a79e88767ac8441ee11d37de161d1b9 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535508176789,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["9be6193c7cd384f2"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:02:56 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -12c277e03cd309576f27aa280bda117eccbfb0ee {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535508338485} -57e66d3c215a18b4391c02ac2bc29b3b2ce289a5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535508338498,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["d14a29f4bffea27b"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:05:38 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -b4af86c0c7be7f49f3b34be09ac88f80f3895ec2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535508347048} -84111393e4d748685b507fce12a7bdce4ba2bb33 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535508347068,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["d7ebb91205585843"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:05:47 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -a3afff4851be68ab81476e57611a336a4ce3f937 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535508500789} -b28dbf133d991653ccf55e79a1dc860388f31a85 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535508500805,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["ec4e53dfbdba679b"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:08:20 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -65422c664905e701880c0c3abb2ef4473817031e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535508673539} -6239b5491013b402e09bb4123a3759fccf420691 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535508753069} -cffddc5799d386ce6e8f054cd669db33bee97fe7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535508790454} -35529c323dd6c3f3896a40f931f27ba0f5b92213 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535508827877} -63a4da8f1d82d7422a246ec4d6c453ef4996ced4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535508827893,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["abe0d45a8c3c35a9"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:13:47 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -0d17fd06e4774f59cab6124fd2e4b7a5c1bc0600 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535509148186} -68da55d73e2a71ca9ed53041a7200cdbe3ab2655 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535509148202,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["cf670a32a83de8c3"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:19:08 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -e4eb7121cf1e1bdc86a8a105d24757fa408d92c8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535509275267} -c73c3484105212921b979ecb78169fa868b9b9f2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535509275287,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["7ae2aadeee56879d"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:21:15 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -886e11adcad6834821c0a82124399fa2c136aab7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535509523070} -7e476bd73487b8e27f50f190e39c4bdbdc7f2674 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535509545085} -f3c9380a65a1fd99abe2a5f9f2fab060b873a5de {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535509545102,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["729b4b4304528dec"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:25:45 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -5347c67bf298eaab71757c5c9db27e03f4a21977 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535509695070} -319ca824bbbddbc6448a4eb6982a1e4c9d6aba95 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535509695084,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["7fd85021e9242052"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:28:15 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -ad839c5526b724d91bf212b5a8c7417e49c39022 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535509799779} -b905125db386fd77abbaef88f4f652846e983bd8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535509799796,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["14866d66ed58291c"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:29:59 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -606b352267019699511e4c410aad4095abf7aa84 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535509808786} -117af2288a1fbb5ebe499364c45c68ec9a050080 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535509808802,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["7c2f31f806e1393e"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:30:08 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -638f707d9765eb9e6432c997aa3cfea7dcaced9e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535509829587} -bad3de6797fc0e27964e36ff58ec695992010216 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535509829602,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["f666ef09a58036e9"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:30:29 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -1db23c47e755e0bd8f67fa77a32b04d74b82b1c4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535509887476} -0912cbbb082b42c01a81fcf237f189287b643efd {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535509887491,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["a7c5a6b04a9c7d11"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:31:27 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -7ce38a7e0a373e1e9513c52b60b77add9bf721ff {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535510004435} -d4da059078a6d86fb829622e5bee2f910647539b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535510004450,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["1bde4de81e56c43e"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:33:24 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -cdb1f8804b116c9e2e123ad5d93ca97260d56602 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535510057889} -82933a5f7463de9a7ae51a429b5757a1f7a09610 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535510057903,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["aa941f2b9f63a1a2"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:34:17 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -396c96cdabd363c99b5f64e1d0d062219d5144c1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535510109825} -af42d004b5f47d9b4c8dbbf721f7d1c012f0fa1e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535510109840,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["088ffbadc0e1caf4"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:35:09 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -75e98d1ade3c6961fb7160e9ae34221683fff4bb {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535510139636} -6d22a384a697ab5b1949cee9adefe4598655fe51 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535510139652,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["b780561a1e9c8a1e"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:35:39 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -95e4f6357bb38b54621b03aa1a84b374eef0bbd8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":null,"time":1535510171272} -2b4bdca7cf8795a0f25880f0bb7c4b5fd674172b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u","integrity":"sha512-nbMJVEfJtT/oi78ZD7ajJMekKoS/UdPDRfyIze6gDwJhZ61zKbQjadeaZ4EnOKIyS3quQtT+6sSaK4lcV7SBaA==","time":1535510171286,"size":29,"metadata":{"url":"http://localhost:1337/-/user/org.couchdb.user:u?write=true","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["37d9116c98220f5c"],"referer":["adduser"],"authorization":["Basic dTp4"]},"resHeaders":{"connection":["close"],"date":["Wed, 29 Aug 2018 02:36:11 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/34/f7/495a783848aed5199e0583f72c91d67d20fa9f5f5604755719bc421195dd b/deps/npm/test/npm_cache/_cacache/index-v5/34/f7/495a783848aed5199e0583f72c91d67d20fa9f5f5604755719bc421195dd deleted file mode 100644 index 95409000ae6e89..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/34/f7/495a783848aed5199e0583f72c91d67d20fa9f5f5604755719bc421195dd +++ /dev/null @@ -1,41 +0,0 @@ - -db28f22b880390def634cefb97dddb360f0db697 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534802873275} -78d4546cdc7573ea6298e17938b76468c830c8e6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534802905598} -ad02dce54b4dde75ba5190dbf075a13909216391 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534802923991} -f2391730ad011350fed0653502498e28d6ea15ab {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534802941829} -502b8818eb326dcbd2395473accb32aae14abc1f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534802962425} -c596e1fb4b2e23fb6353185089ff5e4d46bb3309 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534803338264} -c5e98bdb0fc2bf356ee3542f975f45619d21a549 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534803580873} -84573b0065f7c083871a149b46b038799a2f3025 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534803622125} -d36c1ee664fb93416c7e1fea93e5827862bde22f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534803653450} -cfa82599a71bead8bc39e72ac83685633d2c29cf {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534803699792} -9e9f6603581f53fa1c09bfa4e28900cb4f828c0d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534803825090} -50e21e9ffbc1aee32160ddd772c344d73d6440e3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534803872395} -ed311ab3455fac2741bfd408f879400985bf94d6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534814950891} -b9c3a519448b96ffb2da9947804b437268493cee {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534815142977} -939465d189300c7ebcc43a248a867a556f64697a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534815470086} -437c8a254bb44cf5065f61ce9fdf37065c1d3cf3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534815825135} -0e4733c06243f87997f15bd65ddcb0466e150a0d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534815895684} -f62b95a0be9b37b8621930f5490e9bbdcdf80f7f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534815934549} -a20533562f721974ad5075af6718c88481e30fdb {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816104854} -6cd4cd0a88964d785965bf0949815a7889df9c5c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816129603} -f5da22122ba99f8d524fd9b735cc9fecc486c9ec {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816191612} -2a83b8bbd81425c23d2ca19ad8d144fc1e4a11f9 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816266929} -d905199b570c219045ea3d6db7697998279006e8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816303433} -b1937ea167e89a8bf1b8ca478db7eb6df3e182ca {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816325373} -88f17c81c7a1abf37d773f9a3235244a669f405c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816388394} -232c4b853086b13b4dc92c20e2bb0f6068654e2b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816404268} -3a36009d53c3d8f630eaf548c2d6d6d6098c9d5b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816451248} -1c42a75097740b84f1b2ea2deaaf6d54f91bb3ad {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816493932} -5e5d667e5640a12d9eb002d5cc069ef3b3cc929f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816583894} -6f0c2bc650692ff40d80a9aab0f27a919d3e3d63 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816637356} -671eeb551573f1a3fce1e79f1c422464f6ae3a12 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816703655} -10ddf7ed0f8b60bc663167ce16a1ad6720224542 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816812572} -1ad762bd3b8f932f6aa7777cdacbeb212b3b81b4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816841791} -86fda8d22b0b664583c6a849f6acefc0f48d116d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816972518} -5a4993b0fc5ab3a9bf3a8eeb2ef6744793dd5548 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534816999571} -313b0fb22e052b7f4195a23b9f8379767c501bd2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534817010379} -059b5f1c4e388d711d9a21d7ef36a06d6efa62fd {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534817116155} -a2d150bcc9eaad68846239398f7e8e2a4528f1e7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534817202629} -bee191f8aee196a199e9db0e5fdd71d14eb2b54e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1534817224579} -ec42d23728221d9acc1fe4b15e93d7c4823ee564 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/access","integrity":null,"time":1535072793577} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/36/f0/f9888df4ab8f8fd0a7e5522db89e11130b423c838f955f81ea487c996ca1 b/deps/npm/test/npm_cache/_cacache/index-v5/36/f0/f9888df4ab8f8fd0a7e5522db89e11130b423c838f955f81ea487c996ca1 deleted file mode 100644 index 21c2c6d9a07c1f..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/36/f0/f9888df4ab8f8fd0a7e5522db89e11130b423c838f955f81ea487c996ca1 +++ /dev/null @@ -1,12 +0,0 @@ - -f005e2d659d50791e96c3a8d67730ad1cb783c3a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":null,"time":1534466264672} -b35e0cde7737c1fd6bcac9766b9421b7672bec25 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":null,"time":1534466265135} -3b3a7efdeb754301e2ec20d4af5b2e6d75d8c0c3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":"sha512-XZIT92nFRvx97VwcS2b9x/xP9QJMw3s01Q6OmhW8cOAI1Zk9JH2nB/z/CVbTs8sNJeAcwPOWwQI/0XK+8SZXnA==","time":1534466266061,"size":15,"metadata":{"url":"http://localhost:1337/-/team/myorg/myteam/user?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["dc19e66ae3c0eed9"],"referer":["team ls myorg:myteam"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 17 Aug 2018 00:37:46 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -df310691750e71ffd83e5be13331dbe3cb2d448e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":null,"time":1534466336685} -45c3c79c7eafff673b3559bddfb3bc482da8cd4c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":null,"time":1534466337174} -8b331c270c2b28ebe11dabcb0834e39dcfa38d7d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":null,"time":1534466389359} -7304efe426354bebe681abe5c6c27e93b8a1f4d6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":null,"time":1534466389821} -e5d3eefe973689153430bc702e68bd8062ad62c2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":"sha512-XZIT92nFRvx97VwcS2b9x/xP9QJMw3s01Q6OmhW8cOAI1Zk9JH2nB/z/CVbTs8sNJeAcwPOWwQI/0XK+8SZXnA==","time":1534466390766,"size":15,"metadata":{"url":"http://localhost:1337/-/team/myorg/myteam/user?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["6684f4652d5101ff"],"referer":["team ls myorg:myteam"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 17 Aug 2018 00:39:50 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -00d2e218c012de0536783def8417dc9b80151696 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":null,"time":1534466473887} -d945084654a0dc86a5a554831338ae9c5921ec28 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":null,"time":1534466474332} -b80397458af3bea72695ab3dcf978a39d7674a56 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/user","integrity":"sha512-XZIT92nFRvx97VwcS2b9x/xP9QJMw3s01Q6OmhW8cOAI1Zk9JH2nB/z/CVbTs8sNJeAcwPOWwQI/0XK+8SZXnA==","time":1534466475243,"size":15,"metadata":{"url":"http://localhost:1337/-/team/myorg/myteam/user?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["1ab0fb0a362ab7c5"],"referer":["team ls myorg:myteam"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 17 Aug 2018 00:41:15 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/45/de/16c689e504312432fd32876ba741e4e80b44499a609a164c0ea47cab1aa1 b/deps/npm/test/npm_cache/_cacache/index-v5/45/de/16c689e504312432fd32876ba741e4e80b44499a609a164c0ea47cab1aa1 deleted file mode 100644 index b2a5352630b45a..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/45/de/16c689e504312432fd32876ba741e4e80b44499a609a164c0ea47cab1aa1 +++ /dev/null @@ -1,3 +0,0 @@ - -24a3a4d04cb20dc4d3d11a8bb7fbe7a38f9a192f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/token/glarb","integrity":null,"time":1535511681009} -2f0699bbd3da686a78b1d696666e1ebdacd7aa1d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/token/glarb","integrity":null,"time":1535511689271} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/4b/fa/51a839f22632c42d66d63607a55048be00c0a16bcf8dc96b9aadb8511570 b/deps/npm/test/npm_cache/_cacache/index-v5/4b/fa/51a839f22632c42d66d63607a55048be00c0a16bcf8dc96b9aadb8511570 deleted file mode 100644 index 8d53c8d2312e87..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/4b/fa/51a839f22632c42d66d63607a55048be00c0a16bcf8dc96b9aadb8511570 +++ /dev/null @@ -1,84 +0,0 @@ - -3265d37efb5b8ee29fc44ac18df4b20fe3413d60 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802871305} -18b5011e562bbf190417f0ca180ab87d19fa5de0 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802872769} -a311c3ce75bc11881836d38b45c9df6f60a5938b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802903616} -383a2dc83b0a48adb540ed35be3571c47e71e917 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802905086} -3ffb813f3d647ca9626e18424ac28fcc77ad88e8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802922019} -73b36d9ec508911163d8a3e633e1edbf4924c205 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802923481} -fc1cf42884719372fc2c7bf76b71f93fc58c7b78 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802939829} -415e31410aaced9fad496194fe212426464cb4a5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802941315} -9b6df8bd54ff5835ede62daaa0318c63363b4916 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802960426} -417dca541c7a27b6c82fe445a8c391eaef6d459b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534802961910} -95b7966f662210fe71a857f362ad45cb4756d0dc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803336246} -392c1f887d5b3cf781fb372139d45ebfc526409c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803337715} -9ef1814332a9f46b5028f0c4471595d48914fa00 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803578869} -5699cd01582a2fe8c50a995a2174c47351df151a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803580354} -402fce99dccdabad1c806fda4f2bc3153834f408 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803612784} -992626d13f6eba317c1cfaaf9e80187fa8c9ce01 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803620100} -cfac161e1e8a4ad01b8e0ae7fd596e1cc312d177 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803621608} -311e3253eb5e2bd0554771754a6c24a307493fba {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803651475} -75680bb15ffb2d09cf6c4049e0395b50b8f4a8c9 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803652943} -12312e4c84e2e8823ac6b3f476e8b174880c1933 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803697770} -8aab4e0bd9c0ba65c9f8aaa0d8bb292190101405 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803699263} -344fcd5c7c1424d8c9af8016dc78fcf5bd24d8d7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803823089} -83d58a2ac91dfe37aba29a67020af724c640ea9d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803824571} -eff72f9b4b2eb3e4ce2d35aa63464468ded4a1b2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803870277} -b41291e8377cf885a63a8fa67e198906fc624fda {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534803871868} -d815e11ec396518944e47dc1616a52e2f1f0ff16 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534814948708} -7ef166faa0ea11236b4a0e9f078a7c19d2584a25 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534814950322} -b2b46cef421f64f754a25c149b6985211902f9ab {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815140878} -c5afa9a80f35abeb0cb4d7a3ca66feebadd1d979 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815142433} -60e9524c82bd7a66fbe6059971bd5eeadd6c79c8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815468061} -1aae4f2f3e51233bf3d365f75a8e0bbc1576af9b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815469561} -127415a357a77d480bb3df7af316a69bbbf7d511 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815766792} -0c748358926bb20b4810e526e860690e02616192 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815823068} -bafb8f19a00a61393dd9a08743fabd27818ab255 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815824596} -1e0df69472c047497b8188bcc4efd6b879270aa4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815893505} -acbe22003f40856ae83feb63a39bcafe00cfa070 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815895159} -ebd618b5d68ab317c136c395c16cec258870949d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815932515} -6e1ee7bc73ef2f0a3d94a77f7b9860c743e7d1b1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534815934020} -90cc55cf15356c31ade67e7e6a12e824c8dabe62 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816102722} -0b0f29013f22bfa5006561d761614b38578905cd {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816104292} -74aebe149c9ffd0722217988e7e60b7f1fc16073 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816127522} -0fba10cfc9b0bc8716ed01b7fd3b3cf0f907cf51 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816129069} -006a9800ca9f3936bfa01440b0c6ef25411a2525 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816189610} -3665793f7149fb6e85828f3c1bebfdc317640ce8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816191092} -3f76bea7f012257b93ae20aba8881013174cfc20 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816264877} -b656de6f762b3cc8ad8d1175872d944795396866 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816266404} -a5c0fca35bde7e22bbbc89499119e1731fc0cd0d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816301381} -616492dce47a1b38667e7eb0f3f385e72f61f9ca {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816302902} -aac3a2e01985e41b709cc83e0c0ba1efb72315c8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816323262} -0adebfab5170b17ed6564e2d0011060fa57f56a2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816324821} -0de28493c0248bc7a199d1cb75f23de01e8ba878 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816386270} -3226a7fde8b0e83c42d5af8166fe5a4f38b6c9eb {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816387859} -0726fcb71e46f2ae83eb6f9e9e2d9fc60e281d53 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816402203} -13f0bb0f301315e9045ae58c7607d9be733e5f88 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816403718} -e6218a27851dd8f5caf0f934fd583d2dfe364438 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816449207} -36809d690ffeffffedfe422270b7da9fedb8eb86 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816450720} -ef55d7fe891fea91c3350880e8c390cecef84a4f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816491869} -e3afad30a82bb54ddbd14abc51ddd101424bc1f7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816493398} -1af1385cb999b32ffdb78646d91c9b98fa6fd6ec {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816581659} -7722185da86d98389bc6b189b75cf6ec46c7c1c0 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816583327} -ecc4de715432f9f8ca90e39931cf2cc05818c9f1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816635158} -f9720b1ece09288432ee210391920ac3b86e04d5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816636789} -94fa5e6bc6db046e00898060d4bbbc6437119cd2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816701607} -53c11c71bda83b26385539afcfc9d75f7e864de2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816703127} -21aa7224a27363d92f1a395b1e114960afe78695 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816810548} -69a647df64646edffde955223294f0cbf99c8a79 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816812044} -86dec651f03728dccfe3abe7a2209e7697cf615a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816839727} -39f585563e6a0a9d05a7d8dbbabe2eb93a073bd0 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816841252} -33940150cd4671f3921240b885a32409f41f453e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816970308} -659d9bf861b8ca4d33a15eb13ae84a52733b67bf {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816971951} -864b42f9056ced864a56ff4fd8a92886c87d1792 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816997554} -8f0e54212e3e6533800ec9497c28a91092285164 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534816999045} -2ff4053eb3922a3174a43d91979216166c135027 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534817008330} -65a0900ebe1299bbdebdc9547496b329e3e09fdc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534817009852} -bb4c372de73bab95a92fd8e70535b7b1af4a5ac6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534817101067} -cf993994fb47bce324102316cfcd39eef11ca056 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534817113796} -904081d0313b5e4bd94c6edeb0e07265c6da8292 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534817115607} -1ee695f60808e9a233c386dbb4768a123cab8ffa {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534817200501} -92c1395796088f67274213591098ace3f0a71f0f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534817202079} -ad7d2b603fa7dea990812be049f1d47c1b2f4b17 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534817222515} -c4b0427d5f252b299980266123f9da5a7a8daf78 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1534817224019} -d00167f26cc2662294e05b53c6058e95532fe02c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1535072791725} -8c55bad909093b172e6a000c2a43f378cbcefb8f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/access","integrity":null,"time":1535072793127} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/55/94/6aae1bf2eae7384bbf56a2610deec22135ab5102d53f8dc5bb1359585a5c b/deps/npm/test/npm_cache/_cacache/index-v5/55/94/6aae1bf2eae7384bbf56a2610deec22135ab5102d53f8dc5bb1359585a5c deleted file mode 100644 index c835822bb3389d..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/55/94/6aae1bf2eae7384bbf56a2610deec22135ab5102d53f8dc5bb1359585a5c +++ /dev/null @@ -1,11 +0,0 @@ - -e427c58a7efe8a2280e10cd966d9ae8d79e743d8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534804237928,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["21d7f530dd80cf87"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Mon, 20 Aug 2018 22:30:37 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -6f8add1f7cc168621c1fe68ed415c0d761a99765 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534804238519,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["0f259fcceb487aaf"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Mon, 20 Aug 2018 22:30:38 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -50cb4b75c039da51a9b463d1c03fa1b60a84e463 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817120694,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["269899a7585aba09"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:05:20 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -0b754645046f42860dac34975cd10d1310f2d455 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817121258,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["6fefaab01db15ac0"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:05:21 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -f5703a7b66cfbe73d8d66d75277afbfc3373570b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817207235,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["2f38431b11e35b42"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:06:47 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -6ecb5daa5f0f3dbb33ae30e5f63753b3d0adb116 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817207811,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["020266d47a9b6beb"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:06:47 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -0bdfa97d70cada72f18cbe2ca56ef406d0a57587 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817229174,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["74918bf2714e6a13"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:07:09 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -5b4181c0daf64ff72420c4af1fafdb5158da4480 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817229729,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["b53d4ecf523761d8"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:07:09 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -9807d1fc98cc03b38afec7fcdc67fb40706f8c5d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1535072797622,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["61d22280510fd221"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 01:06:37 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -46463af6ee275842bf0b54d9a03e40eb8ddac4c7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1535072798106,"size":39,"metadata":{"url":"http://localhost:1337/-/user/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["db101cd69bfaec0c"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 01:06:38 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/59/8d/bede4978235a53fade60aedbfe40200d189691fae9d90c694f654422738c b/deps/npm/test/npm_cache/_cacache/index-v5/59/8d/bede4978235a53fade60aedbfe40200d189691fae9d90c694f654422738c deleted file mode 100644 index ffd10053894c2a..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/59/8d/bede4978235a53fade60aedbfe40200d189691fae9d90c694f654422738c +++ /dev/null @@ -1,11 +0,0 @@ - -734bf4a2e70fe24e941f750e3eccf7f26ea0f60a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534804239771,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["6f0adb26f6e78d67"],"referer":["access ls-collaborators [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Mon, 20 Aug 2018 22:30:39 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -ef11b6cb78bb028c3254b20df5a5937191e881ee {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534804240425,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli&user=zkat","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["15301b1caa6e5523"],"referer":["access ls-collaborators [REDACTED] zkat"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Mon, 20 Aug 2018 22:30:40 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -cbac3264d9aaa50e5928b0df70b580cb92c0090d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534817122449,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["143df95fc7944797"],"referer":["access ls-collaborators [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:05:22 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -f4d2b605294e8f9e98a782689587a22858c3f722 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534817122981,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli&user=zkat","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["185b323430d96888"],"referer":["access ls-collaborators [REDACTED] zkat"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:05:22 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -300fe19aa4538a842f0bbe67539063aac478e8ca {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534817208932,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["2ccddcabc486f515"],"referer":["access ls-collaborators [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:06:48 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -fdc78328e1c2db70c48a4005f8e7bbba2b7f1fa7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534817209473,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli&user=zkat","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["9870128c5ca53dc3"],"referer":["access ls-collaborators [REDACTED] zkat"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:06:49 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -247511e84d11ef7f93c728ce8184ce1550e9314c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534817230836,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["81f3b65ab7228ce4"],"referer":["access ls-collaborators [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:07:10 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -9527f239d2e030a4cb9eb112692bb8d83454e8a2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534817231361,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli&user=zkat","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["a67d8e8246655fba"],"referer":["access ls-collaborators [REDACTED] zkat"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:07:11 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -10c6ab722ba6a53d429ab9f469a5d140aab5b2d1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1535072799063,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["7a1089bf7d12ca0a"],"referer":["access ls-collaborators [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 01:06:39 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -77f28c79c177f5b3a062b3de77601be0ca6a4f73 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fanother/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1535072799577,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fanother/collaborators?format=cli&user=zkat","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["04d0f327df6573ea"],"referer":["access ls-collaborators [REDACTED] zkat"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 01:06:39 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/5e/25/544dc931f40d3c9ec02d15a7754abc281ff227d3d4436045fc19bded3abb b/deps/npm/test/npm_cache/_cacache/index-v5/5e/25/544dc931f40d3c9ec02d15a7754abc281ff227d3d4436045fc19bded3abb deleted file mode 100644 index 57bdf8a2c16bdc..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/5e/25/544dc931f40d3c9ec02d15a7754abc281ff227d3d4436045fc19bded3abb +++ /dev/null @@ -1,51 +0,0 @@ - -8606158749ad1c3466d7255416d2f6e6cfc2e224 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534804115251} -1c39bb2fe0a59a1ecdcc942145f73260f971433e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816326331} -d6762d74233737051974ae3395ef254c1e3a458a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816327272} -ad642b81c112ad241bf25290e839c9cbe6a6dff4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816389343} -0c488f623560da301f925f3da2c380dc2a37e330 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816405210} -58ff85121196394218c5cb1f2c2b881af6b4ddc1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816452182} -3323aada41bdbbc3cbb6bd2c6ae45bf39cbb07a2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816452708} -07b80bc1955f6d7744c553e12afc63e59891a73a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816453658} -ea63497db8625e1887c2d455184259c545003b11 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816494876} -f8b9685468adc7314c04ce10e3f8addf6e6c64a3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816495391} -73bab4a7134aba8a55d16b4913d86191de14d306 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816496342} -78cfe94ce46fb00de4cc6ec81f34c78f9260192f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816585036} -be46030fbd0cc0d1a6b3ad10d00b29d9b6f9458d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816585707} -4875bd9c6fe2f5883948aa8b318eb1a2e2b587b4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816586880} -9cdc0a918d21aa23d2a3f6865e1cde63195897bd {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816638333} -3e87bd85576c47f82c71be3558033ad720f2a243 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816638925} -2c065a101210784d96e646f009cc41cc0b8a8fcb {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816639922} -e99721129963c210a79dfba0f6c204c7649616b5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816704619} -9be6343a460abf27f4e52b1d464370eed130e048 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816705140} -321c84c197cde7bb942b4c326e5da2dd0837a68d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816706070} -005a21f4f6c08f5ac2a6d0cfbb787165bfc2b42e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816813613} -15481b484285fa7bea57c85b27f0d7cd6c79338e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816814123} -66530b0985405b0fab7c38154e37dc94811bc552 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816815063} -ef0b67f1c9230b6d27b90225e91c68057caec0fc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816842757} -afc06ab08027cca4ef6cf491391c973d56709423 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816843289} -339bea0d8df29275a451b2ff1d8abda0b0add3d4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816844244} -0538fe03a26003ba357402b0d15aa5856aa91f84 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816973502} -002f837ab834f9a3ebe008c04c81e88feb5e9a46 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816974111} -64f14be8886a1ecc45ec8b97691aac08bd25f539 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534816975150} -a3d70a3408e4c9d87d2c7140db47d3ab26b1e911 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817000512} -dcd0614e6b70d3bc4308aafe811c6a2180018db2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817001021} -96c35e805fe366c3c8febdc288ab9052ab28c464 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817011406} -bf52cb3274571d5cbed1b61dc0f0fb43e00648fc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817011926} -5020a43c268b2f3f1392d3f57309e08ebb8f0fcc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817012907} -062e5c32bdf149b8c6ada4da1ec6b43886665cac {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817117110} -12b6c7795aa3c920f853ee7500ee43d6c89f1bc4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817117638} -21bc73457038a3a48b7c20a73dcec96bacb02d0e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817118584} -8a50e913143dc11f267ea7f40bff88fd42f3436e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817119641,"size":39,"metadata":{"url":"http://localhost:1337/-/team/myorg/myteam/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["7f3eb5c51ee388ad"],"referer":["access ls-packages myorg:myteam"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:05:19 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -5f5947e70fa784b0fa4c056fe2f245609620410a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817203593} -c3aaaef268dd05cb44a242e93fa9426ae43d797d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817204123} -c27b07780d9e2e432d87505e3c3bd8bb513c6ef4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817205090} -c111d2def07760afd92549e81acea67d495120a9 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817206164,"size":39,"metadata":{"url":"http://localhost:1337/-/team/myorg/myteam/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["474838aac6d1bd0b"],"referer":["access ls-packages myorg:myteam"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:06:46 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -f8d6ad6fa549df86268f06c8a280bd10adf41e70 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817225622} -df71c48cb270c92c307cdbe779b3cd60b128916c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817226139} -461614482dd16c61f99b43150f37bb8e202dc90b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1534817227088} -7d0386dfa68888bbbdae2ad400e56efb8f7a1af0 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817228135,"size":39,"metadata":{"url":"http://localhost:1337/-/team/myorg/myteam/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["6fc227324e1ede38"],"referer":["access ls-packages myorg:myteam"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:07:08 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -96ef7f7da15ca129da64617dc51000c69fd78ec2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1535072794467} -0b4874cc76417a803f03bae5824a27b36d6544d3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1535072794929} -7b9b31be2ed10c25edb2fc3906c6085e7c8e2017 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":null,"time":1535072795778} -349b8f228a086b1c66ad6c2149af3678e511c594 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/team/myorg/myteam/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1535072796689,"size":39,"metadata":{"url":"http://localhost:1337/-/team/myorg/myteam/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["c5c6c1b06c4edbde"],"referer":["access ls-packages myorg:myteam"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 01:06:36 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/6b/27/515478d59b0ba28fcdaffd08317ec59071d08bdedd169a5f40c3b1fbb486 b/deps/npm/test/npm_cache/_cacache/index-v5/6b/27/515478d59b0ba28fcdaffd08317ec59071d08bdedd169a5f40c3b1fbb486 deleted file mode 100644 index 0201cfad40a31f..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/6b/27/515478d59b0ba28fcdaffd08317ec59071d08bdedd169a5f40c3b1fbb486 +++ /dev/null @@ -1,32 +0,0 @@ - -2752a787fce9cb91dc7a41f3def1884bd3afb663 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535507205371} -7514cc9e98be4a1f0894898a287556384b302a07 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535507357943} -2b6f39b09a65b15bb366b21c6e4a6180f423487c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535507405169} -8c47ff57c604d2e9855b33773c32ee75dbf1e493 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535507642294} -ff70ae8bf84eefd492a7ec3599d40bea2fcfaae7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535507673679} -7e1e591f53d13cb3a53dd260f86734db7d1b240d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535507771586} -8c75fff0cda68c10807810302bc298bed62f5bb4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535507814067} -88166ce5346353eb7761aa36080f6558c215e591 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508087474} -280f74a8c0d94371d94f27feca6e59534203e0e5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508176760} -a0121fe627bdfba6f53afac5fae079030922cd8e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508265565} -02e0c4afe76f44f59cfd5a2a42da05df974818ab {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508338473} -c5fb45d199db7ff905cdf575486d0afc7efa3cdc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508347035} -177c18c7c220372b411621dacac08adab595125f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508500775} -e30a24da09372ccb67645f2439be32402adca7cb {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508673530} -4ffa4231cb2384d844924ca6c30aa8b0e405281e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508753059} -0542ea1e36905ba3200f6a2771f516f51358ed4c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508790441} -fe01dc8257bd29b6e107f04bfef2825d1768e0ad {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535508827863} -12d9f9aa05426d61b7c3d321758614cf6b8eaa08 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535509148175} -9c42e942d55ab4985464ee37c4e8e6f1113d0bbf {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535509275252} -4f163cb5350bf3ca7215260c42ec740e7aaccda1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535509523057} -69ae4622156370c576975ca0bb9cd689fcc40bd7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535509545073} -0f7266e1eceabef79457553f392395eb8c319eb3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535509695059} -9022609cc2150b41b134e1b5991f5ebdb1a06ff8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535509799767} -119c4675fcdd1578fb78c797976f4edda60127e2 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535509808776} -5f8f4ab0c3a0371a9e8531495789f66f00a3a9cd {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535509829576} -f38b282883a751f5cdca8aa686563c4444180868 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535509887465} -edfeeae3422b8caab0e3a770518a11b2faf36cc7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535510004423} -c702fe8ae3384c99ef4fef918ab02c4e6e547374 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535510057875} -3d327cec5367c02125d1998cece67141ce9da4bb {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535510109813} -b7c5a2d8cda63a2c1866c7894027175f933dc629 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535510139625} -19fac401f5e3c445646094984a51d308f179e141 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/v1/login","integrity":null,"time":1535510171261} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/77/52/b7394cb3a27a44448e3ac4d6834e73ca79c301c7108c94b0ba23ca97b71c b/deps/npm/test/npm_cache/_cacache/index-v5/77/52/b7394cb3a27a44448e3ac4d6834e73ca79c301c7108c94b0ba23ca97b71c deleted file mode 100644 index ed39297fcd18e6..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/77/52/b7394cb3a27a44448e3ac4d6834e73ca79c301c7108c94b0ba23ca97b71c +++ /dev/null @@ -1,3 +0,0 @@ - -9f48214c93cf1e49ba544217ad38149726728273 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks","integrity":"sha512-djlLN4USxovyCbQz4Gtx3yekX357418XSg+DvOd5lii3Tb6ZPBixwS6Jmh7XsVlHCzghgNHwpcQJisYJLNoajw==","time":1535147323638,"size":206,"metadata":{"url":"http://localhost:1337/-/npm/v1/hooks?package=%40npm%2Fhooks","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["ef15bf8e904b392b"],"referer":["hook ls [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"date":["Fri, 24 Aug 2018 21:48:43 GMT"],"connection":["keep-alive"],"content-length":["206"],"x-fetch-attempts":["1"]}}} -084c8743a6e9d8618edf8ae34a96a1845acc45de {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks","integrity":"sha512-8+gtagt1rVzr0JF32T9XLb2Lh37p8VBbLoTgOBD6BBLkkEBgvn0qTfQiGxu5KITbiGgmv4zSZjRmei0QOpmUOA==","time":1535147324124,"size":52,"metadata":{"url":"http://localhost:1337/-/npm/v1/hooks?package=%40npm%2Fhooks","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["c30c6eb8ea7504f5"],"referer":["hook ls [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"date":["Fri, 24 Aug 2018 21:48:44 GMT"],"connection":["keep-alive"],"content-length":["52"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/8b/2e/99af1be8f0aa3d6223b000c96edea31a1e6d923f7f3daf1ff06e04899cbb b/deps/npm/test/npm_cache/_cacache/index-v5/8b/2e/99af1be8f0aa3d6223b000c96edea31a1e6d923f7f3daf1ff06e04899cbb deleted file mode 100644 index d0cd975d4234ed..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/8b/2e/99af1be8f0aa3d6223b000c96edea31a1e6d923f7f3daf1ff06e04899cbb +++ /dev/null @@ -1,6 +0,0 @@ - -e31be5d890718a69d783b65849618999bbec580a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534804237267,"size":39,"metadata":{"url":"http://localhost:1337/-/org/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["cc6bd43b1622a04d"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Mon, 20 Aug 2018 22:30:37 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -f0c0c4ffa22f16bae1e2711bd18d2748dee6127f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817120159,"size":39,"metadata":{"url":"http://localhost:1337/-/org/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["84331bd9ed0bb318"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:05:20 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -c40d16398d260fc033d5c064a1e835f99fa7dbd1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817206704,"size":39,"metadata":{"url":"http://localhost:1337/-/org/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["cd9eaf93414af838"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:06:46 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -1b73dfeef73ca01512b55d58acacec6b5aeadd67 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817228654,"size":39,"metadata":{"url":"http://localhost:1337/-/org/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["5774f05e79df21b5"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:07:08 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -3ce28ab086328009a5e42243a6caa1af85a3d2e5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1535072797154,"size":39,"metadata":{"url":"http://localhost:1337/-/org/myorg/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["42475321987443e1"],"referer":["access ls-packages myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 01:06:37 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/8e/53/8602d3aab48229cac8aeeb996d0c850341d8e832b38df45ce8b79f2d7f6a b/deps/npm/test/npm_cache/_cacache/index-v5/8e/53/8602d3aab48229cac8aeeb996d0c850341d8e832b38df45ce8b79f2d7f6a deleted file mode 100644 index a9e39cd051e126..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/8e/53/8602d3aab48229cac8aeeb996d0c850341d8e832b38df45ce8b79f2d7f6a +++ /dev/null @@ -1,9 +0,0 @@ - -7c8e5f18861c79584337ad756419a86d2d0085d7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags/c","integrity":null,"time":1534455913086} -f9401ec7e753ef94dcdfb273166d4a0ccdc10e0c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags/c","integrity":null,"time":1534455914042} -8933789d2f1f7e3ccdded15cff023624d382d169 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags/c","integrity":null,"time":1534455967603} -adefa02b85d04c8c7ce08914774895ff42770220 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags/c","integrity":null,"time":1534455968559} -26b56543994b8541ccfa3569fc0f69683ddd8968 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags/c","integrity":null,"time":1534455978768} -d416b29e9160e2f91b72584a4b6116aaec9e9220 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags/c","integrity":null,"time":1534455979708} -c378d78d12a302756bbde34d8cacbe4502f71d0a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags/c","integrity":null,"time":1534456028452} -9b189fc6bef41b5254ca852f114f81c0f7ff0128 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags/c","integrity":null,"time":1534456029395} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/a2/4a/41538002c219a054a1ecf2e6be6e66dac4d4feb5407eb6ecb26af41a4de8 b/deps/npm/test/npm_cache/_cacache/index-v5/a2/4a/41538002c219a054a1ecf2e6be6e66dac4d4feb5407eb6ecb26af41a4de8 deleted file mode 100644 index 61a543894a566b..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/a2/4a/41538002c219a054a1ecf2e6be6e66dac4d4feb5407eb6ecb26af41a4de8 +++ /dev/null @@ -1,85 +0,0 @@ - -704058a940f337a48e4ef2372e8cf6355258299b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141233242} -f524389a916673e0c9be9667bb2db21a6e3aee59 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141233685} -1127bad8f835decb8ef311bbd6ce4e6342d6ba62 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141234136} -f1d0b1505dbeca0f42da29c3a6f7368a4505251b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141234622} -6d495c4b6c4302e0d6e95aad881c585dc72be2a5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141235150} -f0688c931aa29b1a0542d5067489d2abb1766022 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141235662} -475c308703473d144efa97806270ef7f870a8b52 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141236139} -627240ad6cda1338cdf60172760214539a4ad9bf {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141236598} -f3140265a9cd90a27d46482971e9ed973b87f8be {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141237054} -8ad46d96c3d4ab43dc751eb1e258873851029ab8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141275421} -f99b357c2530c2f8863f75c55b8832a7e138d90d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141275884} -f0eaffd58eb183655f51c7a740ff0b42405f19c1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141276329} -1e9760b310367b29a4b8124be393568a242379dd {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141276769} -53f836b7d4d9f0e818cdf7758f7eb2989f2e70f6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141277217} -a3a51a62e9506ff35a0b49268cd0678565fa9e70 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141277657} -5950d99098c41becf20517882b1812b605149fa6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141278096} -770878f50adf53ee80186f66b114b2879c0ac069 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141278537} -13f5f8cd7c38974ff95380860bc2219fa7c1c912 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141278991} -f5a1465d695c8f1b65920a15b7ee0c370ce1482d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141367097} -fd8432a84daf5778ebccd879587bc08f0bb11a46 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141367549} -606d5293ce4932662f13405ee1f220803386d5fd {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141367995} -52e181b2925f913dc1655077025b56fb65688fcd {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141368436} -0cbe7406a5041eb1307161af7f229ba7679393cf {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141368893} -a5a196bd69ac035dce0b9a75822d40c26deb8221 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141369349} -b47ea46f243569dc05b3d05d638877eab5333d50 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141369808} -a9a70363f90468cbf6042f0bdd9783644de6487b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141370255} -865726c6e24946a59b7d06ed9e99a79e9c7112dc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141370699} -ce86c08633fa6caee47dd19c4409ee13e8ee9f03 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-WLGT1bV9RX3yu+tlniF/t/Zk17xjbQUgT48R/hTVHrgg/j4VLhvLrTGuuVt/FS3jDvsRP4Hx6e3kk/dvhSU1ng==","time":1535141370716,"size":49,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["80f1c10f6284fa08"],"referer":["org rm myorg myuser"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:09:30 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -2cfb97f7db462c22df69cf6811c74ee8c05d5ea3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-/TdlwwFD2pvTZ1jk8ZzOCYSqyfamqQoqHqeauKzshIQbeyr0sg5SBR1YWsEr7xkw01I01lVjGTFdVlY5EldHLQ==","time":1535141371169,"size":38,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["23f3acca4511d318"],"referer":["org ls myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:09:31 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -eee13f78483e5329486bf9689d1bef37292b0028 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141475965} -c2e14ec5c4553b01859591dd65731fe16484365f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141476414} -4f600dc977a5a0f4ed84fc9d39db872ec9c0930d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141476859} -c0c102dc389bb317a8067a24bb12c6618b5491b3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141477309} -edc5df631d7dfb732d1349a79d9e22af21247959 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141477749} -7f1c3c871386caf714e7e9465b7063cd8b56b86c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141478189} -d940cf099019a14de7ebdf35d10910b95de5d5f0 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141478629} -5745688b72be74e1979bd8cb30949c9e9f7dfce6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141479066} -881f368aac365e3084d5b0eefdee5fbf1938b849 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141479502} -cd7f0300fad66008afe2635c37b36b28741cbd83 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-WLGT1bV9RX3yu+tlniF/t/Zk17xjbQUgT48R/hTVHrgg/j4VLhvLrTGuuVt/FS3jDvsRP4Hx6e3kk/dvhSU1ng==","time":1535141479519,"size":49,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["9f846ccb39c55e04"],"referer":["org rm myorg myuser"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:11:19 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -f5f386a7048eed32885c68e5ae6a8d4ed2d6d7c5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-/TdlwwFD2pvTZ1jk8ZzOCYSqyfamqQoqHqeauKzshIQbeyr0sg5SBR1YWsEr7xkw01I01lVjGTFdVlY5EldHLQ==","time":1535141480002,"size":38,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["286b22d53923f479"],"referer":["org ls myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:11:19 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -88aae82b077fb488edd9e80d0d02d000e368e75f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141553015} -fce4b97a7e3b68a4e83a4d200c80ec7f1255da6b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141553471} -8b27e9892cf258c9afe81785833d9a833dc30f47 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141553925} -8441aaa2b8c1a6c61f6ee5251f970e639f6266c7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141554368} -6881245af77b6f6c2252438495533653d5e462b7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141554836} -cb7a58a435867f7ebfac2e115b6173dcdc76a5a4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141555280} -5da3d2d6d509628c803eacfae25d281611ba8144 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141555734} -f2ed424bddfca4205910b7afdf2da7c22028483a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141556195} -c4728f40c0979f8fb0ff9e583709fffd61275f93 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141556651} -9459d4f1c094bea13f5d129796ad823fb78d148a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-WLGT1bV9RX3yu+tlniF/t/Zk17xjbQUgT48R/hTVHrgg/j4VLhvLrTGuuVt/FS3jDvsRP4Hx6e3kk/dvhSU1ng==","time":1535141556670,"size":49,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["fa2097f99ab24963"],"referer":["org rm myorg myuser"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:12:36 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -acfd97a2712324796556cffee2bd2fd492222120 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-/TdlwwFD2pvTZ1jk8ZzOCYSqyfamqQoqHqeauKzshIQbeyr0sg5SBR1YWsEr7xkw01I01lVjGTFdVlY5EldHLQ==","time":1535141557163,"size":38,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["b62bc6a1c6a9c9a6"],"referer":["org ls myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:12:37 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -4c9224a5462df76d9990867b7114796bd26689c5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141603628} -ddb6871fa8f599c0a9a471392a77a24223335590 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141604079} -3eaa9e100acaaae99390df7fd99cf486103d68a7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141604523} -c14ae1b01bc0d3d5d4fe90153a86b79304485d98 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141604979} -9a7982b251f8cd66b1d8a86b5897d4d506f96091 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141605416} -590d55dd16d6b5da24d5546851fc050f5f164426 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141605863} -ed1b1274ebdad4b7918da22c9ec6b9e6d6e20474 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141606300} -8d7cf2dbcb020074d8a8bdc873a443fbd9b4044f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141606742} -117b74cd9b03be43b51077dd15db7d20e76cb3fc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141607189} -8279b68854e48480f4bb2ec084da37cb79f7a1a7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-/TdlwwFD2pvTZ1jk8ZzOCYSqyfamqQoqHqeauKzshIQbeyr0sg5SBR1YWsEr7xkw01I01lVjGTFdVlY5EldHLQ==","time":1535141607208,"size":38,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["06bdf95c859a4695"],"referer":["org rm myorg myuser"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:13:27 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -dddb082b6cf57eb330e79cf385f37615540fdaaa {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-/TdlwwFD2pvTZ1jk8ZzOCYSqyfamqQoqHqeauKzshIQbeyr0sg5SBR1YWsEr7xkw01I01lVjGTFdVlY5EldHLQ==","time":1535141607685,"size":38,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["355c736d4b22ca7c"],"referer":["org ls myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:13:27 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -80aceb257beb3be7b9c00dba59ebbbec8f064bf3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141626019} -ec40c551f3d639426de4fe449a8c66a107bbe971 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141626471} -a28147d46234497715934d34124205e76e2af8d0 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141626913} -86a4353fba1ede7cac52384a2aa1fab03e50ede7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141627362} -507fb1fec646bfa633a2dd78c0f1f102d0b38a6c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141627818} -0b1e2aeaf4366b9d7f4346d70086019aa75a4e0c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141628258} -8b1b1b76fda6461a78b8f9838eae58985646cd75 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141628700} -2b9ebfa1d4903e6eb00bb103b95cde8621bcb404 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141629142} -46c9bbfa8311fd47b578f3d4995df05caf8a6d1d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141629585} -8f7e8c275d720fc5096c9b5969d9144b5adbcaf4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-b8c91FCMLZ8X7rHP0ognaUihaJ699qjT9PdRbUxovmOQY+flQ373/3JUeqvoa0mmsb9cczvezjh32CvIvBqafQ==","time":1535141629604,"size":21,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["14fa3a89c8a64071"],"referer":["org rm myorg myuser"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:13:49 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -bfb61214bfa0f462ef6c3d988d6be13f48cf6eec {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-/TdlwwFD2pvTZ1jk8ZzOCYSqyfamqQoqHqeauKzshIQbeyr0sg5SBR1YWsEr7xkw01I01lVjGTFdVlY5EldHLQ==","time":1535141630088,"size":38,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["764c11b6ff00fc7c"],"referer":["org ls myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:13:50 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -2f56b8c55b73fc2b9bacde7d341c547fc51856eb {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141653501} -70e2eeda1420058511e92517a9f11322db20ce5f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141653949} -25b071b4e59fccb07fd368c440fe788e6a458621 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141654390} -e90bca38ac9bacffa97aa666f518ffa75baa20c9 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141654852} -25b67b56e522d4b3688363e4a2af98348996d91e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141655333} -a5a1ab67bdd89bae69f5475129abcf7df2ebf318 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141655792} -bd5e5cb70ef3a93143fa7a634c74c53fe6895a59 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141656263} -148334c96d03f48cca98ff256d3702f0534f4fa5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141656748} -0f78b3017f5daaa09f92bb8ebd54c134bcbf7bda {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":null,"time":1535141657266} -66ed751bdd089f3f54ad98026bdf328bd9631476 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-b8c91FCMLZ8X7rHP0ognaUihaJ699qjT9PdRbUxovmOQY+flQ373/3JUeqvoa0mmsb9cczvezjh32CvIvBqafQ==","time":1535141657285,"size":21,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["614ac51292caec61"],"referer":["org rm myorg myuser"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:14:17 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -d88cfe29c4359b5c879641ccb5a907ebc8b8deb6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/user","integrity":"sha512-/TdlwwFD2pvTZ1jk8ZzOCYSqyfamqQoqHqeauKzshIQbeyr0sg5SBR1YWsEr7xkw01I01lVjGTFdVlY5EldHLQ==","time":1535141657761,"size":38,"metadata":{"url":"http://localhost:1337/-/org/myorg/user","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.1-next.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["159cd43b7bd9e9a1"],"referer":["org ls myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 20:14:17 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/a6/c9/dbe7acc04b7cea7b99c68f3821cf6d7f49caba301e383b31143bd9670f28 b/deps/npm/test/npm_cache/_cacache/index-v5/a6/c9/dbe7acc04b7cea7b99c68f3821cf6d7f49caba301e383b31143bd9670f28 deleted file mode 100644 index 32118be235de01..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/a6/c9/dbe7acc04b7cea7b99c68f3821cf6d7f49caba301e383b31143bd9670f28 +++ /dev/null @@ -1,5 +0,0 @@ - -e9d14c7c491e09696126ab01104ed43831bacec3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535147322715} -230fda652b09ad11fe5b74df33e69f7b2e86128a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535147323164} -8254998825b03d5ed8d5a00fd61bbb6e274d5e78 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535147324575} -57d7cfaa6e0bd5ad5ae6e41a6c0a2c70ba8c08fe {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535147325050} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/a8/88/3a6a0c55cde913db472fd92adee9edf0f507c4ea02b2703d926b06947341 b/deps/npm/test/npm_cache/_cacache/index-v5/a8/88/3a6a0c55cde913db472fd92adee9edf0f507c4ea02b2703d926b06947341 deleted file mode 100644 index 46db488bdddda0..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/a8/88/3a6a0c55cde913db472fd92adee9edf0f507c4ea02b2703d926b06947341 +++ /dev/null @@ -1,6 +0,0 @@ - -2bdda3735d5f11dc133417737ecfa1109c38e8fe {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534804239085,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["0f644b94963b0ef1"],"referer":["access ls-collaborators"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Mon, 20 Aug 2018 22:30:39 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -75d4799032ba2455db63cdf0b8be6218e2873b2b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534817121888,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["73e996cf1329d819"],"referer":["access ls-collaborators"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:05:21 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -ce5008c1c14e5ac933ff541690ade3c315026a70 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534817208390,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["7a5bc7b3cc31594a"],"referer":["access ls-collaborators"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:06:48 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -becd2f804f5e5a121a31658bf28f6bf92bca7bd8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1534817230306,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["be40b828a7a17075"],"referer":["access ls-collaborators"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:07:10 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -cef65178a70e3d52814f7974b61eef70c6733d7e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators","integrity":"sha512-MshpkrpGcUCKKSuz8vrkzRBBbc7baiFMFpBUr2vMeStupW9yRTMzV8xZ5PhGYDgGBLX/M4JYrUaXMhjYZHmbXg==","time":1535072798593,"size":51,"metadata":{"url":"http://localhost:1337/-/package/%40scoped%2Fpkg/collaborators?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["7588c6084602036e"],"referer":["access ls-collaborators"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 01:06:38 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/b3/36/c25c35e75c8973f821f5a05ce4803a44826a0112390460da66c8c3c5de69 b/deps/npm/test/npm_cache/_cacache/index-v5/b3/36/c25c35e75c8973f821f5a05ce4803a44826a0112390460da66c8c3c5de69 deleted file mode 100644 index dfa4d040ab2149..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/b3/36/c25c35e75c8973f821f5a05ce4803a44826a0112390460da66c8c3c5de69 +++ /dev/null @@ -1,6 +0,0 @@ - -171c2dcf12343fd0e62c5932bed6400cc6fb33a3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","integrity":"sha512-9b2mt4/PIEsewOYGkEW0T2Zp6aq4eL/IkblG5M7LhD9Oh+Qotnca57Sizo8wPpd0Z2OwZC+viamwBCUpfceNag==","time":1534455912102,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["3f1e2f735bde2e7f"],"referer":["dist-tag ls"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:45:12 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -9a67fdb27ba273f51d7af04dbeba2aec26b0979c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","integrity":"sha512-9b2mt4/PIEsewOYGkEW0T2Zp6aq4eL/IkblG5M7LhD9Oh+Qotnca57Sizo8wPpd0Z2OwZC+viamwBCUpfceNag==","time":1534455953750,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["0ecc8257c9175851"],"referer":["dist-tag ls"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:45:53 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -cf9c8e72304d669c92f90d059d964042de249c6a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","integrity":"sha512-9b2mt4/PIEsewOYGkEW0T2Zp6aq4eL/IkblG5M7LhD9Oh+Qotnca57Sizo8wPpd0Z2OwZC+viamwBCUpfceNag==","time":1534455966655,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["14735819f8270bf9"],"referer":["dist-tag ls"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:06 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -d35411793080b95c25a044d453e387fe0edb3847 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","integrity":"sha512-9b2mt4/PIEsewOYGkEW0T2Zp6aq4eL/IkblG5M7LhD9Oh+Qotnca57Sizo8wPpd0Z2OwZC+viamwBCUpfceNag==","time":1534455977832,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["7420186bfe813a9f"],"referer":["dist-tag ls"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:17 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -b1cb4591af05691d7c841411b6ba618dd2130aa6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","integrity":"sha512-9b2mt4/PIEsewOYGkEW0T2Zp6aq4eL/IkblG5M7LhD9Oh+Qotnca57Sizo8wPpd0Z2OwZC+viamwBCUpfceNag==","time":1534456027522,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fpkg/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["087fb131e6cae400"],"referer":["dist-tag ls"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:47:07 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/b4/2c/2aec38b0351146be02fc91be78e935c68f4608824732a06091fcf7cb550a b/deps/npm/test/npm_cache/_cacache/index-v5/b4/2c/2aec38b0351146be02fc91be78e935c68f4608824732a06091fcf7cb550a deleted file mode 100644 index 16d6382de5e42d..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/b4/2c/2aec38b0351146be02fc91be78e935c68f4608824732a06091fcf7cb550a +++ /dev/null @@ -1,15 +0,0 @@ - -afd15fc7d338549c4970a92d154c60e3d4676556 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534804115889,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["76c5245adb0b4e8b"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Mon, 20 Aug 2018 22:28:35 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -b0260dc9aa348153b40f1ae39a37aff1c42d175e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534816454184,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["44eeb0e033902aca"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 01:54:14 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -dccf5f951b49839ec80d0018f82155190c6fa08e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534816496867,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["c7a8a5b9e076ff6e"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 01:54:56 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -82419a9ce7b916e3f117d8db73442055a64cecb7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534816587521,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["714499a296642269"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 01:56:27 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -9f354dc138dd39c61863af4291bedbab6ef45f83 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534816640458,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["d2c418f2b5ce1088"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 01:57:20 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -2e1db52b76d19a63c979e1e66186898a57246785 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534816706594,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["fe24e8d98e2331f1"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 01:58:26 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -efc8f0b505a1cfda4e9cbe4f52b002f45bc17804 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534816815574,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["58cdd3249934f138"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:00:15 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -05141c51fa8068e9ac8857668c807f33a8a1ad5b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534816844769,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["491bf29d71a9cccb"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:00:44 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -758f0c5b32cdd18c1eb219e1efef17dee73b5d5a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534816975728,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["afd09695bdfe50c5"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:02:55 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -7bf8f76b0b8550afcea1c346542b06c45119a5ac {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817013434,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["fb7d689c084713d1"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:03:33 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -b7ae7d8dde8a6c6c67a72ecf8fe5585a069a5354 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817119119,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["696737b195bd9d7e"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:05:19 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -7ae415a34589a8916ac82f5f03440c477d1bc37b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817205628,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["6f2c67093c2a6526"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:06:45 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -cc54e00f0cbe0f7f695fe913c7272c1338c4c110 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1534817227618,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["3321a7b65381f5cb"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Tue, 21 Aug 2018 02:07:07 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -272e9650c69f789492686cb9ec3e21582f5ef215 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/username/package","integrity":"sha512-3Cqk30LNQ1Yj9MLD4nT6CBzJQv9F3PqYzfSpMktqIcNyHDS7l+aAnuKAUfwQ9XdJz/YKqXCh44x6bDVKlANVTg==","time":1535072796234,"size":39,"metadata":{"url":"http://localhost:1337/-/org/username/package?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["c3e097683ca34f49"],"referer":["access ls-packages"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 24 Aug 2018 01:06:36 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/b4/a9/95ce79090bb3e6ab5e8a85aaef872bf4eca492fac6cab144fb2e45ffbd74 b/deps/npm/test/npm_cache/_cacache/index-v5/b4/a9/95ce79090bb3e6ab5e8a85aaef872bf4eca492fac6cab144fb2e45ffbd74 deleted file mode 100644 index f7e01a91dd72f3..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/b4/a9/95ce79090bb3e6ab5e8a85aaef872bf4eca492fac6cab144fb2e45ffbd74 +++ /dev/null @@ -1,5 +0,0 @@ - -8a6f2a1f3ac4937cfbd0bfe55a837ef6eb823569 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u/-rev/3-deadcafebabebeef","integrity":null,"time":1535510004454} -8fbf9582fc257448487e89016712690b759f949a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u/-rev/3-deadcafebabebeef","integrity":null,"time":1535510057907} -11609625428eafb4b93413b12f7d7ad4efd03e9f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u/-rev/3-deadcafebabebeef","integrity":null,"time":1535510139656} -746ac0dc47292de35393a28dcb69a02a38cd73a3 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/user/org.couchdb.user:u/-rev/3-deadcafebabebeef","integrity":null,"time":1535510171290} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/c4/19/9e1d306c0d5c85a6c1d7b20c8fa7c94d05e55ec2098f3514bdc40c0ce20b b/deps/npm/test/npm_cache/_cacache/index-v5/c4/19/9e1d306c0d5c85a6c1d7b20c8fa7c94d05e55ec2098f3514bdc40c0ce20b deleted file mode 100644 index f9abe5893482b3..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/c4/19/9e1d306c0d5c85a6c1d7b20c8fa7c94d05e55ec2098f3514bdc40c0ce20b +++ /dev/null @@ -1,14 +0,0 @@ - -414685fa9d946cf20e303a3d0f0c4662f1726a7f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466263280} -2d2c6ca80f0f2875a14ce16cb85a484f96bc3ae8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466263754} -636d143466174952b7dc458a2abe2ba61b63c6ba {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":"sha512-1tFOuchGwb6TOwkPOR4UVwwStAeNC+tBXmftbm+O2lSh3C3H5S74dfm4OQuabo6Fzqm9umz1KpwULJvq/Ja/zg==","time":1534466265602,"size":43,"metadata":{"url":"http://localhost:1337/-/org/myorg/team?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["f1b593dcf8a62d39"],"referer":["team ls myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 17 Aug 2018 00:37:45 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -893bb5e7cabc6fa20de66a0e2bfd819cf329ce8b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466335340} -2667043600b10dc21af3595cef44a7c67b7ac1bb {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466335792} -51885c825117a990c9da1dd7324dc61c49752557 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466388009} -1a6c74a43568a745f4c7dcd2f5f65d43c30c448e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466388456} -54a1dd8dd068bf124846eb0ff69c4bd736241227 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":"sha512-1tFOuchGwb6TOwkPOR4UVwwStAeNC+tBXmftbm+O2lSh3C3H5S74dfm4OQuabo6Fzqm9umz1KpwULJvq/Ja/zg==","time":1534466390314,"size":43,"metadata":{"url":"http://localhost:1337/-/org/myorg/team?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["3401027e24c21e22"],"referer":["team ls myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 17 Aug 2018 00:39:50 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -75458be528b07bcca3bfd345a7b57666617a7505 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466459538} -c44596bb309d3f4b31df41950fe022a4b4feeb7f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466459994} -ba5d52adff7072bc977d2242936fbd565ccd74d4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466472518} -09a218437d0be71a588adde7b4fa21b5610284fa {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":null,"time":1534466472978} -ed07a5d23de5b9c75e7ea82e83f4fb6069ab3573 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/org/myorg/team","integrity":"sha512-1tFOuchGwb6TOwkPOR4UVwwStAeNC+tBXmftbm+O2lSh3C3H5S74dfm4OQuabo6Fzqm9umz1KpwULJvq/Ja/zg==","time":1534466474791,"size":43,"metadata":{"url":"http://localhost:1337/-/org/myorg/team?format=cli","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["8f8d7e94406c4ebb"],"referer":["team ls myorg"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Fri, 17 Aug 2018 00:41:14 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_cacache/index-v5/f6/6a/1afded1007145f766ff1dbaa948bd898062da50bed98d5b04f317278fa48 b/deps/npm/test/npm_cache/_cacache/index-v5/f6/6a/1afded1007145f766ff1dbaa948bd898062da50bed98d5b04f317278fa48 deleted file mode 100644 index 11657d59655fe4..00000000000000 --- a/deps/npm/test/npm_cache/_cacache/index-v5/f6/6a/1afded1007145f766ff1dbaa948bd898062da50bed98d5b04f317278fa48 +++ /dev/null @@ -1,22 +0,0 @@ - -9ce1a0659c1f3640940df1f719b5e97ab051401d {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-5wbenY5s4WFSvlN8vM3yYyGz1ng5TOQvtWqk5po3q6nVTfKEcA0Gb35tAF5GGrQdIg/W8mj/iJ5AWAkQinuGdg==","time":1534455912583,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["9380283a56ec4a0a"],"referer":["dist-tag ls [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:45:12 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -4872244a176a232ce754a5ae0528f8b203f8a765 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-5wbenY5s4WFSvlN8vM3yYyGz1ng5TOQvtWqk5po3q6nVTfKEcA0Gb35tAF5GGrQdIg/W8mj/iJ5AWAkQinuGdg==","time":1534455913082,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["c14a9f8ee0108d8e"],"referer":["dist-tag add [REDACTED] c"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:45:13 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -686bd0a9422757c2cc65a233f816f47159c1e2fc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-oaEHLK5hbB9keREOPj7lT6FpeMCB2AMpmdYtIH5c1sdkPkY9c9P/SyGK1xdyTJGAE+A5VPlykZLL36HQvtb9OQ==","time":1534455913558,"size":30,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["d8eaf818a27e39aa"],"referer":["dist-tag set [REDACTED] b"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:45:13 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -f22b2f22e3b032fd660c1a0cf563512201faccaf {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-NTlyH3BfYhz/4w28govjh+JTxQ7QX7Co4/QYdpmWvd4d0cuK8uR9/pQXqresPSONHwNu8umtuJjDhvDNqbaGHg==","time":1534455914038,"size":54,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["9cb449c557a6d230"],"referer":["dist-tag rm [REDACTED] c"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:45:14 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -e2129f83eecc558477d2ce914a1b570131c527f5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-oPha6LSEvHH7E+9ja5ruRfVIq2NXSINp/7AvI5+Uc8a5TFwqXvOxuW4WzmFY3AXxPviLzvMt47xBWkjNxVADVQ==","time":1534455914500,"size":18,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["0614fe3ab85ebdbc"],"referer":["dist-tag rm [REDACTED] nonexistent"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:45:14 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -e924727a9d28385ed91e2ae98712fd77f1da3d95 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-5wbenY5s4WFSvlN8vM3yYyGz1ng5TOQvtWqk5po3q6nVTfKEcA0Gb35tAF5GGrQdIg/W8mj/iJ5AWAkQinuGdg==","time":1534455954224,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["d12316ff41bc5fe3"],"referer":["dist-tag ls [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:45:54 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -e38d793cb8f6dacae3d46c3d7abfc6092f9df6bd {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-5wbenY5s4WFSvlN8vM3yYyGz1ng5TOQvtWqk5po3q6nVTfKEcA0Gb35tAF5GGrQdIg/W8mj/iJ5AWAkQinuGdg==","time":1534455967136,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["1e8ec47bb0f54db9"],"referer":["dist-tag ls [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:07 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -7c71baac2798d984a6cdcbf2db1dd767ba312e49 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-5wbenY5s4WFSvlN8vM3yYyGz1ng5TOQvtWqk5po3q6nVTfKEcA0Gb35tAF5GGrQdIg/W8mj/iJ5AWAkQinuGdg==","time":1534455967598,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["ee6d1bff50304d42"],"referer":["dist-tag add [REDACTED] c"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:07 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -165c57be2d7be44b4398156b3512bd7e5be237cc {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-oaEHLK5hbB9keREOPj7lT6FpeMCB2AMpmdYtIH5c1sdkPkY9c9P/SyGK1xdyTJGAE+A5VPlykZLL36HQvtb9OQ==","time":1534455968081,"size":30,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["ef6fc9fec4a25986"],"referer":["dist-tag set [REDACTED] b"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:08 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -eacbd0648e99fd8f045cf243e38413b82af553d5 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-NTlyH3BfYhz/4w28govjh+JTxQ7QX7Co4/QYdpmWvd4d0cuK8uR9/pQXqresPSONHwNu8umtuJjDhvDNqbaGHg==","time":1534455968555,"size":54,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["aae1c3d9031fee05"],"referer":["dist-tag rm [REDACTED] c"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:08 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -36fb92a66197fcf4b6cac118969521affa5c0f0c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-oPha6LSEvHH7E+9ja5ruRfVIq2NXSINp/7AvI5+Uc8a5TFwqXvOxuW4WzmFY3AXxPviLzvMt47xBWkjNxVADVQ==","time":1534455969054,"size":18,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["e8fa6a4c209d818a"],"referer":["dist-tag rm [REDACTED] nonexistent"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:09 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -582f0689b092b4f5be77ed70503febae92be0fa4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-5wbenY5s4WFSvlN8vM3yYyGz1ng5TOQvtWqk5po3q6nVTfKEcA0Gb35tAF5GGrQdIg/W8mj/iJ5AWAkQinuGdg==","time":1534455978315,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["8416e546318f9db9"],"referer":["dist-tag ls [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:18 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -74e9c82333f4ca8c5f53bbf7a012347489df1c5b {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-5wbenY5s4WFSvlN8vM3yYyGz1ng5TOQvtWqk5po3q6nVTfKEcA0Gb35tAF5GGrQdIg/W8mj/iJ5AWAkQinuGdg==","time":1534455978763,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["4a626df7200f8507"],"referer":["dist-tag add [REDACTED] c"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:18 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -9502912d3b7b2ec91288961766a8450f086fee15 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-oaEHLK5hbB9keREOPj7lT6FpeMCB2AMpmdYtIH5c1sdkPkY9c9P/SyGK1xdyTJGAE+A5VPlykZLL36HQvtb9OQ==","time":1534455979228,"size":30,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["0a27d7643bc10413"],"referer":["dist-tag set [REDACTED] b"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:19 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -666a94eba9cbd916e3f5c7fde78d55520ffce044 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-NTlyH3BfYhz/4w28govjh+JTxQ7QX7Co4/QYdpmWvd4d0cuK8uR9/pQXqresPSONHwNu8umtuJjDhvDNqbaGHg==","time":1534455979704,"size":54,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["3a0efb44aa1546d1"],"referer":["dist-tag rm [REDACTED] c"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:19 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -e03e5a8b523231b86c69ac04f777ab88ca6450b6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-oPha6LSEvHH7E+9ja5ruRfVIq2NXSINp/7AvI5+Uc8a5TFwqXvOxuW4WzmFY3AXxPviLzvMt47xBWkjNxVADVQ==","time":1534455980208,"size":18,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["3d49965fbef727c2"],"referer":["dist-tag rm [REDACTED] nonexistent"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:46:20 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -7f2a574bda7f5682634f48947b2bd1946cdc04eb {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-5wbenY5s4WFSvlN8vM3yYyGz1ng5TOQvtWqk5po3q6nVTfKEcA0Gb35tAF5GGrQdIg/W8mj/iJ5AWAkQinuGdg==","time":1534456027990,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["d8efb8ff77693a6a"],"referer":["dist-tag ls [REDACTED]"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:47:07 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -4fa9ae8352b1dfd7fe072659ab6277a48a9f8f57 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-5wbenY5s4WFSvlN8vM3yYyGz1ng5TOQvtWqk5po3q6nVTfKEcA0Gb35tAF5GGrQdIg/W8mj/iJ5AWAkQinuGdg==","time":1534456028447,"size":42,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["3b47079cf7076a99"],"referer":["dist-tag add [REDACTED] c"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:47:08 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -0434a27acecb27f901ef132210a3e173983e5fc6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-oaEHLK5hbB9keREOPj7lT6FpeMCB2AMpmdYtIH5c1sdkPkY9c9P/SyGK1xdyTJGAE+A5VPlykZLL36HQvtb9OQ==","time":1534456028924,"size":30,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["1b567a606aad45e7"],"referer":["dist-tag set [REDACTED] b"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:47:08 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -1ccb55b9a76f0ff7395ea6a2db62cd97786325e0 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-NTlyH3BfYhz/4w28govjh+JTxQ7QX7Co4/QYdpmWvd4d0cuK8uR9/pQXqresPSONHwNu8umtuJjDhvDNqbaGHg==","time":1534456029390,"size":54,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["9fcf7750acdce87e"],"referer":["dist-tag rm [REDACTED] c"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:47:09 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} -558c0cda40417567e334e059bb514f61010efa85 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/package/@scoped%2fanother/dist-tags","integrity":"sha512-oPha6LSEvHH7E+9ja5ruRfVIq2NXSINp/7AvI5+Uc8a5TFwqXvOxuW4WzmFY3AXxPviLzvMt47xBWkjNxVADVQ==","time":1534456029859,"size":18,"metadata":{"url":"http://localhost:1337/-/package/@scoped%2fanother/dist-tags","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":["@scoped"],"npm-session":["ac4f6fb0f309eed7"],"referer":["dist-tag rm [REDACTED] nonexistent"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"connection":["close"],"date":["Thu, 16 Aug 2018 21:47:09 GMT"],"transfer-encoding":["chunked"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/_logs/2018-08-29T02_01_27_486Z-debug.log b/deps/npm/test/npm_cache/_logs/2018-08-29T02_01_27_486Z-debug.log deleted file mode 100644 index f97bb4bf1d4767..00000000000000 --- a/deps/npm/test/npm_cache/_logs/2018-08-29T02_01_27_486Z-debug.log +++ /dev/null @@ -1,35 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ '/usr/local/bin/node', -1 verbose cli '/Users/zkat/Documents/code/work/npm/bin/npm-cli.js', -1 verbose cli 'login', -1 verbose cli '--registry', -1 verbose cli 'http://localhost:1337', -1 verbose cli '--loglevel', -1 verbose cli 'silly', -1 verbose cli '--userconfig', -1 verbose cli '/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc' ] -2 info using npm@6.4.1-next.0 -3 info using node@v10.6.0 -4 verbose npm-session 122d5e560febc2d7 -5 verbose npm-session 155fa50ebb4f5f2f -6 verbose web login before first POST -7 verbose web login not supported, trying couch -8 verbose adduser before first PUT { _id: 'org.couchdb.user:u', -8 verbose adduser name: 'u', -8 verbose adduser password: 'XXXXX', -8 verbose adduser email: 'u@p.me', -8 verbose adduser type: 'user', -8 verbose adduser roles: [], -8 verbose adduser date: '2018-08-29T02:01:27.479Z' } -9 verbose stack Error: 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -9 verbose stack at res.buffer.catch.then.body (/Users/zkat/Documents/code/work/npm-profile/lib/node_modules/npm-registry-fetch/check-response.js:100:15) -9 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7) -10 verbose statusCode 409 -11 verbose cwd /Users/zkat/Documents/code/work/npm/test/tap -12 verbose Darwin 17.7.0 -13 verbose argv "/usr/local/bin/node" "/Users/zkat/Documents/code/work/npm/bin/npm-cli.js" "login" "--registry" "http://localhost:1337" "--loglevel" "silly" "--userconfig" "/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc" -14 verbose node v10.6.0 -15 verbose npm v6.4.1-next.0 -16 error code E409 -17 error 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -18 verbose exit [ 1, true ] diff --git a/deps/npm/test/npm_cache/_logs/2018-08-29T02_04_29_028Z-debug.log b/deps/npm/test/npm_cache/_logs/2018-08-29T02_04_29_028Z-debug.log deleted file mode 100644 index c32b3c4b92a0ce..00000000000000 --- a/deps/npm/test/npm_cache/_logs/2018-08-29T02_04_29_028Z-debug.log +++ /dev/null @@ -1,37 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ '/usr/local/bin/node', -1 verbose cli '/Users/zkat/Documents/code/work/npm/bin/npm-cli.js', -1 verbose cli 'login', -1 verbose cli '--registry', -1 verbose cli 'http://localhost:1337', -1 verbose cli '--loglevel', -1 verbose cli 'silly', -1 verbose cli '--userconfig', -1 verbose cli '/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc' ] -2 info using npm@6.4.1-next.0 -3 info using node@v10.6.0 -4 verbose npm-session d18e007c510c7566 -5 verbose npm-session d8011b245df43605 -6 verbose web login before first POST -7 verbose web login not supported, trying couch -8 verbose stack Error: canceled -8 verbose stack at Interface. (/Users/zkat/Documents/code/work/npm/node_modules/read/lib/read.js:66:13) -8 verbose stack at Interface.emit (events.js:182:13) -8 verbose stack at Interface._ttyWrite (readline.js:783:16) -8 verbose stack at ReadStream.onkeypress (readline.js:168:10) -8 verbose stack at ReadStream.emit (events.js:182:13) -8 verbose stack at emitKeys (internal/readline.js:422:14) -8 verbose stack at emitKeys.next () -8 verbose stack at ReadStream.onData (readline.js:1022:36) -8 verbose stack at ReadStream.emit (events.js:182:13) -8 verbose stack at addChunk (_stream_readable.js:283:12) -8 verbose stack at readableAddChunk (_stream_readable.js:264:11) -8 verbose stack at ReadStream.Readable.push (_stream_readable.js:219:10) -8 verbose stack at TTY.onread (net.js:638:20) -9 verbose cwd /Users/zkat/Documents/code/work/npm/test/tap -10 verbose Darwin 17.7.0 -11 verbose argv "/usr/local/bin/node" "/Users/zkat/Documents/code/work/npm/bin/npm-cli.js" "login" "--registry" "http://localhost:1337" "--loglevel" "silly" "--userconfig" "/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc" -12 verbose node v10.6.0 -13 verbose npm v6.4.1-next.0 -14 error canceled -15 verbose exit [ 1, true ] diff --git a/deps/npm/test/npm_cache/_logs/2018-08-29T02_07_14_747Z-debug.log b/deps/npm/test/npm_cache/_logs/2018-08-29T02_07_14_747Z-debug.log deleted file mode 100644 index 5170658653ca48..00000000000000 --- a/deps/npm/test/npm_cache/_logs/2018-08-29T02_07_14_747Z-debug.log +++ /dev/null @@ -1,26 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ '/usr/local/bin/node', -1 verbose cli '/Users/zkat/Documents/code/work/npm/bin/npm-cli.js', -1 verbose cli 'login', -1 verbose cli '--registry', -1 verbose cli 'http://localhost:1337', -1 verbose cli '--loglevel', -1 verbose cli 'silly', -1 verbose cli '--userconfig', -1 verbose cli '/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc' ] -2 info using npm@6.4.1-next.0 -3 info using node@v10.6.0 -4 verbose npm-session 2cffb3761e3222e0 -5 verbose npm-session c1d55b2301cc6681 -6 verbose web login before first POST -7 verbose web login not supported, trying couch -8 verbose stack TypeError: Cannot read property 'username' of undefined -8 verbose stack at profile.login.catch (/Users/zkat/Documents/code/work/npm/lib/auth/legacy.js:45:28) -8 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7) -9 verbose cwd /Users/zkat/Documents/code/work/npm/test/tap -10 verbose Darwin 17.7.0 -11 verbose argv "/usr/local/bin/node" "/Users/zkat/Documents/code/work/npm/bin/npm-cli.js" "login" "--registry" "http://localhost:1337" "--loglevel" "silly" "--userconfig" "/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc" -12 verbose node v10.6.0 -13 verbose npm v6.4.1-next.0 -14 error Cannot read property 'username' of undefined -15 verbose exit [ 1, true ] diff --git a/deps/npm/test/npm_cache/_logs/2018-08-29T02_07_40_521Z-debug.log b/deps/npm/test/npm_cache/_logs/2018-08-29T02_07_40_521Z-debug.log deleted file mode 100644 index 5a95721853e4d6..00000000000000 --- a/deps/npm/test/npm_cache/_logs/2018-08-29T02_07_40_521Z-debug.log +++ /dev/null @@ -1,26 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ '/usr/local/bin/node', -1 verbose cli '/Users/zkat/Documents/code/work/npm/bin/npm-cli.js', -1 verbose cli 'login', -1 verbose cli '--registry', -1 verbose cli 'http://localhost:1337', -1 verbose cli '--loglevel', -1 verbose cli 'silly', -1 verbose cli '--userconfig', -1 verbose cli '/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc' ] -2 info using npm@6.4.1-next.0 -3 info using node@v10.6.0 -4 verbose npm-session 64c32c3a1e1faec3 -5 verbose npm-session 68e436d0258e51f7 -6 verbose web login before first POST -7 verbose web login not supported, trying couch -8 verbose stack TypeError: Cannot read property 'username' of undefined -8 verbose stack at profile.login.catch (/Users/zkat/Documents/code/work/npm/lib/auth/legacy.js:45:28) -8 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7) -9 verbose cwd /Users/zkat/Documents/code/work/npm/test/tap -10 verbose Darwin 17.7.0 -11 verbose argv "/usr/local/bin/node" "/Users/zkat/Documents/code/work/npm/bin/npm-cli.js" "login" "--registry" "http://localhost:1337" "--loglevel" "silly" "--userconfig" "/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc" -12 verbose node v10.6.0 -13 verbose npm v6.4.1-next.0 -14 error Cannot read property 'username' of undefined -15 verbose exit [ 1, true ] diff --git a/deps/npm/test/npm_cache/_logs/2018-08-29T02_11_13_542Z-debug.log b/deps/npm/test/npm_cache/_logs/2018-08-29T02_11_13_542Z-debug.log deleted file mode 100644 index fc8d1ff1178993..00000000000000 --- a/deps/npm/test/npm_cache/_logs/2018-08-29T02_11_13_542Z-debug.log +++ /dev/null @@ -1,35 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ '/usr/local/bin/node', -1 verbose cli '/Users/zkat/Documents/code/work/npm/bin/npm-cli.js', -1 verbose cli 'login', -1 verbose cli '--registry', -1 verbose cli 'http://localhost:1337', -1 verbose cli '--loglevel', -1 verbose cli 'silly', -1 verbose cli '--userconfig', -1 verbose cli '/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc' ] -2 info using npm@6.4.1-next.0 -3 info using node@v10.6.0 -4 verbose npm-session 43f079e80cc0e6ed -5 verbose npm-session 9ff9a0251f5ddb97 -6 verbose web login before first POST -7 verbose web login not supported, trying couch -8 verbose adduser before first PUT { _id: 'org.couchdb.user:u', -8 verbose adduser name: 'u', -8 verbose adduser password: 'XXXXX', -8 verbose adduser email: 'u@p.me', -8 verbose adduser type: 'user', -8 verbose adduser roles: [], -8 verbose adduser date: '2018-08-29T02:11:13.535Z' } -9 verbose stack Error: 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -9 verbose stack at res.buffer.catch.then.body (/Users/zkat/Documents/code/work/npm-profile/lib/node_modules/npm-registry-fetch/check-response.js:100:15) -9 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7) -10 verbose statusCode 409 -11 verbose cwd /Users/zkat/Documents/code/work/npm/test/tap -12 verbose Darwin 17.7.0 -13 verbose argv "/usr/local/bin/node" "/Users/zkat/Documents/code/work/npm/bin/npm-cli.js" "login" "--registry" "http://localhost:1337" "--loglevel" "silly" "--userconfig" "/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc" -14 verbose node v10.6.0 -15 verbose npm v6.4.1-next.0 -16 error code E409 -17 error 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -18 verbose exit [ 1, true ] diff --git a/deps/npm/test/npm_cache/_logs/2018-08-29T02_12_33_072Z-debug.log b/deps/npm/test/npm_cache/_logs/2018-08-29T02_12_33_072Z-debug.log deleted file mode 100644 index 4e8ebe78f3fc5d..00000000000000 --- a/deps/npm/test/npm_cache/_logs/2018-08-29T02_12_33_072Z-debug.log +++ /dev/null @@ -1,35 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ '/usr/local/bin/node', -1 verbose cli '/Users/zkat/Documents/code/work/npm/bin/npm-cli.js', -1 verbose cli 'login', -1 verbose cli '--registry', -1 verbose cli 'http://localhost:1337', -1 verbose cli '--loglevel', -1 verbose cli 'silly', -1 verbose cli '--userconfig', -1 verbose cli '/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc' ] -2 info using npm@6.4.1-next.0 -3 info using node@v10.6.0 -4 verbose npm-session 73e2fd36723b0ff1 -5 verbose npm-session 4e6bee0b497098d3 -6 verbose web login before first POST -7 verbose web login not supported, trying couch -8 verbose adduser before first PUT { _id: 'org.couchdb.user:u', -8 verbose adduser name: 'u', -8 verbose adduser password: 'XXXXX', -8 verbose adduser email: 'u@p.me', -8 verbose adduser type: 'user', -8 verbose adduser roles: [], -8 verbose adduser date: '2018-08-29T02:12:33.065Z' } -9 verbose stack Error: 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -9 verbose stack at res.buffer.catch.then.body (/Users/zkat/Documents/code/work/npm-profile/lib/node_modules/npm-registry-fetch/check-response.js:100:15) -9 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7) -10 verbose statusCode 409 -11 verbose cwd /Users/zkat/Documents/code/work/npm/test/tap -12 verbose Darwin 17.7.0 -13 verbose argv "/usr/local/bin/node" "/Users/zkat/Documents/code/work/npm/bin/npm-cli.js" "login" "--registry" "http://localhost:1337" "--loglevel" "silly" "--userconfig" "/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc" -14 verbose node v10.6.0 -15 verbose npm v6.4.1-next.0 -16 error code E409 -17 error 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -18 verbose exit [ 1, true ] diff --git a/deps/npm/test/npm_cache/_logs/2018-08-29T02_13_10_458Z-debug.log b/deps/npm/test/npm_cache/_logs/2018-08-29T02_13_10_458Z-debug.log deleted file mode 100644 index 319e804ee242a5..00000000000000 --- a/deps/npm/test/npm_cache/_logs/2018-08-29T02_13_10_458Z-debug.log +++ /dev/null @@ -1,35 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ '/usr/local/bin/node', -1 verbose cli '/Users/zkat/Documents/code/work/npm/bin/npm-cli.js', -1 verbose cli 'login', -1 verbose cli '--registry', -1 verbose cli 'http://localhost:1337', -1 verbose cli '--loglevel', -1 verbose cli 'silly', -1 verbose cli '--userconfig', -1 verbose cli '/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc' ] -2 info using npm@6.4.1-next.0 -3 info using node@v10.6.0 -4 verbose npm-session 02443e8d92bce4df -5 verbose npm-session 084ee9774eb198e2 -6 verbose web login before first POST -7 verbose web login not supported, trying couch -8 verbose adduser before first PUT { _id: 'org.couchdb.user:u', -8 verbose adduser name: 'u', -8 verbose adduser password: 'XXXXX', -8 verbose adduser email: 'u@p.me', -8 verbose adduser type: 'user', -8 verbose adduser roles: [], -8 verbose adduser date: '2018-08-29T02:13:10.448Z' } -9 verbose stack Error: 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -9 verbose stack at res.buffer.catch.then.body (/Users/zkat/Documents/code/work/npm-profile/lib/node_modules/npm-registry-fetch/check-response.js:100:15) -9 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7) -10 verbose statusCode 409 -11 verbose cwd /Users/zkat/Documents/code/work/npm/test/tap -12 verbose Darwin 17.7.0 -13 verbose argv "/usr/local/bin/node" "/Users/zkat/Documents/code/work/npm/bin/npm-cli.js" "login" "--registry" "http://localhost:1337" "--loglevel" "silly" "--userconfig" "/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc" -14 verbose node v10.6.0 -15 verbose npm v6.4.1-next.0 -16 error code E409 -17 error 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -18 verbose exit [ 1, true ] diff --git a/deps/npm/test/npm_cache/_logs/2018-08-29T02_25_23_076Z-debug.log b/deps/npm/test/npm_cache/_logs/2018-08-29T02_25_23_076Z-debug.log deleted file mode 100644 index 26feac9d4872f0..00000000000000 --- a/deps/npm/test/npm_cache/_logs/2018-08-29T02_25_23_076Z-debug.log +++ /dev/null @@ -1,43 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ '/usr/local/bin/node', -1 verbose cli '/Users/zkat/Documents/code/work/npm/bin/npm-cli.js', -1 verbose cli 'login', -1 verbose cli '--registry', -1 verbose cli 'http://localhost:1337', -1 verbose cli '--loglevel', -1 verbose cli 'silly', -1 verbose cli '--userconfig', -1 verbose cli '/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc' ] -2 info using npm@6.4.1-next.0 -3 info using node@v10.6.0 -4 verbose npm-session 1582acc84bf67ce1 -5 verbose npm-session dcceca325d165252 -6 verbose web login before first POST -7 http fetch POST 404 http://localhost:1337/-/v1/login 84ms -8 verbose web login not supported, trying couch -9 verbose login before first PUT { _id: 'org.couchdb.user:u', -9 verbose login name: 'u', -9 verbose login password: 'XXXXX', -9 verbose login type: 'user', -9 verbose login roles: [], -9 verbose login date: '2018-08-29T02:25:23.065Z' } -10 verbose adduser before first PUT { _id: 'org.couchdb.user:u', -10 verbose adduser name: 'u', -10 verbose adduser password: 'XXXXX', -10 verbose adduser email: 'u@p.me', -10 verbose adduser type: 'user', -10 verbose adduser roles: [], -10 verbose adduser date: '2018-08-29T02:25:23.066Z' } -11 http fetch PUT 409 http://localhost:1337/-/user/org.couchdb.user:u 5ms -12 verbose stack Error: 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -12 verbose stack at res.buffer.catch.then.body (/Users/zkat/Documents/code/work/npm-profile/lib/node_modules/npm-registry-fetch/check-response.js:100:15) -12 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7) -13 verbose statusCode 409 -14 verbose cwd /Users/zkat/Documents/code/work/npm/test/tap -15 verbose Darwin 17.7.0 -16 verbose argv "/usr/local/bin/node" "/Users/zkat/Documents/code/work/npm/bin/npm-cli.js" "login" "--registry" "http://localhost:1337" "--loglevel" "silly" "--userconfig" "/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc" -17 verbose node v10.6.0 -18 verbose npm v6.4.1-next.0 -19 error code E409 -20 error 409 Conflict - PUT http://localhost:1337/-/user/org.couchdb.user:u - user exists -21 verbose exit [ 1, true ] diff --git a/deps/npm/test/npm_cache/_logs/2018-08-29T02_33_24_459Z-debug.log b/deps/npm/test/npm_cache/_logs/2018-08-29T02_33_24_459Z-debug.log deleted file mode 100644 index 0b944348c295fe..00000000000000 --- a/deps/npm/test/npm_cache/_logs/2018-08-29T02_33_24_459Z-debug.log +++ /dev/null @@ -1,51 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ '/usr/local/bin/node', -1 verbose cli '/Users/zkat/Documents/code/work/npm/bin/npm-cli.js', -1 verbose cli 'login', -1 verbose cli '--registry', -1 verbose cli 'http://localhost:1337', -1 verbose cli '--loglevel', -1 verbose cli 'silly', -1 verbose cli '--userconfig', -1 verbose cli '/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc' ] -2 info using npm@6.4.1-next.0 -3 info using node@v10.6.0 -4 verbose npm-session 2fcacc2e02e3388c -5 verbose npm-session 1bde4de81e56c43e -6 verbose web login before first POST -7 http fetch POST 404 http://localhost:1337/-/v1/login 86ms -8 verbose web login not supported, trying couch -9 verbose login before first PUT { _id: 'org.couchdb.user:u', -9 verbose login name: 'u', -9 verbose login password: 'XXXXX', -9 verbose login type: 'user', -9 verbose login roles: [], -9 verbose login date: '2018-08-29T02:33:24.431Z' } -10 http fetch PUT 409 http://localhost:1337/-/user/org.couchdb.user:u 4ms -11 http fetch GET 200 http://localhost:1337/-/user/org.couchdb.user:u?write=true 15ms -12 http fetch PUT 201 http://localhost:1337/-/user/org.couchdb.user:u/-rev/3-deadcafebabebeef 4ms -13 verbose stack Error: invalid config key requested: always-auth -13 verbose stack at BadKeyError (/Users/zkat/Documents/code/work/npm/node_modules/figgy-pudding/index.js:93:23) -13 verbose stack at pudGet (/Users/zkat/Documents/code/work/npm/node_modules/figgy-pudding/index.js:101:5) -13 verbose stack at FiggyPudding.get (/Users/zkat/Documents/code/work/npm/node_modules/figgy-pudding/index.js:27:12) -13 verbose stack at Object.get (/Users/zkat/Documents/code/work/npm/node_modules/figgy-pudding/index.js:159:16) -13 verbose stack at profile.login.catch.catch.then (/Users/zkat/Documents/code/work/npm/lib/auth/legacy.js:69:35) -13 verbose stack at tryCatcher (/Users/zkat/Documents/code/work/npm/node_modules/bluebird/js/release/util.js:16:23) -13 verbose stack at Promise._settlePromiseFromHandler (/Users/zkat/Documents/code/work/npm/node_modules/bluebird/js/release/promise.js:512:31) -13 verbose stack at Promise._settlePromise (/Users/zkat/Documents/code/work/npm/node_modules/bluebird/js/release/promise.js:569:18) -13 verbose stack at Promise._settlePromise0 (/Users/zkat/Documents/code/work/npm/node_modules/bluebird/js/release/promise.js:614:10) -13 verbose stack at Promise._settlePromises (/Users/zkat/Documents/code/work/npm/node_modules/bluebird/js/release/promise.js:693:18) -13 verbose stack at Async._drainQueue (/Users/zkat/Documents/code/work/npm/node_modules/bluebird/js/release/async.js:133:16) -13 verbose stack at Async._drainQueues (/Users/zkat/Documents/code/work/npm/node_modules/bluebird/js/release/async.js:143:10) -13 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (/Users/zkat/Documents/code/work/npm/node_modules/bluebird/js/release/async.js:17:14) -13 verbose stack at runCallback (timers.js:696:18) -13 verbose stack at tryOnImmediate (timers.js:667:5) -13 verbose stack at processImmediate (timers.js:649:5) -14 verbose cwd /Users/zkat/Documents/code/work/npm/test/tap -15 verbose Darwin 17.7.0 -16 verbose argv "/usr/local/bin/node" "/Users/zkat/Documents/code/work/npm/bin/npm-cli.js" "login" "--registry" "http://localhost:1337" "--loglevel" "silly" "--userconfig" "/Users/zkat/Documents/code/work/npm/test/tap/adduser-legacy-auth/_npmrc" -17 verbose node v10.6.0 -18 verbose npm v6.4.1-next.0 -19 error code EBADKEY -20 error invalid config key requested: always-auth -21 verbose exit [ 1, true ] diff --git a/deps/npm/test/npm_cache/content-v2/sha512/76/39/4b378512c68bf209b433e06b71df27a45f7e7be35f174a0f83bce7799628b74dbe993c18b1c12e899a1ed7b159470b382180d1f0a5c4098ac6092cda1a8f b/deps/npm/test/npm_cache/content-v2/sha512/76/39/4b378512c68bf209b433e06b71df27a45f7e7be35f174a0f83bce7799628b74dbe993c18b1c12e899a1ed7b159470b382180d1f0a5c4098ac6092cda1a8f deleted file mode 100644 index 3ae97a65db0815..00000000000000 --- a/deps/npm/test/npm_cache/content-v2/sha512/76/39/4b378512c68bf209b433e06b71df27a45f7e7be35f174a0f83bce7799628b74dbe993c18b1c12e899a1ed7b159470b382180d1f0a5c4098ac6092cda1a8f +++ /dev/null @@ -1 +0,0 @@ -{"objects":[{"id":"foo","type":"package","name":"@foo/pkg","endpoint":"foo.com"},{"id":"bar","type":"owner","name":"bar","endpoint":"bar.com"},{"id":"baz","type":"scope","name":"baz","endpoint":"baz.com"}]} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/content-v2/sha512/f3/e8/2d6a0b75ad5cebd09177d93f572dbd8b877ee9f1505b2e84e03810fa0412e4904060be7d2a4df4221b1bb92884db886826bf8cd26634667a2d103a999438 b/deps/npm/test/npm_cache/content-v2/sha512/f3/e8/2d6a0b75ad5cebd09177d93f572dbd8b877ee9f1505b2e84e03810fa0412e4904060be7d2a4df4221b1bb92884db886826bf8cd26634667a2d103a999438 deleted file mode 100644 index 9b3718b2d05897..00000000000000 --- a/deps/npm/test/npm_cache/content-v2/sha512/f3/e8/2d6a0b75ad5cebd09177d93f572dbd8b877ee9f1505b2e84e03810fa0412e4904060be7d2a4df4221b1bb92884db886826bf8cd26634667a2d103a999438 +++ /dev/null @@ -1 +0,0 @@ -{"objects":[{"id":"foo"},{"id":"bar"},{"id":"baz"}]} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/index-v5/19/db/491ce5fd3b8f5521f62a3d208c8b91325f3f8fe347347649e2e7cb8c10b2 b/deps/npm/test/npm_cache/index-v5/19/db/491ce5fd3b8f5521f62a3d208c8b91325f3f8fe347347649e2e7cb8c10b2 deleted file mode 100644 index 5fde2c58c1e77d..00000000000000 --- a/deps/npm/test/npm_cache/index-v5/19/db/491ce5fd3b8f5521f62a3d208c8b91325f3f8fe347347649e2e7cb8c10b2 +++ /dev/null @@ -1,7 +0,0 @@ - -e8cf360c47fec8b2f63470b80d7987142633babf {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook","integrity":null,"time":1535072854036} -3ea85dae59151fce5100c16994785f1786b11b0e {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook","integrity":null,"time":1535072854364} -6e4f60fab00d641816c35f8e4b20f4612b5d7111 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook","integrity":null,"time":1535073076890} -bc5ab93f0a6b45bb73f252104b3dce389658ab27 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook","integrity":null,"time":1535073077188} -82db930d295f3d5711cf8324cd82e9dc9c1d1c1f {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook","integrity":null,"time":1535073127697} -5052b0a2f1440f9a40569ca6dddb9c6a7bff802a {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook","integrity":null,"time":1535073127993} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/index-v5/77/52/b7394cb3a27a44448e3ac4d6834e73ca79c301c7108c94b0ba23ca97b71c b/deps/npm/test/npm_cache/index-v5/77/52/b7394cb3a27a44448e3ac4d6834e73ca79c301c7108c94b0ba23ca97b71c deleted file mode 100644 index 3f2085d7cc78c7..00000000000000 --- a/deps/npm/test/npm_cache/index-v5/77/52/b7394cb3a27a44448e3ac4d6834e73ca79c301c7108c94b0ba23ca97b71c +++ /dev/null @@ -1,3 +0,0 @@ - -5cdb945dbe568a81cbb15c34876ea00e23fc01e0 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks","integrity":"sha512-djlLN4USxovyCbQz4Gtx3yekX357418XSg+DvOd5lii3Tb6ZPBixwS6Jmh7XsVlHCzghgNHwpcQJisYJLNoajw==","time":1535073128879,"size":206,"metadata":{"url":"http://localhost:1337/-/npm/v1/hooks?package=%40npm%2Fhooks","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["c7df1f9b27913bc7"],"referer":["undefined"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"date":["Fri, 24 Aug 2018 01:12:08 GMT"],"connection":["keep-alive"],"content-length":["206"],"x-fetch-attempts":["1"]}}} -595e5e175f5a4c4b1f93451a0bde770f486e6438 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks","integrity":"sha512-8+gtagt1rVzr0JF32T9XLb2Lh37p8VBbLoTgOBD6BBLkkEBgvn0qTfQiGxu5KITbiGgmv4zSZjRmei0QOpmUOA==","time":1535073129209,"size":52,"metadata":{"url":"http://localhost:1337/-/npm/v1/hooks?package=%40npm%2Fhooks","reqHeaders":{"connection":["keep-alive"],"user-agent":["npm/6.4.0 node/v10.6.0 darwin x64"],"npm-in-ci":["false"],"npm-scope":[""],"npm-session":["1c47b510c2e9e413"],"referer":["undefined"],"authorization":["Basic dXNlcm5hbWU6cGFzc3dvcmQ="]},"resHeaders":{"date":["Fri, 24 Aug 2018 01:12:09 GMT"],"connection":["keep-alive"],"content-length":["52"],"x-fetch-attempts":["1"]}}} \ No newline at end of file diff --git a/deps/npm/test/npm_cache/index-v5/a6/c9/dbe7acc04b7cea7b99c68f3821cf6d7f49caba301e383b31143bd9670f28 b/deps/npm/test/npm_cache/index-v5/a6/c9/dbe7acc04b7cea7b99c68f3821cf6d7f49caba301e383b31143bd9670f28 deleted file mode 100644 index 713b235c3410c3..00000000000000 --- a/deps/npm/test/npm_cache/index-v5/a6/c9/dbe7acc04b7cea7b99c68f3821cf6d7f49caba301e383b31143bd9670f28 +++ /dev/null @@ -1,13 +0,0 @@ - -17b49e6e6b74866a9b392e1a358eb43d3eee3e81 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535072854669} -f9ad4dfd4bfa6553801c04ac1f3acb5dfe7e49a7 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535072854968} -332e124b27b9bbcd35b4eb7aa0d3685f31ef1cc6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535072856307} -764d22fddb116e0b8c0e848b134aaac7a4dda5a6 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535072856600} -efcde15cafcc3ec12c0bd71f40d29d4cafc0b0b8 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535073077484} -1263dc619f5b5f575b6f9bf13881ce66fb65bb9c {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535073077775} -9aef161ba41a96d30d3c6873d80897ad85b93ea9 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535073078715} -f38b63f0520ae8e7df760bfb0ca3f5486f3505a1 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535073079008} -0a52c605eda7f7a58a7b27f1b6afae82ce797202 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535073128285} -8b5529d2007b11c10380e562a5f4363996247784 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535073128575} -5d661dddb447f45c4f3171d6855596cd5007ad68 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535073129511} -9242c47b660da20c2508f51801a1559dfda08fc4 {"key":"make-fetch-happen:request-cache:http://localhost:1337/-/npm/v1/hooks/hook/dead%40beef","integrity":null,"time":1535073129801} \ No newline at end of file diff --git a/deps/npm/test/tap/ci.js b/deps/npm/test/tap/ci.js index a523f87623aa38..9d69e3e5eb5240 100644 --- a/deps/npm/test/tap/ci.js +++ b/deps/npm/test/tap/ci.js @@ -83,9 +83,9 @@ test('basic installation', (t) => { const stdout = ret[1] const stderr = ret[2] t.equal(code, 0, 'command completed without error') - t.equal(stdout.trim(), '', 'no output on stdout') + t.equal(stderr.trim(), '', 'no output on stderr') t.match( - stderr.trim(), + stdout.trim(), /^added 6 packages in \d+(?:\.\d+)?s$/, 'no warnings on stderr, and final output has right number of packages' ) @@ -150,9 +150,9 @@ test('supports npm-shrinkwrap.json as well', (t) => { const stdout = ret[1] const stderr = ret[2] t.equal(code, 0, 'command completed without error') - t.equal(stdout.trim(), '', 'no output on stdout') + t.equal(stderr.trim(), '', 'no output on stderr') t.match( - stderr.trim(), + stdout.trim(), /^added 6 packages in \d+(?:\.\d+)?s$/, 'no warnings on stderr, and final output has right number of packages' ) @@ -197,10 +197,8 @@ test('removes existing node_modules/ before installing', (t) => { ], EXEC_OPTS)) .then((ret) => { const code = ret[0] - const stdout = ret[1] const stderr = ret[2] t.equal(code, 0, 'command completed without error') - t.equal(stdout.trim(), '', 'no output on stdout') t.match( stderr.trim(), /^npm.*WARN.*removing existing node_modules/, diff --git a/deps/npm/test/tap/config-basic.js b/deps/npm/test/tap/config-basic.js index 139b8e92f8a5be..0483695cf5f25c 100644 --- a/deps/npm/test/tap/config-basic.js +++ b/deps/npm/test/tap/config-basic.js @@ -74,7 +74,7 @@ test('no builtin', function (t) { npmconf.load(cli, function (er, conf) { if (er) throw er expectNames.forEach(function (name, ii) { - isDeeplyDetails(t, conf.list[ii], expectList[ii], 'config properities list: ' + name) + isDeeplyDetails(t, conf.list[ii], expectList[ii], 'config properties list: ' + name) }) isDeeplyDetails(t, conf.sources, expectSources, 'config by source') t.same(npmconf.rootConf.list, [], 'root configuration is empty') diff --git a/deps/npm/test/tap/ls-depth-cli.js b/deps/npm/test/tap/ls-depth-cli.js index 2b1bfa42a8cb3a..7fd4a467d612f1 100644 --- a/deps/npm/test/tap/ls-depth-cli.js +++ b/deps/npm/test/tap/ls-depth-cli.js @@ -82,7 +82,7 @@ test('npm ls --depth=1', function (t) { test('npm ls --depth=Infinity', function (t) { // travis has a preconfigured depth=0, in general we can not depend - // on the default value in all environments, so explictly set it here + // on the default value in all environments, so explicitly set it here common.npm( ['ls', '--depth=Infinity'], EXEC_OPTS, @@ -128,7 +128,7 @@ test('npm ls --depth=0 --json', function (t) { test('npm ls --depth=Infinity --json', function (t) { // travis has a preconfigured depth=0, in general we can not depend - // on the default value in all environments, so explictly set it here + // on the default value in all environments, so explicitly set it here common.npm( ['ls', '--depth=Infinity', '--json'], EXEC_OPTS, diff --git a/deps/npm/test/tap/ls-depth-unmet.js b/deps/npm/test/tap/ls-depth-unmet.js index 0386ab249deceb..4fd6740d6a58cd 100644 --- a/deps/npm/test/tap/ls-depth-unmet.js +++ b/deps/npm/test/tap/ls-depth-unmet.js @@ -124,7 +124,7 @@ test('npm ls --depth=1', function (t) { test('npm ls --depth=Infinity', function (t) { // travis has a preconfigured depth=0, in general we can not depend - // on the default value in all environments, so explictly set it here + // on the default value in all environments, so explicitly set it here common.npm( ['ls', '--depth=Infinity'], EXEC_OPTS, diff --git a/deps/npm/test/tap/outdated-long.js b/deps/npm/test/tap/outdated-long.js index 6ea5e6e2c420c2..976d416a13bb51 100644 --- a/deps/npm/test/tap/outdated-long.js +++ b/deps/npm/test/tap/outdated-long.js @@ -74,6 +74,10 @@ test('it should not throw', function (t) { npm.install('.', function (err) { t.ifError(err, 'install success') npm.config.set('long', true) + // since it's possible for the homepage of a package to change, after the + // install we read the value from the package.json directly to specify our + // expected output. + expOut[1] = expOut[1] + ':' + JSON.parse(fs.readFileSync(path.resolve(pkg, 'node_modules', 'underscore', 'package.json'))).homepage npm.outdated(function (er, d) { t.ifError(err, 'npm outdated ran without error') t.is(process.exitCode, 1, 'exit code set to 1') diff --git a/deps/npm/test/tap/unit-deps-earliestInstallable.js b/deps/npm/test/tap/unit-deps-earliestInstallable.js index 8c5ca06ad8bba8..47d1ab4119b1e9 100644 --- a/deps/npm/test/tap/unit-deps-earliestInstallable.js +++ b/deps/npm/test/tap/unit-deps-earliestInstallable.js @@ -39,7 +39,7 @@ test('earliestInstallable should consider devDependencies', function (t) { realpath: '/dep2' } - // an incompatible verson of dep2. required by dep1 + // an incompatible version of dep2. required by dep1 var dep2a = { package: { name: 'dep2', From 968e901aff38a343b1de4addebf79fd8fa991c59 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Fri, 21 Dec 2018 18:13:09 -0500 Subject: [PATCH 59/59] 2018-12-26, Version 11.6.0 (Current) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notable Changes: * cli: - add --max-http-header-size flag (cjihrig) https://github.com/nodejs/node/pull/24811 * crypto: - always accept certificates as public keys (Tobias Nießen) https://github.com/nodejs/node/pull/24234 - add key object API (Tobias Nießen) [#24234](https://github.com/nodejs/node/pull/24234) - update root certificates (Sam Roberts) https://github.com/nodejs/node/pull/25113 * deps: - upgrade to libuv 1.24.1 (cjihrig) https://github.com/nodejs/node/pull/25078 - upgrade npm to 6.5.0 (Audrey Eschright) https://github.com/nodejs/node/pull/24734 * http: - add maxHeaderSize property (cjihrig) https://github.com/nodejs/node/pull/24860 PR-URL: https://github.com/nodejs/node/pull/25175 --- CHANGELOG.md | 3 +- doc/api/cli.md | 2 +- doc/api/crypto.md | 36 +++++++-------- doc/api/http.md | 2 +- doc/changelogs/CHANGELOG_V11.md | 79 +++++++++++++++++++++++++++++++++ src/node_version.h | 6 +-- 6 files changed, 104 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29a5158bd74fc6..b6ef7cade0e72e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,8 @@ release. -11.5.0
+11.6.0
+11.5.0
11.4.0
11.3.0
11.2.0
diff --git a/doc/api/cli.md b/doc/api/cli.md index cd171d9e3467b3..7e0ef03a5830ef 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -199,7 +199,7 @@ Specify the `file` of the custom [experimental ECMAScript Module][] loader. ### `--max-http-header-size=size` Specify the maximum size, in bytes, of HTTP headers. Defaults to 8KB. diff --git a/doc/api/crypto.md b/doc/api/crypto.md index fc1e2ae70cad2a..2ba721d062296f 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1103,7 +1103,7 @@ This can be called many times with new data as it is streamed. ## Class: KeyObject Node.js uses an internal `KeyObject` class which should not be accessed @@ -1118,7 +1118,7 @@ passing keys as strings or `Buffer`s due to improved security features. ### keyObject.asymmetricKeyType * {string} @@ -1127,7 +1127,7 @@ For asymmetric keys, this property represents the type of the embedded key ### keyObject.export([options]) * `options`: {Object} * Returns: {string | Buffer} @@ -1159,7 +1159,7 @@ be a buffer containing the data encoded as DER. ### keyObject.symmetricSize * {number} @@ -1168,7 +1168,7 @@ property is `undefined` for asymmetric keys. ### keyObject.type * {string} @@ -1244,7 +1244,7 @@ console.log(sign.sign(privateKey, 'hex')); @@ -1802,7 +1802,7 @@ input.on('readable', () => { ### crypto.createPrivateKey(key) * `key` {Object | string | Buffer} - `key`: {string | Buffer} The key material, either in PEM or DER format. @@ -1818,7 +1818,7 @@ must be an object with the properties described above. ### crypto.createPublicKey(key) * `key` {Object | string | Buffer} - `key`: {string | Buffer} @@ -1835,7 +1835,7 @@ If the format is `'pem'`, the `'key'` may also be an X.509 certificate. ### crypto.createSecretKey(key) * `key` {Buffer} * Returns: {KeyObject} @@ -1873,7 +1873,7 @@ signing algorithms. Optional `options` argument controls the @@ -2221,7 +2221,7 @@ object, the `padding` property can be passed. Otherwise, this function uses @@ -2246,7 +2246,7 @@ object, the `padding` property can be passed. Otherwise, this function uses @@ -2273,7 +2273,7 @@ be passed instead of a public key. diff --git a/doc/api/http.md b/doc/api/http.md index 4e56f4ad00a391..e0c99035802d88 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1914,7 +1914,7 @@ requests. ## http.maxHeaderSize * {number} diff --git a/doc/changelogs/CHANGELOG_V11.md b/doc/changelogs/CHANGELOG_V11.md index bbb8610acd43c6..76b4b12ec756d2 100644 --- a/doc/changelogs/CHANGELOG_V11.md +++ b/doc/changelogs/CHANGELOG_V11.md @@ -9,6 +9,7 @@ +11.6.0
11.5.0
11.4.0
11.3.0
@@ -32,6 +33,84 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + +## 2018-12-26, Version 11.6.0 (Current), @MylesBorins + +### Notable Changes + +* **cli**: + - add --max-http-header-size flag (cjihrig) [#24811](https://github.com/nodejs/node/pull/24811) +* **crypto**: + - always accept certificates as public keys (Tobias Nießen) [#24234](https://github.com/nodejs/node/pull/24234) + - add key object API (Tobias Nießen) [#24234](https://github.com/nodejs/node/pull/24234) + - update root certificates (Sam Roberts) [#25113](https://github.com/nodejs/node/pull/25113) +* **deps**: + - upgrade to libuv 1.24.1 (cjihrig) [#25078](https://github.com/nodejs/node/pull/25078) + - upgrade npm to 6.5.0 (Audrey Eschright) [#24734](https://github.com/nodejs/node/pull/24734) +* **http**: + - add maxHeaderSize property (cjihrig) [#24860](https://github.com/nodejs/node/pull/24860) + +### Commits + +* [[`a9ab28df2c`](https://github.com/nodejs/node/commit/a9ab28df2c)] - **assert**: inspect getters (Ruben Bridgewater) [#25004](https://github.com/nodejs/node/pull/25004) +* [[`c6bfa66b2e`](https://github.com/nodejs/node/commit/c6bfa66b2e)] - **buffer**: simplify code (Ruben Bridgewater) [#25151](https://github.com/nodejs/node/pull/25151) +* [[`9b38bbff7f`](https://github.com/nodejs/node/commit/9b38bbff7f)] - **build**: correct fi indentation in Makefile (Daniel Bevenius) [#25107](https://github.com/nodejs/node/pull/25107) +* [[`4513516f5e`](https://github.com/nodejs/node/commit/4513516f5e)] - **build**: add a space to clarify skipping crypto msg (Daniel Bevenius) [#25011](https://github.com/nodejs/node/pull/25011) +* [[`7b2eefc103`](https://github.com/nodejs/node/commit/7b2eefc103)] - **child_process**: spawn ignores options in case args is undefined (Eduard Bondarenko) [#24913](https://github.com/nodejs/node/pull/24913) +* [[`edd8bd0ee0`](https://github.com/nodejs/node/commit/edd8bd0ee0)] - **(SEMVER-MINOR)** **cli**: add --max-http-header-size flag (cjihrig) [#24811](https://github.com/nodejs/node/pull/24811) +* [[`e6c1e8de95`](https://github.com/nodejs/node/commit/e6c1e8de95)] - **(SEMVER-MINOR)** **crypto**: always accept certificates as public keys (Tobias Nießen) [#24234](https://github.com/nodejs/node/pull/24234) +* [[`3b53df0748`](https://github.com/nodejs/node/commit/3b53df0748)] - **(SEMVER-MINOR)** **crypto**: add key object API (Tobias Nießen) [#24234](https://github.com/nodejs/node/pull/24234) +* [[`6f6f339ef0`](https://github.com/nodejs/node/commit/6f6f339ef0)] - **crypto**: update root certificates (Sam Roberts) [#25113](https://github.com/nodejs/node/pull/25113) +* [[`e855018968`](https://github.com/nodejs/node/commit/e855018968)] - **(SEMVER-MINOR)** **deps**: upgrade npm to 6.5.0 (Audrey Eschright) [#24734](https://github.com/nodejs/node/pull/24734) +* [[`155d1d54bf`](https://github.com/nodejs/node/commit/155d1d54bf)] - **deps**: upgrade to libuv 1.24.1 (cjihrig) [#25078](https://github.com/nodejs/node/pull/25078) +* [[`0057af293a`](https://github.com/nodejs/node/commit/0057af293a)] - **(SEMVER-MINOR)** **deps**: cherry-pick http\_parser\_set\_max\_header\_size (cjihrig) [#24811](https://github.com/nodejs/node/pull/24811) +* [[`b78d48749a`](https://github.com/nodejs/node/commit/b78d48749a)] - **doc**: fix links in test/common/README.md (Vse Mozhet Byt) [#25172](https://github.com/nodejs/node/pull/25172) +* [[`6a690ee51b`](https://github.com/nodejs/node/commit/6a690ee51b)] - **doc**: revise "Breaking Changes and Deprecations" (Rich Trott) [#25116](https://github.com/nodejs/node/pull/25116) +* [[`4ca09517c2`](https://github.com/nodejs/node/commit/4ca09517c2)] - **doc**: describe root cert update process (Sam Roberts) [#25113](https://github.com/nodejs/node/pull/25113) +* [[`4561e2c984`](https://github.com/nodejs/node/commit/4561e2c984)] - **doc**: revise "Breaking Changes" section of Collaborator Guide (Rich Trott) [#25071](https://github.com/nodejs/node/pull/25071) +* [[`2516e9cfd0`](https://github.com/nodejs/node/commit/2516e9cfd0)] - **doc,lib,test**: capitalize comment sentences (Ruben Bridgewater) [#24996](https://github.com/nodejs/node/pull/24996) +* [[`d1a98a8d0a`](https://github.com/nodejs/node/commit/d1a98a8d0a)] - **events**: simplify stack compare function (Ruben Bridgewater) [#24744](https://github.com/nodejs/node/pull/24744) +* [[`ae50f480d2`](https://github.com/nodejs/node/commit/ae50f480d2)] - **(SEMVER-MINOR)** **http**: add maxHeaderSize property (cjihrig) [#24860](https://github.com/nodejs/node/pull/24860) +* [[`b3f45daf7b`](https://github.com/nodejs/node/commit/b3f45daf7b)] - **lib**: make internal API warning more direct (Rich Trott) [#25125](https://github.com/nodejs/node/pull/25125) +* [[`2fc43fbe43`](https://github.com/nodejs/node/commit/2fc43fbe43)] - **lib**: switch to object spread where possible (Ruben Bridgewater) [#25104](https://github.com/nodejs/node/pull/25104) +* [[`96bdd47734`](https://github.com/nodejs/node/commit/96bdd47734)] - **lib**: refactor argument validation using validateString (ZYSzys) [#24960](https://github.com/nodejs/node/pull/24960) +* [[`0cde1a4fdc`](https://github.com/nodejs/node/commit/0cde1a4fdc)] - **lib**: remove unused NativeModule/NativeModule wraps (Joyee Cheung) [#24904](https://github.com/nodejs/node/pull/24904) +* [[`add566eee5`](https://github.com/nodejs/node/commit/add566eee5)] - **os**: use uv\_os\_gethostname() in hostname() (cjihrig) [#25111](https://github.com/nodejs/node/pull/25111) +* [[`85a136974e`](https://github.com/nodejs/node/commit/85a136974e)] - **perf_hooks**: make GC tracking state per-Environment (Anna Henningsen) [#25053](https://github.com/nodejs/node/pull/25053) +* [[`3f82144c98`](https://github.com/nodejs/node/commit/3f82144c98)] - **process**: move environment variable proxy code into node\_env\_var.cc (Joyee Cheung) [#25067](https://github.com/nodejs/node/pull/25067) +* [[`c9f809e36f`](https://github.com/nodejs/node/commit/c9f809e36f)] - **src**: add DCHECK macros (kiyomizumia) [#24359](https://github.com/nodejs/node/pull/24359) +* [[`b801b0372a`](https://github.com/nodejs/node/commit/b801b0372a)] - **src**: use std::vector for setting up process.execPath (Anna Henningsen) [#25069](https://github.com/nodejs/node/pull/25069) +* [[`54e42f04a7`](https://github.com/nodejs/node/commit/54e42f04a7)] - **src**: port GetLoadedLibraries for freebsd (Gireesh Punathil) [#25106](https://github.com/nodejs/node/pull/25106) +* [[`fd0361bff0`](https://github.com/nodejs/node/commit/fd0361bff0)] - **src**: mark options parsers as const (Anna Henningsen) [#25065](https://github.com/nodejs/node/pull/25065) +* [[`c6388edf34`](https://github.com/nodejs/node/commit/c6388edf34)] - **src**: handle empty Maybe in uv binding initialize (Anna Henningsen) [#25079](https://github.com/nodejs/node/pull/25079) +* [[`6f3b421dd5`](https://github.com/nodejs/node/commit/6f3b421dd5)] - **src**: schedule destroy hooks in BeforeExit early during bootstrap (Joyee Cheung) [#25020](https://github.com/nodejs/node/pull/25020) +* [[`a4505c698f`](https://github.com/nodejs/node/commit/a4505c698f)] - **src**: extract common Bind method (Jon Moss) [#22315](https://github.com/nodejs/node/pull/22315) +* [[`09a99c6834`](https://github.com/nodejs/node/commit/09a99c6834)] - **src**: mark some global state as const (Anna Henningsen) [#25052](https://github.com/nodejs/node/pull/25052) +* [[`7f34c768da`](https://github.com/nodejs/node/commit/7f34c768da)] - **src**: remove internalBinding('config').warningFile (Joyee Cheung) [#24959](https://github.com/nodejs/node/pull/24959) +* [[`c80ac7fae3`](https://github.com/nodejs/node/commit/c80ac7fae3)] - **(SEMVER-MINOR)** **src**: add kUInteger parsing (Matteo Collina) [#24811](https://github.com/nodejs/node/pull/24811) +* [[`45d48510bd`](https://github.com/nodejs/node/commit/45d48510bd)] - **test**: fix test-tls-session-timeout (Rich Trott) [#25188](https://github.com/nodejs/node/pull/25188) +* [[`6557ea180c`](https://github.com/nodejs/node/commit/6557ea180c)] - **test**: mark test-trace-events-api-worker-disabled flaky (Rich Trott) [#25197](https://github.com/nodejs/node/pull/25197) +* [[`db54531c8d`](https://github.com/nodejs/node/commit/db54531c8d)] - **test**: remove Files: comment processing from Python test runner (Rich Trott) [#25183](https://github.com/nodejs/node/pull/25183) +* [[`a28cae0e55`](https://github.com/nodejs/node/commit/a28cae0e55)] - **test**: add hasCrypto check to common flags check (Daniel Bevenius) [#25147](https://github.com/nodejs/node/pull/25147) +* [[`175f7b60c2`](https://github.com/nodejs/node/commit/175f7b60c2)] - **test**: remove unnecessary eslint-disable comments (Rich Trott) [#25119](https://github.com/nodejs/node/pull/25119) +* [[`d09e3335a6`](https://github.com/nodejs/node/commit/d09e3335a6)] - **test**: remove obsolete eslint comments (cjihrig) [#25088](https://github.com/nodejs/node/pull/25088) +* [[`8279826ce6`](https://github.com/nodejs/node/commit/8279826ce6)] - **test**: verify input flags (Ruben Bridgewater) [#24876](https://github.com/nodejs/node/pull/24876) +* [[`1f45b2370d`](https://github.com/nodejs/node/commit/1f45b2370d)] - **test**: add signal check to test-esm-cjs-main (Rich Trott) [#25073](https://github.com/nodejs/node/pull/25073) +* [[`3e1fe19194`](https://github.com/nodejs/node/commit/3e1fe19194)] - **test**: add missing tmpdir.refresh() in recently-added test (Rich Trott) [#25098](https://github.com/nodejs/node/pull/25098) +* [[`5eb5d1d7b1`](https://github.com/nodejs/node/commit/5eb5d1d7b1)] - **test**: test internal/util/types in vm (ZYSzys) [#25056](https://github.com/nodejs/node/pull/25056) +* [[`9ad6bc2e6e`](https://github.com/nodejs/node/commit/9ad6bc2e6e)] - **test**: remove magic numbers in test-gc-http-client-onerror (Rich Trott) [#24943](https://github.com/nodejs/node/pull/24943) +* [[`30b61554f6`](https://github.com/nodejs/node/commit/30b61554f6)] - **test**: merge test with unnecessary child process (Sam Roberts) [#25025](https://github.com/nodejs/node/pull/25025) +* [[`e340b8f1ff`](https://github.com/nodejs/node/commit/e340b8f1ff)] - **tls**: re-define max supported version as 1.2 (Sam Roberts) [#25024](https://github.com/nodejs/node/pull/25024) +* [[`8ab0a48928`](https://github.com/nodejs/node/commit/8ab0a48928)] - **tools**: update ESLint to 5.11.0 (cjihrig) [#25191](https://github.com/nodejs/node/pull/25191) +* [[`c7fa132aea`](https://github.com/nodejs/node/commit/c7fa132aea)] - **tools**: alphabetize IGNORED\_SUITES in tools/test.py (Rich Trott) [#25182](https://github.com/nodejs/node/pull/25182) +* [[`073a51220e`](https://github.com/nodejs/node/commit/073a51220e)] - **tools**: report unused disable-directives for ESLint (Rich Trott) [#25119](https://github.com/nodejs/node/pull/25119) +* [[`9b941da78d`](https://github.com/nodejs/node/commit/9b941da78d)] - **tools**: update certdata.txt (Sam Roberts) [#25113](https://github.com/nodejs/node/pull/25113) +* [[`a5bccc2919`](https://github.com/nodejs/node/commit/a5bccc2919)] - **tools**: make apilinks building more robust (Joyee Cheung) [#25019](https://github.com/nodejs/node/pull/25019) +* [[`ed3303ba99`](https://github.com/nodejs/node/commit/ed3303ba99)] - **tools**: enable no-useless-constructor lint rule (cjihrig) [#25055](https://github.com/nodejs/node/pull/25055) +* [[`7df59f824b`](https://github.com/nodejs/node/commit/7df59f824b)] - **vm**: reuse validateString of internal/validators (ZYSzys) [#25074](https://github.com/nodejs/node/pull/25074) +* [[`74e08c0458`](https://github.com/nodejs/node/commit/74e08c0458)] - **vm**: simplify Script constructor options validation (cjihrig) [#25054](https://github.com/nodejs/node/pull/25054) +* [[`4f28da883f`](https://github.com/nodejs/node/commit/4f28da883f)] - **worker**: fix nullptr deref after MessagePort deser failure (Anna Henningsen) [#25076](https://github.com/nodejs/node/pull/25076) + ## 2018-12-18, Version 11.5.0 (Current), @BethGriggs diff --git a/src/node_version.h b/src/node_version.h index d114f7eba64f63..38416c82697156 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -23,13 +23,13 @@ #define SRC_NODE_VERSION_H_ #define NODE_MAJOR_VERSION 11 -#define NODE_MINOR_VERSION 5 -#define NODE_PATCH_VERSION 1 +#define NODE_MINOR_VERSION 6 +#define NODE_PATCH_VERSION 0 #define NODE_VERSION_IS_LTS 0 #define NODE_VERSION_LTS_CODENAME "" -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)