From e4fae24b62eda4123aabef6931f1f39f63575ac3 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Wed, 12 Jun 2019 23:48:12 +0800 Subject: [PATCH 001/162] build: change ASM compiler url to https PR-URL: https://github.com/nodejs/node/pull/28189 Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: James M Snell --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index 4985200b284bae..8af0aab3dc3705 100755 --- a/configure.py +++ b/configure.py @@ -722,7 +722,7 @@ def get_nasm_version(asm): stdout=subprocess.PIPE) except OSError: warn('''No acceptable ASM compiler found! - Please make sure you have installed NASM from http://www.nasm.us + Please make sure you have installed NASM from https://www.nasm.us and refer BUILDING.md.''') return '0' From e610c45076a7940bbe2460d0a39bf7dbfe9c9bf4 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Wed, 12 Jun 2019 23:48:54 +0800 Subject: [PATCH 002/162] src: remove redundant return PR-URL: https://github.com/nodejs/node/pull/28189 Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: James M Snell --- src/tls_wrap.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 17329c4b5ce56a..8c7d56e31b8a00 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -610,8 +610,6 @@ void TLSWrap::ClearIn() { // case because no further writes would succeed anyway. pending_cleartext_input_ = std::move(data); } - - return; } From 0a0832fb52ab4672a4f6084fdd81a83e19cbc89a Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 30 Jun 2019 12:05:49 -0400 Subject: [PATCH 003/162] doc: address missing paren The closing paren was missing. Move to using commas instead. PR-URL: https://github.com/nodejs/node/pull/28483 Reviewed-By: Rich Trott Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat Reviewed-By: Jiawen Geng --- doc/api/errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index 64c1da8f93ab10..3fbd429111b7a7 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -171,7 +171,7 @@ try { This will not work because the callback function passed to `fs.readFile()` is called asynchronously. By the time the callback has been called, the -surrounding code (including the `try { } catch (err) { }` block will have +surrounding code, including the `try { } catch (err) { }` block, will have already exited. Throwing an error inside the callback **can crash the Node.js process** in most cases. If [domains][] are enabled, or a handler has been registered with `process.on('uncaughtException')`, such errors can be From ec9ba4b80386736ddf65633af97a125ac1fb0578 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 30 Jun 2019 13:06:38 -0400 Subject: [PATCH 004/162] doc: remove unnecessary stability specifiers If a top level module is listed as Stable, there is no need to call out individual components of that module as Stable. The extra text is just distracting. PR-URL: https://github.com/nodejs/node/pull/28485 Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Anto Aravinth Reviewed-By: Ruben Bridgewater Reviewed-By: Anna Henningsen Reviewed-By: Trivikram Kamat --- doc/api/dns.md | 2 -- doc/api/fs.md | 2 -- doc/api/stream.md | 2 -- 3 files changed, 6 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index e70ee403627473..a22af1280ac531 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -591,8 +591,6 @@ earlier ones time out or result in some other error. ## DNS Promises API -> Stability: 2 - Stable - The `dns.promises` API provides an alternative set of asynchronous DNS methods that return `Promise` objects rather than using callbacks. The API is accessible via `require('dns').promises`. diff --git a/doc/api/fs.md b/doc/api/fs.md index 50ab633b74d490..34a1472e422ca6 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3726,8 +3726,6 @@ this API: [`fs.write(fd, string...)`][]. ## fs Promises API -> Stability: 2 - Stable - The `fs.promises` API provides an alternative set of asynchronous file system methods that return `Promise` objects rather than using callbacks. The API is accessible via `require('fs').promises`. diff --git a/doc/api/stream.md b/doc/api/stream.md index 084117e6599960..57babaf3020952 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1319,8 +1319,6 @@ changes: description: Symbol.asyncIterator support is no longer experimental. --> -> Stability: 2 - Stable - * Returns: {AsyncIterator} to fully consume the stream. ```js From 59aaee4295ca5a582f5b48159508e8f95547cd2a Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 30 Jun 2019 11:42:52 -0400 Subject: [PATCH 005/162] doc: format try...catch consistently PR-URL: https://github.com/nodejs/node/pull/28481 Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- doc/api/addons.md | 2 +- doc/api/errors.md | 9 ++++----- doc/api/fs.md | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/api/addons.md b/doc/api/addons.md index eb17650223a6a5..a75d287dce156a 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -311,7 +311,7 @@ it is compiled (i.e. sometimes it may be in `./build/Debug/`), Addons can use the [bindings][] package to load the compiled module. While the `bindings` package implementation is more sophisticated in how it -locates Addon modules, it is essentially using a try-catch pattern similar to: +locates Addon modules, it is essentially using a `try…catch` pattern similar to: ```js try { diff --git a/doc/api/errors.md b/doc/api/errors.md index 3fbd429111b7a7..fe81168e40a0fa 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -171,11 +171,10 @@ try { This will not work because the callback function passed to `fs.readFile()` is called asynchronously. By the time the callback has been called, the -surrounding code, including the `try { } catch (err) { }` block, will have -already exited. Throwing an error inside the callback **can crash the Node.js -process** in most cases. If [domains][] are enabled, or a handler has been -registered with `process.on('uncaughtException')`, such errors can be -intercepted. +surrounding code, including the `try…catch` block, will have already exited. +Throwing an error inside the callback **can crash the Node.js process** in most +cases. If [domains][] are enabled, or a handler has been registered with +`process.on('uncaughtException')`, such errors can be intercepted. ## Class: Error diff --git a/doc/api/fs.md b/doc/api/fs.md index 34a1472e422ca6..01b7b01982895a 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -32,7 +32,7 @@ fs.unlink('/tmp/hello', (err) => { ``` Exceptions that occur using synchronous operations are thrown immediately and -may be handled using `try`/`catch`, or may be allowed to bubble up. +may be handled using `try…catch`, or may be allowed to bubble up. ```js const fs = require('fs'); From 68ed32f71da95067dc62f7a260083020b353d36b Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 2 Jul 2019 11:39:28 +1000 Subject: [PATCH 006/162] doc: fix link from bootstrap README to BUILDING PR-URL: https://github.com/nodejs/node/pull/28504 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Yongsheng Zhang Reviewed-By: Luigi Pinca --- tools/bootstrap/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/bootstrap/README.md b/tools/bootstrap/README.md index 4098b5c3a2f32e..ec031e637c24a8 100644 --- a/tools/bootstrap/README.md +++ b/tools/bootstrap/README.md @@ -1,2 +1,2 @@ -See the main project [README.md](../../README.md#boxstarter) for details on how -to use this script. +See the main project [BUILDING.md](../../BUILDING.md#boxstarter) for details on +how to use this script. From f3f51e418713963899723b63cde926041ea811fc Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Thu, 27 Jun 2019 12:52:28 -0700 Subject: [PATCH 007/162] src: use thread_local to declare modpending The pointer used to hold an incoming dynamically loaded module's `node::node_module` structure needs to be thread-local. So far this was done with `uv_key_set()` and `uv_key_get()`. The language now supports the `thread_local` keyword which makes implementing this a lot cleaner. PR-URL: https://github.com/nodejs/node/pull/28456 Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen --- src/node_binding.cc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/node_binding.cc b/src/node_binding.cc index 99c2406036e187..c51a892e1bcd3d 100644 --- a/src/node_binding.cc +++ b/src/node_binding.cc @@ -243,8 +243,7 @@ using v8::Value; // Globals per process static node_module* modlist_internal; static node_module* modlist_linked; -static uv_once_t init_modpending_once = UV_ONCE_INIT; -static uv_key_t thread_local_modpending; +static thread_local node_module* thread_local_modpending; // This is set by node::Init() which is used by embedders bool node_is_initialized = false; @@ -262,7 +261,7 @@ extern "C" void node_module_register(void* m) { mp->nm_link = modlist_linked; modlist_linked = mp; } else { - uv_key_set(&thread_local_modpending, mp); + thread_local_modpending = mp; } } @@ -406,10 +405,6 @@ inline napi_addon_register_func GetNapiInitializerCallback(DLib* dlib) { dlib->GetSymbolAddress(name)); } -void InitModpendingOnce() { - CHECK_EQ(0, uv_key_create(&thread_local_modpending)); -} - // DLOpen is process.dlopen(module, filename, flags). // Used to load 'module.node' dynamically shared objects. // @@ -420,8 +415,7 @@ void DLOpen(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); auto context = env->context(); - uv_once(&init_modpending_once, InitModpendingOnce); - CHECK_NULL(uv_key_get(&thread_local_modpending)); + CHECK_NULL(thread_local_modpending); if (args.Length() < 2) { env->ThrowError("process.dlopen needs at least 2 arguments."); @@ -452,9 +446,8 @@ void DLOpen(const FunctionCallbackInfo& args) { // Objects containing v14 or later modules will have registered themselves // on the pending list. Activate all of them now. At present, only one // module per object is supported. - node_module* mp = - static_cast(uv_key_get(&thread_local_modpending)); - uv_key_set(&thread_local_modpending, nullptr); + node_module* mp = thread_local_modpending; + thread_local_modpending = nullptr; if (!is_opened) { Local errmsg = From e4f1e909e1d64be0c29e9baf6fa9e56d2661e889 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 1 Jul 2019 10:38:08 -0400 Subject: [PATCH 008/162] test: increase test-resource-usage.js validation This commit adds an assertion checking the exact field names returned by process.resourceUsage(). This ensures that no new fields accidentally slip into the returned object in the future. PR-URL: https://github.com/nodejs/node/pull/28498 Reviewed-By: Richard Lau Reviewed-By: Trivikram Kamat Reviewed-By: Rich Trott --- test/parallel/test-resource-usage.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-resource-usage.js b/test/parallel/test-resource-usage.js index 25302b8413fda4..ff41452f4a7f3b 100644 --- a/test/parallel/test-resource-usage.js +++ b/test/parallel/test-resource-usage.js @@ -3,8 +3,7 @@ require('../common'); const assert = require('assert'); const rusage = process.resourceUsage(); - -[ +const fields = [ 'userCPUTime', 'systemCPUTime', 'maxRSS', @@ -21,7 +20,11 @@ const rusage = process.resourceUsage(); 'signalsCount', 'voluntaryContextSwitches', 'involuntaryContextSwitches' -].forEach((n) => { +]; + +assert.deepStrictEqual(Object.keys(rusage).sort(), fields.sort()); + +fields.forEach((n) => { assert.strictEqual(typeof rusage[n], 'number', `${n} should be a number`); assert(rusage[n] >= 0, `${n} should be above or equal 0`); }); From 6fbad8baa40981b9645be21316b062382b881369 Mon Sep 17 00:00:00 2001 From: Kelvin Jin Date: Fri, 17 May 2019 15:34:19 -0700 Subject: [PATCH 009/162] src: configure v8 isolate with uv_get_constrained_memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change adds the ability to set the memory ceiling for a Node.js process according to a memory limit set by cgroups (via uv_get_constrained_memory), which is used by docker containers to set resource constraints. Previously we would use the physical memory size to estimate the necessary V8 heap sizes, but the physical memory size is not necessarily the correct limit, e.g. if the process is running inside a docker container or is otherwise constrained. Non-Linux systems shouldn't be affected. PR-URL: https://github.com/nodejs/node/pull/27508 Reviewed-By: Anna Henningsen Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Colin Ihrig Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- src/api/environment.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api/environment.cc b/src/api/environment.cc index 8c1f5aaff2a5e4..4389dba1394e5c 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -179,7 +179,10 @@ void FreeArrayBufferAllocator(ArrayBufferAllocator* allocator) { } void SetIsolateCreateParamsForNode(Isolate::CreateParams* params) { - const uint64_t total_memory = uv_get_total_memory(); + const uint64_t constrained_memory = uv_get_constrained_memory(); + const uint64_t total_memory = constrained_memory > 0 ? + std::min(uv_get_total_memory(), constrained_memory) : + uv_get_total_memory(); if (total_memory > 0) { // V8 defaults to 700MB or 1.4GB on 32 and 64 bit platforms respectively. // This default is based on browser use-cases. Tell V8 to configure the From e6e98afbf272d2480d6bf4aa6dfa2d8e2fdd42ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Zugmeyer?= Date: Tue, 18 Jun 2019 00:34:27 +0200 Subject: [PATCH 010/162] readline: fix position computation The implementation of _getDisplayPos, used to compute the cursor position and to find out how many lines to clear up when re-rendering the readline output, was counting each line (except the last one) from the input as one row, even if they were wraping. This caused some rendering issues when the 'prompt' have at least one wide line ending with a newline char, duplicating the lines at the top of the prompt when calling _refreshLine (ex: when the user hits backspace). This patch fixes the issue by computing the real rows count for each new line in the input string. PR-URL: https://github.com/nodejs/node/pull/28272 Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen --- lib/readline.js | 3 ++- test/parallel/test-readline-interface.js | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/readline.js b/lib/readline.js index c8d0a8040ad971..2c29eafc945461 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -732,8 +732,9 @@ Interface.prototype._getDisplayPos = function(str) { i++; } if (code === 0x0a) { // new line \n + // row must be incremented by 1 even if offset = 0 or col = +Infinity + row += Math.ceil(offset / col) || 1; offset = 0; - row += 1; continue; } const width = getStringWidth(code); diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index 2dff11f2a27e72..3f80fd44428549 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -1042,7 +1042,7 @@ function isWarned(emitter) { rli.close(); } - // multi-line cursor position + // Multi-line input cursor position { const fi = new FakeInput(); const rli = new readline.Interface({ @@ -1059,6 +1059,23 @@ function isWarned(emitter) { rli.close(); } + // Multi-line prompt cursor position + { + const fi = new FakeInput(); + const rli = new readline.Interface({ + input: fi, + output: fi, + prompt: '\nfilledline\nwraping text\n> ', + terminal: terminal + }); + fi.columns = 10; + fi.emit('data', 't'); + const cursorPos = rli._getCursorPos(); + assert.strictEqual(cursorPos.rows, 4); + assert.strictEqual(cursorPos.cols, 3); + rli.close(); + } + // Clear the whole screen { const fi = new FakeInput(); From cbf540136f07f1fb9c8101924b11db52fb6f0204 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sun, 23 Jun 2019 08:39:57 -0500 Subject: [PATCH 011/162] worker: assign missing deprecation code PR-URL: https://github.com/nodejs/node/pull/28395 Reviewed-By: Rich Trott Reviewed-By: Yongsheng Zhang Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Tiancheng "Timothy" Gu --- lib/internal/worker.js | 2 +- test/parallel/test-worker-nexttick-terminate.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/worker.js b/lib/internal/worker.js index 8fbff4fcf2cacf..b6a7bbad671ecb 100644 --- a/lib/internal/worker.js +++ b/lib/internal/worker.js @@ -232,7 +232,7 @@ class Worker extends EventEmitter { process.emitWarning( 'Passing a callback to worker.terminate() is deprecated. ' + 'It returns a Promise instead.', - 'DeprecationWarning', 'DEP0XXX'); + 'DeprecationWarning', 'DEP0132'); this.once('exit', (exitCode) => callback(null, exitCode)); } diff --git a/test/parallel/test-worker-nexttick-terminate.js b/test/parallel/test-worker-nexttick-terminate.js index 9a22605bb54491..0e5d7e096c57ec 100644 --- a/test/parallel/test-worker-nexttick-terminate.js +++ b/test/parallel/test-worker-nexttick-terminate.js @@ -16,7 +16,7 @@ process.nextTick(() => { common.expectWarning( 'DeprecationWarning', 'Passing a callback to worker.terminate() is deprecated. ' + - 'It returns a Promise instead.', 'DEP0XXX'); + 'It returns a Promise instead.', 'DEP0132'); w.on('message', common.mustCall(() => { setTimeout(() => { From 49c533964f0feda7f89d5cdad0103b9de4a71b4f Mon Sep 17 00:00:00 2001 From: Julian Correa Date: Fri, 21 Jun 2019 16:31:12 -0500 Subject: [PATCH 012/162] test: fix assertion argument order in test-https-agent.js PR-URL: https://github.com/nodejs/node/pull/28383 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- test/parallel/test-https-agent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-https-agent.js b/test/parallel/test-https-agent.js index 835b85e004080f..4b2f9e73a1cd79 100644 --- a/test/parallel/test-https-agent.js +++ b/test/parallel/test-https-agent.js @@ -68,5 +68,5 @@ server.listen(0, function() { process.on('exit', function() { - assert.strictEqual(N * M, responses); + assert.strictEqual(responses, N * M); }); From c177a68c7fd23fdcdbc56b33c257844736008985 Mon Sep 17 00:00:00 2001 From: Felipe Date: Fri, 21 Jun 2019 23:29:00 -0500 Subject: [PATCH 013/162] doc: provide an example to fs.stat() Provided a small example along its output using fs.stat() to check the stats on two different paths, one a directory and the other a txt file. PR-URL: https://github.com/nodejs/node/pull/28381 Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Rich Trott --- doc/api/fs.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 01b7b01982895a..772d1dc8e4f9af 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3020,6 +3020,76 @@ error raised if the file is not available. To check if a file exists without manipulating it afterwards, [`fs.access()`] is recommended. +For example, given the following folder structure: + +```fundamental +- txtDir +-- file.txt +- app.js +``` + +The next program will check for the stats of the given paths: + +```js +const fs = require('fs'); + +const pathsToCheck = ['./txtDir', './txtDir/file.txt']; + +for (let i = 0; i < pathsToCheck.length; i++) { + fs.stat(pathsToCheck[i], function(err, stats) { + console.log(stats.isDirectory()); + console.log(stats); + }); +} +``` + +The resulting output will resemble: + +```console +true +Stats { + dev: 16777220, + mode: 16877, + nlink: 3, + uid: 501, + gid: 20, + rdev: 0, + blksize: 4096, + ino: 14214262, + size: 96, + blocks: 0, + atimeMs: 1561174653071.963, + mtimeMs: 1561174614583.3518, + ctimeMs: 1561174626623.5366, + birthtimeMs: 1561174126937.2893, + atime: 2019-06-22T03:37:33.072Z, + mtime: 2019-06-22T03:36:54.583Z, + ctime: 2019-06-22T03:37:06.624Z, + birthtime: 2019-06-22T03:28:46.937Z +} +false +Stats { + dev: 16777220, + mode: 33188, + nlink: 1, + uid: 501, + gid: 20, + rdev: 0, + blksize: 4096, + ino: 14214074, + size: 8, + blocks: 8, + atimeMs: 1561174616618.8555, + mtimeMs: 1561174614584, + ctimeMs: 1561174614583.8145, + birthtimeMs: 1561174007710.7478, + atime: 2019-06-22T03:36:56.619Z, + mtime: 2019-06-22T03:36:54.584Z, + ctime: 2019-06-22T03:36:54.584Z, + birthtime: 2019-06-22T03:26:47.711Z +} +``` + ## fs.statSync(path[, options]) -* Returns: {Object} - * `userCPUTime` {integer} - * `systemCPUTime` {integer} - * `maxRSS` {integer} - * `sharedMemorySize` {integer} - * `unsharedDataSize` {integer} - * `unsharedStackSize` {integer} - * `minorPageFault` {integer} - * `majorPageFault` {integer} - * `swappedOut` {integer} - * `fsRead` {integer} - * `fsWrite` {integer} - * `ipcSent` {integer} - * `ipcReceived` {integer} - * `signalsCount` {integer} - * `voluntaryContextSwitches` {integer} - * `involuntaryContextSwitches` {integer} - -The `process.resourceUsage()` method returns the resource usage -for the current process. -All of these values come from the `uv_getrusage` call which returns -[this struct][uv_rusage_t], here the mapping between node and libuv: -- `userCPUTime` maps to `ru_utime` computed in microseconds. -It is the values as [`process.cpuUsage().user`][process.cpuUsage] -- `systemCPUTime` maps to `ru_stime` computed in microseconds. -It is the value as [`process.cpuUsage().system`][process.cpuUsage] -- `maxRSS` maps to `ru_maxrss` which is the maximum resident set size -used (in kilobytes). -- `sharedMemorySize` maps to `ru_ixrss` but is not supported by any platform. -- `unsharedDataSize` maps to `ru_idrss` but is not supported by any platform. -- `unsharedStackSize` maps to `ru_isrss` but is not supported by any platform. -- `minorPageFault` maps to `ru_minflt` which is the number of minor page fault -for the process, see [this article for more details][wikipedia_minor_fault] -- `majorPageFault` maps to `ru_majflt` which is the number of major page fault -for the process, see [this article for more details][wikipedia_major_fault]. -This field is not supported on Windows platforms. -- `swappedOut` maps to `ru_nswap` which is not supported by any platform. -- `fsRead` maps to `ru_inblock` which is the number of times the file system -had to perform input. -- `fsWrite` maps to `ru_oublock` which is the number of times the file system -had to perform output. -- `ipcSent` maps to `ru_msgsnd` but is not supported by any platform. -- `ipcReceived` maps to `ru_msgrcv` but is not supported by any platform. -- `signalsCount` maps to `ru_nsignals` but is not supported by any platform. -- `voluntaryContextSwitches` maps to `ru_nvcsw` which is the number of times -a CPU context switch resulted due to a process voluntarily giving up the -processor before its time slice was completed -(usually to await availability of a resource). -This field is not supported on Windows platforms. -- `involuntaryContextSwitches` maps to `ru_nivcsw` which is the number of times -a CPU context switch resulted due to a higher priority process becoming runnable - or because the current process exceeded its time slice. -This field is not supported on Windows platforms. - +* Returns: {Object} the resource usage for the current process. All of these + values come from the `uv_getrusage` call which returns + a [`uv_rusage_t` struct][uv_rusage_t]. + * `userCPUTime` {integer} maps to `ru_utime` computed in microseconds. + It is the same value as [`process.cpuUsage().user`][process.cpuUsage]. + * `systemCPUTime` {integer} maps to `ru_stime` computed in microseconds. + It is the same value as [`process.cpuUsage().system`][process.cpuUsage]. + * `maxRSS` {integer} maps to `ru_maxrss` which is the maximum resident set + size used in kilobytes. + * `sharedMemorySize` {integer} maps to `ru_ixrss` but is not supported by + any platform. + * `unsharedDataSize` {integer} maps to `ru_idrss` but is not supported by + any platform. + * `unsharedStackSize` {integer} maps to `ru_isrss` but is not supported by + any platform. + * `minorPageFault` {integer} maps to `ru_minflt` which is the number of + minor page faults for the process, see + [this article for more details][wikipedia_minor_fault]. + * `majorPageFault` {integer} maps to `ru_majflt` which is the number of + major page faults for the process, see + [this article for more details][wikipedia_major_fault]. This field is not + supported on Windows. + * `swappedOut` {integer} maps to `ru_nswap` but is not supported by any + platform. + * `fsRead` {integer} maps to `ru_inblock` which is the number of times the + file system had to perform input. + * `fsWrite` {integer} maps to `ru_oublock` which is the number of times the + file system had to perform output. + * `ipcSent` {integer} maps to `ru_msgsnd` but is not supported by any + platform. + * `ipcReceived` {integer} maps to `ru_msgrcv` but is not supported by any + platform. + * `signalsCount` {integer} maps to `ru_nsignals` but is not supported by any + platform. + * `voluntaryContextSwitches` {integer} maps to `ru_nvcsw` which is the + number of times a CPU context switch resulted due to a process voluntarily + giving up the processor before its time slice was completed (usually to + await availability of a resource). This field is not supported on Windows. + * `involuntaryContextSwitches` {integer} maps to `ru_nivcsw` which is the + number of times a CPU context switch resulted due to a higher priority + process becoming runnable or because the current process exceeded its + time slice. This field is not supported on Windows. ```js console.log(process.resourceUsage()); From 13f139368fd4dd1d5cfd0f2bf1bc007464d539d2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 25 Jun 2019 14:37:24 -0700 Subject: [PATCH 020/162] test: unmark test-gc-http-client-onerror flaky The test has not failed on FreeBSD in the last 100 runs and appears to perhaps not be an issue anymore. Closes: https://github.com/nodejs/node/issues/23089 test-gc-http-client-onerror: PASS,FLAKY PR-URL: https://github.com/nodejs/node/pull/28429 Fixes: https://github.com/nodejs/node/issues/23089 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Sam Roberts Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- test/parallel/parallel.status | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 3a70f6f03eb50f..5b6960e6ee028c 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -33,7 +33,5 @@ test-async-hooks-http-parser-destroy: PASS,FLAKY [$system==solaris] # Also applies to SmartOS [$system==freebsd] -# https://github.com/nodejs/node/issues/23089 -test-gc-http-client-onerror: PASS,FLAKY [$system==aix] From e854bfa3b1c31dfef16bcdfa2f29a6b82a71cfa1 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 2 Jul 2019 15:13:40 +0200 Subject: [PATCH 021/162] test: create home for test-npm-install This test currently fails if run as root: npm ERR! makeDirectory homeless? npm WARN install-dir No description npm WARN install-dir No repository field. npm WARN install-dir No license field. npm ERR! path /root/node/test/.tmp.0/npm-sandbox/home npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall stat npm ERR! enoent ENOENT: no such file or directory, stat '/root/node/test/.tmp.0/npm-sandbox/home' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent assert.js:89 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: npm install got error code 254 at handleExit (/root/node/test/parallel/test-npm-install.js:60:10) at /root/node/test/common/index.js:371:15 at ChildProcess.exithandler (child_process.js:304:5) at ChildProcess.emit (events.js:203:13) at maybeClose (internal/child_process.js:1028:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) { generatedMessage: false, code: 'ERR_ASSERTION', actual: 254, expected: 0, operator: 'strictEqual' } The home directory will be created as expected by npm in the npmSandbox when run as non-root, but when run as root this directory has to exist. This commit creates the home directory to allow the test to pass also when run as the root user. Refs:https://github.com/npm/cli/blob/ 31718e72cb5a03cee7127fc36843e4b55c868d93/ lib/utils/correct-mkdir.js#L82-L105 PR-URL: https://github.com/nodejs/node/pull/28510 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Yongsheng Zhang Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater --- test/parallel/test-npm-install.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js index dc9f60b799e0f6..069465466df682 100644 --- a/test/parallel/test-npm-install.js +++ b/test/parallel/test-npm-install.js @@ -13,6 +13,8 @@ const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); const npmSandbox = path.join(tmpdir.path, 'npm-sandbox'); fs.mkdirSync(npmSandbox); +const homeDir = path.join(tmpdir.path, 'home'); +fs.mkdirSync(homeDir); const installDir = path.join(tmpdir.path, 'install-dir'); fs.mkdirSync(installDir); @@ -40,7 +42,7 @@ const env = Object.assign({}, process.env, { PATH: path.dirname(process.execPath), NPM_CONFIG_PREFIX: path.join(npmSandbox, 'npm-prefix'), NPM_CONFIG_TMP: path.join(npmSandbox, 'npm-tmp'), - HOME: path.join(npmSandbox, 'home'), + HOME: homeDir, }); exec(`${process.execPath} ${npmPath} install`, { From 8d41b07c4cd107ade13dbe87331d5ea180493fac Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 1 Jul 2019 14:43:20 +0200 Subject: [PATCH 022/162] src: remove unused using declarations in src/api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/28506 Reviewed-By: Michaël Zasso Reviewed-By: Jiawen Geng Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- src/api/async_resource.cc | 1 - src/api/environment.cc | 1 - src/api/exceptions.cc | 2 -- 3 files changed, 4 deletions(-) diff --git a/src/api/async_resource.cc b/src/api/async_resource.cc index 5141c7c6b35abd..eef80c85f44f4c 100644 --- a/src/api/async_resource.cc +++ b/src/api/async_resource.cc @@ -4,7 +4,6 @@ namespace node { using v8::Function; -using v8::HandleScope; using v8::Isolate; using v8::Local; using v8::MaybeLocal; diff --git a/src/api/environment.cc b/src/api/environment.cc index 4389dba1394e5c..fac1298d26fd40 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -21,7 +21,6 @@ using v8::HandleScope; using v8::Isolate; using v8::Local; using v8::MaybeLocal; -using v8::Message; using v8::MicrotasksPolicy; using v8::Null; using v8::Object; diff --git a/src/api/exceptions.cc b/src/api/exceptions.cc index 1632574c6b1b9c..998d370d3b5fd6 100644 --- a/src/api/exceptions.cc +++ b/src/api/exceptions.cc @@ -12,11 +12,9 @@ namespace node { using v8::Exception; -using v8::HandleScope; using v8::Integer; using v8::Isolate; using v8::Local; -using v8::Message; using v8::NewStringType; using v8::Object; using v8::String; From 4941d47212401c697604f0ac12e7862a569a9533 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 2 Jul 2019 13:24:51 +0200 Subject: [PATCH 023/162] test: don't use deprecated crypto.fips property `crypto.fips` was deprecated in commit 6e7992e8b8 ("crypto: docs-only deprecate crypto.fips, replace") but its usage in `common.hasFipsCrypto` seems to have been overlooked. PR-URL: https://github.com/nodejs/node/pull/28509 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Richard Lau Reviewed-By: Anna Henningsen Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- test/common/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/index.js b/test/common/index.js index bbb74e2b988517..13604d06e14a36 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -789,7 +789,7 @@ module.exports = { get localhostIPv6() { return '::1'; }, get hasFipsCrypto() { - return hasCrypto && require('crypto').fips; + return hasCrypto && require('crypto').getFips(); }, get inFreeBSDJail() { From 0777e090b4128b582abdee26a3baa70b49a32995 Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Wed, 3 Jul 2019 15:43:19 +0300 Subject: [PATCH 024/162] doc: fix family default value in socket.connect PR-URL: https://github.com/nodejs/node/pull/28521 Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- doc/api/net.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/net.md b/doc/api/net.md index d65637e31568a8..a12ac4ad3cc258 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -618,8 +618,8 @@ For TCP connections, available `options` are: * `host` {string} Host the socket should connect to. **Default:** `'localhost'`. * `localAddress` {string} Local address the socket should connect from. * `localPort` {number} Local port the socket should connect from. -* `family` {number}: Version of IP stack, can be either `4` or `6`. - **Default:** `4`. +* `family` {number}: Version of IP stack. Must be `4`, `6`, or `0`. + **Default:** `0`. * `hints` {number} Optional [`dns.lookup()` hints][]. * `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][]. From 38f8cd5ba100a3922d84ae5bc6c3828559bbc693 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 1 Jul 2019 00:34:55 +0200 Subject: [PATCH 025/162] http: improve parser error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include the library-provided reason in the Error’s `message`. Fixes: https://github.com/nodejs/node/issues/28468 PR-URL: https://github.com/nodejs/node/pull/28487 Reviewed-By: Anto Aravinth Reviewed-By: Daniel Bevenius Reviewed-By: Fedor Indutny Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Trivikram Kamat --- lib/_http_client.js | 2 ++ lib/_http_common.js | 9 +++++- lib/_http_server.js | 4 ++- .../test-http-client-error-rawbytes.js | 32 +++++++++++++++++++ test/parallel/test-http-client-parse-error.js | 2 +- test/parallel/test-http-header-overflow.js | 2 +- .../parallel/test-http-server-client-error.js | 2 +- ...p-server-destroy-socket-on-client-error.js | 2 +- 8 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 test/parallel/test-http-client-error-rawbytes.js diff --git a/lib/_http_client.js b/lib/_http_client.js index 5555db13623553..fcd7ca90aca7ed 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -33,6 +33,7 @@ const { httpSocketSetup, parsers, HTTPParser, + prepareError, } = require('_http_common'); const { OutgoingMessage } = require('_http_outgoing'); const Agent = require('_http_agent'); @@ -451,6 +452,7 @@ function socketOnData(d) { const ret = parser.execute(d); if (ret instanceof Error) { + prepareError(ret, parser, d); debug('parse error', ret); freeParser(parser, req, socket); socket.destroy(); diff --git a/lib/_http_common.js b/lib/_http_common.js index 75995260128862..b3aeb0721ae58e 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -239,6 +239,12 @@ function cleanParser(parser) { parser._consumed = false; } +function prepareError(err, parser, rawPacket) { + err.rawPacket = rawPacket || parser.getCurrentBuffer(); + if (typeof err.reason === 'string') + err.message = `Parse Error: ${err.reason}`; +} + module.exports = { _checkInvalidHeaderChar: checkInvalidHeaderChar, _checkIsHttpToken: checkIsHttpToken, @@ -251,5 +257,6 @@ module.exports = { methods, parsers, kIncomingMessage, - HTTPParser + HTTPParser, + prepareError, }; diff --git a/lib/_http_server.js b/lib/_http_server.js index ff69c70c9ca353..c109fa6b9b7ad4 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -35,7 +35,8 @@ const { httpSocketSetup, kIncomingMessage, HTTPParser, - _checkInvalidHeaderChar: checkInvalidHeaderChar + _checkInvalidHeaderChar: checkInvalidHeaderChar, + prepareError, } = require('_http_common'); const { OutgoingMessage } = require('_http_outgoing'); const { outHeadersKey, ondrain, nowDate } = require('internal/http'); @@ -553,6 +554,7 @@ function onParserExecuteCommon(server, socket, parser, state, ret, d) { resetSocketTimeout(server, socket, state); if (ret instanceof Error) { + prepareError(ret, parser, d); ret.rawPacket = d || parser.getCurrentBuffer(); debug('parse error', ret); socketOnError.call(socket, ret); diff --git a/test/parallel/test-http-client-error-rawbytes.js b/test/parallel/test-http-client-error-rawbytes.js new file mode 100644 index 00000000000000..909fcc796ad915 --- /dev/null +++ b/test/parallel/test-http-client-error-rawbytes.js @@ -0,0 +1,32 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); +const net = require('net'); + +const response = Buffer.from('HTTP/1.1 200 OK\r\n' + + 'Content-Length: 6\r\n' + + 'Transfer-Encoding: Chunked\r\n' + + '\r\n' + + '6\r\nfoobar' + + '0\r\n'); + +const server = net.createServer(common.mustCall((conn) => { + conn.write(response); +})); + +server.listen(0, common.mustCall(() => { + const req = http.get(`http://localhost:${server.address().port}/`); + req.end(); + req.on('error', common.mustCall((err) => { + const reason = 'Content-Length can\'t be present with chunked encoding'; + assert.strictEqual(err.message, `Parse Error: ${reason}`); + assert(err.bytesParsed < response.length); + assert(err.bytesParsed >= response.indexOf('Transfer-Encoding')); + assert.strictEqual(err.code, 'HPE_UNEXPECTED_CONTENT_LENGTH'); + assert.strictEqual(err.reason, reason); + assert.deepStrictEqual(err.rawPacket, response); + + server.close(); + })); +})); diff --git a/test/parallel/test-http-client-parse-error.js b/test/parallel/test-http-client-parse-error.js index cb4e3ff08434dd..305a7bc170b693 100644 --- a/test/parallel/test-http-client-parse-error.js +++ b/test/parallel/test-http-client-parse-error.js @@ -44,7 +44,7 @@ server.listen(0, common.mustCall(() => { }).on('error', common.mustCall((e) => { common.expectsError({ code: 'HPE_INVALID_CONSTANT', - message: 'Parse Error' + message: 'Parse Error: Expected HTTP/' })(e); countdown.dec(); })); diff --git a/test/parallel/test-http-header-overflow.js b/test/parallel/test-http-header-overflow.js index 442776fab08909..83a2d469103bae 100644 --- a/test/parallel/test-http-header-overflow.js +++ b/test/parallel/test-http-header-overflow.js @@ -19,7 +19,7 @@ const server = createServer(); server.on('connection', mustCall((socket) => { socket.on('error', expectsError({ type: Error, - message: 'Parse Error', + message: 'Parse Error: Header overflow', code: 'HPE_HEADER_OVERFLOW', bytesParsed: maxHeaderSize + PAYLOAD_GET.length, rawPacket: Buffer.from(PAYLOAD) diff --git a/test/parallel/test-http-server-client-error.js b/test/parallel/test-http-server-client-error.js index ffe78941553367..d8a1633bbb7af4 100644 --- a/test/parallel/test-http-server-client-error.js +++ b/test/parallel/test-http-server-client-error.js @@ -13,7 +13,7 @@ server.on('clientError', common.mustCall(function(err, socket) { assert.strictEqual(err instanceof Error, true); assert.strictEqual(err.code, 'HPE_INVALID_METHOD'); assert.strictEqual(err.bytesParsed, 1); - assert.strictEqual(err.message, 'Parse Error'); + assert.strictEqual(err.message, 'Parse Error: Invalid method encountered'); assert.strictEqual(err.rawPacket.toString(), 'Oopsie-doopsie\r\n'); socket.end('HTTP/1.1 400 Bad Request\r\n\r\n'); diff --git a/test/parallel/test-http-server-destroy-socket-on-client-error.js b/test/parallel/test-http-server-destroy-socket-on-client-error.js index 7085401883933b..75f795603d598a 100644 --- a/test/parallel/test-http-server-destroy-socket-on-client-error.js +++ b/test/parallel/test-http-server-destroy-socket-on-client-error.js @@ -14,7 +14,7 @@ const server = createServer(); server.on('connection', mustCall((socket) => { socket.on('error', expectsError({ type: Error, - message: 'Parse Error', + message: 'Parse Error: Invalid method encountered', code: 'HPE_INVALID_METHOD', bytesParsed: 0, rawPacket: Buffer.from('FOO /\r\n') From c3311c25ffe62279bd6a6735731986a557d0b6b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caleb=20=E3=83=84=20Everett?= Date: Fri, 28 Jun 2019 11:11:39 -0700 Subject: [PATCH 026/162] test: generate des rsa_cert.pfx My node distribution uses a shared openssl library with some ciphers disabled, including RC2. These tests (which use `rsa_cert.pfx`) fail with `unknown cipher`: - parallel/test-crypto-binary-default - parallel/test-https-pfx - parallel/test-crypto The other fixture .pfx's use the `-descert` option, I don't know if rsa_cert.pfx was generated without `-descert` intentionally or not but none of the tests reference RC2, and the tests pass with a des cert. I'm not an ssl/crypto expert, so I would appreciate any insight. Old key: ``` openssl pkcs12 -info -in test/fixtures/keys/rsa_cert.pfx -noout -passin pass:sample MAC Iteration 2048 MAC verified OK PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048 Certificate bag PKCS7 Data Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048 ``` New ``` openssl pkcs12 -info -in test/fixtures/keys/rsa_cert.pfx -noout -passin pass:sample MAC Iteration 2048 MAC verified OK PKCS7 Encrypted data: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048 Certificate bag PKCS7 Data Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048 ``` PR-URL: https://github.com/nodejs/node/pull/28471 Reviewed-By: Ben Noordhuis Reviewed-By: Rich Trott --- test/fixtures/keys/Makefile | 2 +- test/fixtures/keys/rsa_cert.pfx | Bin 2629 -> 2629 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/keys/Makefile b/test/fixtures/keys/Makefile index 226dc67346ef74..824704c7241b0a 100644 --- a/test/fixtures/keys/Makefile +++ b/test/fixtures/keys/Makefile @@ -631,7 +631,7 @@ rsa_cert.crt: rsa_private.pem openssl req -new -x509 -days 99999 -key rsa_private.pem -config rsa_cert.cnf -out rsa_cert.crt rsa_cert.pfx: rsa_cert.crt - openssl pkcs12 -export -passout 'pass:sample' -inkey rsa_private.pem -in rsa_cert.crt -out rsa_cert.pfx + openssl pkcs12 -export -descert -passout 'pass:sample' -inkey rsa_private.pem -in rsa_cert.crt -out rsa_cert.pfx rsa_ca.crt: rsa_cert.crt cp rsa_cert.crt rsa_ca.crt diff --git a/test/fixtures/keys/rsa_cert.pfx b/test/fixtures/keys/rsa_cert.pfx index 66cbb14842d7f52ef27cfe140604df3146b8e2cf..aef85e2e28055d26b05023460cdaca2eaad6355d 100644 GIT binary patch delta 2451 zcmV;E32gSo6vY&fSbqaB4g?5!Y33VWq*r?a0tf(rf&^f6RsJ${ilc7D0m@D?@583e zZYt%_#(L?yXNS3Wdo3VT^juHR`9h*9{@aNJnY_c@0{Qy% zK@=s@NoTbc(w*kW#wc-x3Z?>iVz6T9j>%92fGd)5^A>trQh(Mm1`z;UB_kU}%yG)t zhbesRtf0AR`jjbioH`y>$UN$~#ty|@KFdLo+LFWYBDI46>Qg_6kP-D+D3?k)JP~O{ zi%&(tQtfZ={A1m1&_NCO=2U#?kWCVmxeXIIm~S(qfzBt@&&xYv6@+mPh9p70%D|SR zq;PLu$9fAgT7Mr?aT;JV_fQ3ydOg(+9G#^ap%}9(=NMdX+WHhi8qwb2Zj`VMdNR)f zKI3-{J10O{W9k~~9pe}4?3^TFY^z{UCHJ~aI);;Ek1 z9KfXQ!R8{U>vha?;Fs{-a zWZ~km{~*ScCBLpnHrf;WL_|4P(7X7_H!D_p!F@)1-^{BW&-BbR-N}6)AebT&NK!4zm zX`_c=m|xCOHS<0C^snDO_I`OBD^HQFyT>(~zIPJl|?w6}E+ zORtL{zQEM~qWs$J4fbn+#bwOyO#fZbldJ@9R^j$`dS}QzXV}&q9tS-m#@f@p0F@iV}IyEd!}SMF`y7>)l4Np_b?`j+DBsIV+@m1 ze=2m-tE1&dRT1{pOLiDB^wZ7`9s*jyLg4@TZY701sJWP7mNmf&*8J&|J00`Cf%ilAs7zgZh5TBhrtYG{Y}5% zN?zKUnr5?H6|H+bMA<*5diXfdTiITWHvZL0TFJjw2;@1^%j|SolgAjr_xY@s-p{@x z)^4oIQOD=DhhYA)yinjuvqyv5$*$+oNDj#jvoiSGif>w^C+%Yx+=}2ccYl&@DZM+$JN>2kj zU5^bEk7ja;Av&a#4ir?t-b*GoTXWHkuOm~ZQS5-9=-%m&C(?7tV7a7k^=r+(fuAH# zD~+IWNt8J&!T|G0FC4dsFRh=CK7U9kmK7;}{v%tf*E$l9kz^rKX3V|at;C7sL*s$b z{FAL=OJxix00)>q$a>lrG|-xk>N{ToQi-r`k(wSrs+~)yoan0~MfEF*ji1;U41sp& zc36Z*Y7t9EM9QR9$HrPs+m0qnB%sb!ng{G~N_2-?`7^vm38}h*1jlIipIUNQ3BP3c6AJ5R4y68 zG4sIrCpP^%v40!4SdJCL!qN}M3=7Tx@xUpPqIY;Q$+IiLTr*RQ>W7`;1U!(YjBd4K z9Tp4ojLmqO#|hBlpq>M`kbir`Lii+vJS~O9(C0ZFHi=4{BqP^$Ue2ony?Z2Id+2SH z5&<>ZSiW~u4B(^6w2*s?khO$jlX{5E8-agoZ>wbpBBQ5~4t*$!k03BdTm`+0Qe^vE zTyU4CPCy)v+OiwmodbR06Qk^kK+D`*E-8`6%GN_i$mWo3y$eO#Ay%T}P(c z8qLES7Y(r|v4WvOpmeVlhEl(iLT!@d9-mFIg(_mmFYp@cKGQo#dop-zt{vlNE~EPg zS)>;;vX=CCO9K_#+<%07t72=&BwS%zWRE%g(x6n>WfQjA`En*w>_>&MnUNo)&1Hp{ za#?>Pxu|-pG#6?1J3>{{kQ6gAGcwRh$61&*Mb!>nff~cO!+Qn%k2kwaagU>+JwJ3v z7@4EMI^=OeL&Mz}u%D=LT!O1SO3Xj>$I6RO(u-1cvn8<2=Gt>s?@1 zq~DJgh*havtN8>j^j_zO_VrYD{f^akO~(o`BjEO?KGe R1PBXfoy*v!%jg0E2mtvq%u@Os<&U7AcPRy#K?`|jxJ)BCLd0O&;fKyviU}=;aC!{ zkua*NLYy&#e3&bRyhh6k1TAN#-n;$Ga^mTh!=m{5et~s`qJKg7g(1!!Kc%HDZn!(i ze3(zd&VBqA=&Vwl(~DwgXcX+m4i8NR`Cx@Ub_I--7a{BIso10-G`;R#6xG+x8v z>sLOs&ys%%HtDx($Qm-S~ORG7@MAi)@kQta(^T0&U)7hY6^bGg%K%32~sV1 z!~=_nH`3;>f)!g~IEfVS9GKQ2BUp!P;MyC~3zl3fkYTt6*)Q7q@VWGK+x_RMn0l7_ zKifsd<9Qc=oc{G&iHojh4$E#-*0>V(0nFl#K!o9xZIxOtfgo$B(tL;8SMPXIi~2b; zkn7w-<9~anZW~!bRg2rWF#>HoxbD8BbyV2P^-h&F0v)rK1DdgS9b%9PJ3qu*aK(sH z=1@xMM&C;HErI^g3lqX(LI^>x-v8p1*CTwwiZPC#g47a!Lp63vN6&{7jri=+J zcZfVTJEaG!g;y**DMA5AHm>^1-1mayY)O2=!GB7QBH(dHa2LD{PHLS-3sRvz) z3eKj6acdFzXK5TK^-G2OBDx~WL39eNZrMP?!XT@Bebj-2YI|DLZx6l2Nr3gJH5=$* zx zC|#D{VD!k^AqE}qU{T5r6HF|-OiR2@Gy7~j3Ag?`f6$a9D&6zZtAd68ZVau)q21Ba+(`%hgm!#iGS5g zj+MVtbKWF;&CpeBuf-e{ag2Qo-gWng3W_M{WQt#3BqJ5`68AM~>80GD&gcNafv^{D z13%vd3rzQPJ8h2heq1=`SsAF6VIW)<{)f&aC@}6{auFD}Act+b=OY__pF%bKN8{9& zX~Zg;42DZVpaeWnUD>&o+0FAXf|Jh#M1Q2CzuRz;t^EQ52ml0v1jvXr#}TNjg!w&x z(zwJtj2+{a=Pc7OvO2^WS%f?GC$Jq{bvlxZh0AO7%9T=?wCq;IU8U z5J$*|OVO#aaJT;cr0CgYqjNWL+zOOEQBy8_EO6`$aSmrCUIQY_?1HuyHeH&lY6N9^ zGCT@VhNHq!hTuVotDmlEice?}0usS)dA&=bQgeDBrCUrPbmq}6f|KFKo91pA zhdlIJ4MOasNBf}*6|#(f2aQ2vM~-xPo+=NnedQ*QK>-q^F@NvN!bV0hNt;fCaS^^G z7~g%2ncfLEEbX)B`gb!dVh})m_GJLr1(GXtxWUd^|Ii+HDvd>xJ!G%#k7Dlvv$6Wb z?qRJGY0gGf8lmNShA&=;B~K(;0W)`^L3*-ti>d0#xUl!~NN!9p4`VcZucgM&mi_df zhRui?T+%FK(tqL5g>Jyj`sHa33Iv{7fEYtjKfIFrJlfjBv-MmAK%>Vh9WnZe@AxVt z%uZ#x6ZZ1Zl|9nd&qy1Zje%S4*wL{^htb4zO(;bJ$pInN89RjC1}vas`hl3RDv$O( zER2u?$rNVu3-Q8M8{UQ^Qu+3Oj}|V0eB%rw>`eH<^w516a!`i-#>KTMOU*7L47$L&U*aw z52aAsQI;gXDLc4eLfqN^>kGzbw3)$_vHVYy>j^j_s=#pG_tlD(J6sp%8&C= Date: Wed, 26 Jun 2019 19:17:29 +0800 Subject: [PATCH 027/162] src: correct json writer placement in process.report PR-URL: https://github.com/nodejs/node/pull/28433 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater --- src/node_report.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node_report.cc b/src/node_report.cc index 84caf13c5b64d1..cabf8cf6625090 100644 --- a/src/node_report.cc +++ b/src/node_report.cc @@ -366,7 +366,6 @@ static void PrintJavaScriptStack(JSONWriter* writer, int line = ss.find('\n'); if (line == -1) { writer->json_keyvalue("message", ss); - writer->json_objectend(); } else { std::string l = ss.substr(0, line); writer->json_keyvalue("message", l); @@ -382,8 +381,8 @@ static void PrintJavaScriptStack(JSONWriter* writer, ss = ss.substr(line + 1); line = ss.find('\n'); } + writer->json_arrayend(); } - writer->json_arrayend(); writer->json_objectend(); } From 793163e353efe0601e358ca0f3c3046e72eced56 Mon Sep 17 00:00:00 2001 From: himself65 Date: Wed, 26 Jun 2019 22:46:36 +0800 Subject: [PATCH 028/162] test: check writeReport when error with one line stack PR-URL: https://github.com/nodejs/node/pull/28433 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater --- test/report/test-report-writereport.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/report/test-report-writereport.js b/test/report/test-report-writereport.js index 8a22600acfbec4..5ab3af0e299eee 100644 --- a/test/report/test-report-writereport.js +++ b/test/report/test-report-writereport.js @@ -37,6 +37,14 @@ function validate() { validate(); } +{ + // Test with an error with one line stack + const error = new Error(); + error.stack = 'only one line'; + process.report.writeReport(error); + validate(); +} + { // Test with a file argument. const file = process.report.writeReport('custom-name-1.json'); From 598037346eddc9669d637d12802fe531cca2ea2a Mon Sep 17 00:00:00 2001 From: himself65 Date: Wed, 26 Jun 2019 22:53:24 +0800 Subject: [PATCH 029/162] test: check getReport when error with one line stack PR-URL: https://github.com/nodejs/node/pull/28433 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater --- test/report/test-report-getreport.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/report/test-report-getreport.js b/test/report/test-report-getreport.js index 9f40e61c2e7efe..1ee844fa921354 100644 --- a/test/report/test-report-getreport.js +++ b/test/report/test-report-getreport.js @@ -21,6 +21,14 @@ common.expectWarning('ExperimentalWarning', assert.deepStrictEqual(helper.findReports(process.pid, process.cwd()), []); } +{ + // Test with an error with one line stack + const error = new Error(); + error.stack = 'only one line'; + helper.validateContent(process.report.getReport(error)); + assert.deepStrictEqual(helper.findReports(process.pid, process.cwd()), []); +} + // Test with an invalid error argument. [null, 1, Symbol(), function() {}, 'foo'].forEach((error) => { common.expectsError(() => { From 4c333f40289c5cc31f521e299e95d326ced37733 Mon Sep 17 00:00:00 2001 From: Miken Date: Fri, 21 Jun 2019 17:39:34 -0500 Subject: [PATCH 030/162] test: change the repeat Buffer.from('blerg'); statments PR-URL: https://github.com/nodejs/node/pull/28372 Reviewed-By: Yongsheng Zhang Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- .../test-stream-writable-constructor-set-methods.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-stream-writable-constructor-set-methods.js b/test/parallel/test-stream-writable-constructor-set-methods.js index 13a8dc286021f2..41779d7e519db4 100644 --- a/test/parallel/test-stream-writable-constructor-set-methods.js +++ b/test/parallel/test-stream-writable-constructor-set-methods.js @@ -12,7 +12,9 @@ w.on('error', common.expectsError({ message: 'The _write() method is not implemented' })); -w.end(Buffer.from('blerg')); +const bufferBlerg = Buffer.from('blerg'); + +w.end(bufferBlerg); const _write = common.mustCall((chunk, _, next) => { next(); @@ -28,10 +30,10 @@ const w2 = new Writable({ write: _write, writev: _writev }); strictEqual(w2._write, _write); strictEqual(w2._writev, _writev); -w2.write(Buffer.from('blerg')); +w2.write(bufferBlerg); w2.cork(); -w2.write(Buffer.from('blerg')); -w2.write(Buffer.from('blerg')); +w2.write(bufferBlerg); +w2.write(bufferBlerg); w2.end(); From 24a77ae19a2a8485f0d79b0419e8bc2fa76475f2 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Mon, 1 Jul 2019 18:42:14 +0200 Subject: [PATCH 031/162] doc: add description for the listener argument Clarify that `listener` is registered as a one-time listener of the `'connect'` event. PR-URL: https://github.com/nodejs/node/pull/28500 Fixes: https://github.com/nodejs/node/issues/28217 Reviewed-By: Roman Reiss Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater Reviewed-By: Yongsheng Zhang --- doc/api/http2.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 1366d9744984f0..6be7464cc6bf4e 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2206,7 +2206,8 @@ changes: instance passed to `connect` and the `options` object, and returns any [`Duplex`][] stream that is to be used as the connection for this session. * ...: Any [`net.connect()`][] or [`tls.connect()`][] options can be provided. -* `listener` {Function} +* `listener` {Function} Will be registered as a one-time listener of the + [`'connect'`][] event. * Returns: {ClientHttp2Session} Returns a `ClientHttp2Session` instance. @@ -3466,6 +3467,7 @@ following additional properties: [Stream]: stream.html#stream_stream [Using `options.selectPadding()`]: #http2_using_options_selectpadding [`'checkContinue'`]: #http2_event_checkcontinue +[`'connect'`]: #http2_event_connect [`'request'`]: #http2_event_request [`'unknownProtocol'`]: #http2_event_unknownprotocol [`ClientHttp2Stream`]: #http2_class_clienthttp2stream From d2ba4547aab1afb981d294fd7953e0dc7267a6d8 Mon Sep 17 00:00:00 2001 From: Gautham B A Date: Sat, 6 Jul 2019 11:05:56 +0530 Subject: [PATCH 032/162] doc: fix link in build instructions The right one is #prerequisites. PR-URL: https://github.com/nodejs/node/pull/28572 Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index a1946ac7c5384d..abb47cf1294232 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -29,7 +29,7 @@ file a new issue. * [Building the documentation](#building-the-documentation) * [Building a debug build](#building-a-debug-build) * [Windows](#windows) - * [Prerequisites](#prerequisites-1) + * [Prerequisites](#prerequisites) * [Option 1: Manual install](#option-1-manual-install) * [Option 1: Automated install with Boxstarter](#option-1-automated-install-with-boxstarter) * [Building Node.js](#building-nodejs-1) From 75c628130f76eafb83e6c60506971dff88bb66df Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 1 Jul 2019 15:39:54 +0200 Subject: [PATCH 033/162] lib: use `class ... extends` in perf_hooks.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t unnecessarily set the protoype afterwards. PR-URL: https://github.com/nodejs/node/pull/28495 Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Jiawen Geng Reviewed-By: Ruben Bridgewater --- lib/perf_hooks.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js index d822c5de71bd46..e0b7e9d960e0ec 100644 --- a/lib/perf_hooks.js +++ b/lib/perf_hooks.js @@ -149,7 +149,7 @@ function getMilestoneTimestamp(milestoneIdx) { return ns / 1e6 - timeOrigin; } -class PerformanceNodeTiming { +class PerformanceNodeTiming extends PerformanceEntry { get name() { return 'node'; } @@ -213,9 +213,6 @@ class PerformanceNodeTiming { }; } } -Object.setPrototypeOf( - PerformanceNodeTiming.prototype, PerformanceEntry.prototype); -Object.setPrototypeOf(PerformanceNodeTiming, PerformanceEntry); const nodeTiming = new PerformanceNodeTiming(); From 66382abe29d8408db4ff5466c1dd54bbcbaa49d5 Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Wed, 3 Jul 2019 11:32:31 -0700 Subject: [PATCH 034/162] inspector: reduce InspectorIo API surface This is a cleanup, allowing for a better separation of concerns. PR-URL: https://github.com/nodejs/node/pull/28526 Reviewed-By: Anna Henningsen Reviewed-By: Aleksei Koziatinskii Reviewed-By: Rich Trott --- src/inspector_agent.cc | 8 ++++++-- src/inspector_agent.h | 4 +--- src/inspector_io.cc | 13 +++++-------- src/inspector_io.h | 22 +--------------------- src/inspector_js_api.cc | 14 ++++---------- src/inspector_socket_server.h | 4 ++++ 6 files changed, 21 insertions(+), 44 deletions(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index ceba6a59a83e4d..6a62f79e15843b 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -977,6 +977,12 @@ std::shared_ptr Agent::GetWorkerManager() { return client_->getWorkerManager(); } +std::string Agent::GetWsUrl() const { + if (io_ == nullptr) + return ""; + return io_->GetWsUrl(); +} + SameThreadInspectorSession::~SameThreadInspectorSession() { auto client = client_.lock(); if (client) @@ -990,7 +996,5 @@ void SameThreadInspectorSession::Dispatch( client->dispatchMessageFromFrontend(session_id_, message); } - - } // namespace inspector } // namespace node diff --git a/src/inspector_agent.h b/src/inspector_agent.h index 5447a68485c228..4fb544f85bd145 100644 --- a/src/inspector_agent.h +++ b/src/inspector_agent.h @@ -94,9 +94,7 @@ class Agent { void PauseOnNextJavascriptStatement(const std::string& reason); - InspectorIo* io() { - return io_.get(); - } + std::string GetWsUrl() const; // Can only be called from the main thread. bool StartIoThread(); diff --git a/src/inspector_io.cc b/src/inspector_io.cc index 91384ca949c2f1..76e481c9530d95 100644 --- a/src/inspector_io.cc +++ b/src/inspector_io.cc @@ -23,6 +23,9 @@ namespace { using v8_inspector::StringBuffer; using v8_inspector::StringView; +// kKill closes connections and stops the server, kStop only stops the server +enum class TransportAction { kKill, kSendMessage, kStop }; + std::string ScriptPath(uv_loop_t* loop, const std::string& script_name) { std::string script_path; @@ -177,12 +180,6 @@ class RequestQueue { data_->Post(session_id, action, std::move(message)); } - void SetServer(InspectorSocketServer* server) { - Mutex::ScopedLock scoped_lock(lock_); - if (data_ != nullptr) - data_->SetServer(server); - } - bool Expired() { Mutex::ScopedLock scoped_lock(lock_); return data_ == nullptr; @@ -315,8 +312,8 @@ void InspectorIo::ThreadMain() { CheckedUvLoopClose(&loop); } -std::vector InspectorIo::GetTargetIds() const { - return { id_ }; +std::string InspectorIo::GetWsUrl() const { + return FormatWsAddress(host_port_->host(), host_port_->port(), id_, true); } InspectorIoDelegate::InspectorIoDelegate( diff --git a/src/inspector_io.h b/src/inspector_io.h index 57facb2294c181..e9f94056733994 100644 --- a/src/inspector_io.h +++ b/src/inspector_io.h @@ -14,32 +14,14 @@ #include #include - -namespace v8_inspector { -class StringBuffer; -class StringView; -} // namespace v8_inspector - namespace node { // Forward declaration to break recursive dependency chain with src/env.h. class Environment; namespace inspector { -std::string FormatWsAddress(const std::string& host, int port, - const std::string& target_id, - bool include_protocol); - -class InspectorIoDelegate; class MainThreadHandle; class RequestQueue; -// kKill closes connections and stops the server, kStop only stops the server -enum class TransportAction { - kKill, - kSendMessage, - kStop -}; - class InspectorIo { public: // Start the inspector agent thread, waiting for it to initialize @@ -55,9 +37,7 @@ class InspectorIo { ~InspectorIo(); void StopAcceptingNewConnections(); - const std::string& host() const { return host_port_->host(); } - int port() const { return host_port_->port(); } - std::vector GetTargetIds() const; + std::string GetWsUrl() const; private: InspectorIo(std::shared_ptr handle, diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc index 9d649385706131..3131c6ad373d11 100644 --- a/src/inspector_js_api.cc +++ b/src/inspector_js_api.cc @@ -259,16 +259,10 @@ void Open(const FunctionCallbackInfo& args) { void Url(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); - Agent* agent = env->inspector_agent(); - InspectorIo* io = agent->io(); - - if (!io) return; - - std::vector ids = io->GetTargetIds(); - - if (ids.empty()) return; - - std::string url = FormatWsAddress(io->host(), io->port(), ids[0], true); + std::string url = env->inspector_agent()->GetWsUrl(); + if (url.length() == 0) { + return; + } args.GetReturnValue().Set(OneByteString(env->isolate(), url.c_str())); } diff --git a/src/inspector_socket_server.h b/src/inspector_socket_server.h index 42ab90ac90bcd3..98d4e7d0150169 100644 --- a/src/inspector_socket_server.h +++ b/src/inspector_socket_server.h @@ -18,6 +18,10 @@ namespace node { namespace inspector { +std::string FormatWsAddress(const std::string& host, int port, + const std::string& target_id, + bool include_protocol); + class InspectorSocketServer; class SocketSession; class ServerSocket; From d4113f96f59f4acea41a67c128ea0ea6e612a766 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 4 Jul 2019 12:11:00 +0200 Subject: [PATCH 035/162] src: block SIGTTOU before calling tcsetattr() We might be a background job that doesn't own the TTY so block SIGTTOU before making the tcsetattr() call, otherwise that signal suspends us. This is a better fix than PR #28490 for issue #28479. Fixes: https://github.com/nodejs/node/issues/28530 Fixes: https://github.com/nodejs/node/issues/28479 Refs: https://github.com/nodejs/node/pull/28490 PR-URL: https://github.com/nodejs/node/pull/28535 Reviewed-By: Gireesh Punathil Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Sam Roberts --- src/node.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/node.cc b/src/node.cc index c074ed0dfe1b47..55447c01c38549 100644 --- a/src/node.cc +++ b/src/node.cc @@ -640,14 +640,20 @@ void ResetStdio() { } if (s.isatty) { + sigset_t sa; int err; + + // We might be a background job that doesn't own the TTY so block SIGTTOU + // before making the tcsetattr() call, otherwise that signal suspends us. + sigemptyset(&sa); + sigaddset(&sa, SIGTTOU); + + CHECK_EQ(0, pthread_sigmask(SIG_BLOCK, &sa, nullptr)); do err = tcsetattr(fd, TCSANOW, &s.termios); while (err == -1 && errno == EINTR); // NOLINT - // EIO has been observed to be returned by the Linux kernel under some - // circumstances. Reading through drivers/tty/tty_io*.c, it seems to - // indicate the tty went away. Of course none of this is documented. - CHECK_IMPLIES(err == -1, errno == EIO); + CHECK_EQ(0, pthread_sigmask(SIG_UNBLOCK, &sa, nullptr)); + CHECK_EQ(0, err); } } #endif // __POSIX__ From e2adfb79b0cf2c6e93e0738c36b4107a36fd607c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriela=20Ni=C3=B1o?= Date: Fri, 21 Jun 2019 17:41:19 -0500 Subject: [PATCH 036/162] test: refactor test-fs-write-sync Refactor the code for the test-fs-write-sync to avoid code repetition and to make it simpler. PR-URL: https://github.com/nodejs/node/pull/28371 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Yongsheng Zhang Reviewed-By: Ruben Bridgewater --- test/parallel/test-fs-write-sync.js | 56 +++++++++-------------------- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/test/parallel/test-fs-write-sync.js b/test/parallel/test-fs-write-sync.js index 1873c44fb9ae33..13e8cc9fc7054a 100644 --- a/test/parallel/test-fs-write-sync.js +++ b/test/parallel/test-fs-write-sync.js @@ -29,50 +29,28 @@ const filename = path.join(tmpdir.path, 'write.txt'); tmpdir.refresh(); -// fs.writeSync with all parameters provided: { - const fd = fs.openSync(filename, 'w'); + const parameters = [Buffer.from('bár'), 0, Buffer.byteLength('bár')]; - let written = fs.writeSync(fd, ''); - assert.strictEqual(written, 0); + // The first time fs.writeSync is called with all parameters provided. + // After that, each pop in the cycle removes the final parameter. So: + // - The 2nd time fs.writeSync with a buffer, without the length parameter. + // - The 3rd time fs.writeSync with a buffer, without the offset and length + // parameters. + while (parameters.length > 0) { + const fd = fs.openSync(filename, 'w'); - fs.writeSync(fd, 'foo'); + let written = fs.writeSync(fd, ''); + assert.strictEqual(written, 0); - written = fs.writeSync(fd, Buffer.from('bár'), 0, Buffer.byteLength('bár')); - assert.ok(written > 3); - fs.closeSync(fd); + fs.writeSync(fd, 'foo'); - assert.strictEqual(fs.readFileSync(filename, 'utf-8'), 'foobár'); -} - -// fs.writeSync with a buffer, without the length parameter: -{ - const fd = fs.openSync(filename, 'w'); - - let written = fs.writeSync(fd, ''); - assert.strictEqual(written, 0); - - fs.writeSync(fd, 'foo'); - - written = fs.writeSync(fd, Buffer.from('bár'), 0); - assert.ok(written > 3); - fs.closeSync(fd); - - assert.strictEqual(fs.readFileSync(filename, 'utf-8'), 'foobár'); -} - -// fs.writeSync with a buffer, without the offset and length parameters: -{ - const fd = fs.openSync(filename, 'w'); - - let written = fs.writeSync(fd, ''); - assert.strictEqual(written, 0); - - fs.writeSync(fd, 'foo'); + written = fs.writeSync(fd, ...parameters); + assert.ok(written > 3); + fs.closeSync(fd); - written = fs.writeSync(fd, Buffer.from('bár')); - assert.ok(written > 3); - fs.closeSync(fd); + assert.strictEqual(fs.readFileSync(filename, 'utf-8'), 'foobár'); - assert.strictEqual(fs.readFileSync(filename, 'utf-8'), 'foobár'); + parameters.pop(); + } } From 4cb0fc3ab150f3f60e6d100ee7dd83b60c1885db Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 4 Jul 2019 16:20:20 -0400 Subject: [PATCH 037/162] process: refactor unhandledRejection logic This commit prevents a deprecation warning from being emitted if the unhandledRejection event was actually handled. PR-URL: https://github.com/nodejs/node/pull/28540 Fixes: https://github.com/nodejs/node/issues/28539 Reviewed-By: Joyee Cheung Reviewed-By: Masashi Hirano Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen --- lib/internal/process/promises.js | 10 ++++++---- .../test-promise-handled-rejection-no-warning.js | 8 ++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 test/parallel/test-promise-handled-rejection-no-warning.js diff --git a/lib/internal/process/promises.js b/lib/internal/process/promises.js index ee54594ba3c66b..ab833776070449 100644 --- a/lib/internal/process/promises.js +++ b/lib/internal/process/promises.js @@ -199,10 +199,12 @@ function processPromiseRejections() { } case kDefaultUnhandledRejections: { const handled = process.emit('unhandledRejection', reason, promise); - if (!handled) emitUnhandledRejectionWarning(uid, reason); - if (!deprecationWarned) { - emitDeprecationWarning(); - deprecationWarned = true; + if (!handled) { + emitUnhandledRejectionWarning(uid, reason); + if (!deprecationWarned) { + emitDeprecationWarning(); + deprecationWarned = true; + } } break; } diff --git a/test/parallel/test-promise-handled-rejection-no-warning.js b/test/parallel/test-promise-handled-rejection-no-warning.js new file mode 100644 index 00000000000000..14b06affb73825 --- /dev/null +++ b/test/parallel/test-promise-handled-rejection-no-warning.js @@ -0,0 +1,8 @@ +'use strict'; +const common = require('../common'); + +// This test verifies that DEP0018 does not occur when rejections are handled. +common.disableCrashOnUnhandledRejection(); +process.on('warning', common.mustNotCall()); +process.on('unhandledRejection', common.mustCall()); +Promise.reject(new Error()); From a24ab56dc5119d456f7fe354a6ad558f304b64e2 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 5 Jul 2019 11:45:45 -0400 Subject: [PATCH 038/162] src: allow fatal exceptions to be enhanced This commit allows fatal exceptions to be enhanced so that exceptions thrown from an unhandledException handler have the stack attached properly. PR-URL: https://github.com/nodejs/node/pull/28562 Fixes: https://github.com/nodejs/node/issues/28550 Reviewed-By: Joyee Cheung Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen --- src/node_errors.cc | 5 ++-- .../test-unhandled-exception-rethrow-error.js | 28 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-unhandled-exception-rethrow-error.js diff --git a/src/node_errors.cc b/src/node_errors.cc index 298d84b4f362b3..0214521144c607 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -448,10 +448,11 @@ TryCatchScope::~TryCatchScope() { HandleScope scope(env_->isolate()); Local exception = Exception(); Local message = Message(); + EnhanceFatalException enhance = CanContinue() ? + EnhanceFatalException::kEnhance : EnhanceFatalException::kDontEnhance; if (message.IsEmpty()) message = Exception::CreateMessage(env_->isolate(), exception); - ReportFatalException( - env_, exception, message, EnhanceFatalException::kDontEnhance); + ReportFatalException(env_, exception, message, enhance); env_->Exit(7); } } diff --git a/test/parallel/test-unhandled-exception-rethrow-error.js b/test/parallel/test-unhandled-exception-rethrow-error.js new file mode 100644 index 00000000000000..a4d326d9839d71 --- /dev/null +++ b/test/parallel/test-unhandled-exception-rethrow-error.js @@ -0,0 +1,28 @@ +'use strict'; +require('../common'); + +if (process.argv[2] === 'child') { + process.on('uncaughtException', (err) => { + err.rethrow = true; + throw err; + }); + + function throwException() { + throw new Error('boom'); + } + + throwException(); +} else { + const assert = require('assert'); + const { spawnSync } = require('child_process'); + const result = spawnSync(process.execPath, [__filename, 'child']); + + assert.strictEqual(result.status, 7); + assert.strictEqual(result.signal, null); + assert.strictEqual(result.stdout.toString().trim(), ''); + // Verify that the error was thrown and that the stack was preserved. + const stderr = result.stderr.toString(); + assert(/Error: boom/.test(stderr)); + assert(/at throwException/.test(stderr)); + assert(/rethrow: true/.test(stderr)); +} From 643d09961baaa034056e2e4db2450dbbba48c9cb Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 6 Jul 2019 09:39:36 -0400 Subject: [PATCH 039/162] doc: document family:0 behavior in socket.connect Now that family:0 is documented in socket.connect(), add an explanation of what it means since 0 is not an IP family. PR-URL: https://github.com/nodejs/node/pull/28574 Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- doc/api/net.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/net.md b/doc/api/net.md index a12ac4ad3cc258..f1134c0492dedc 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -618,8 +618,8 @@ For TCP connections, available `options` are: * `host` {string} Host the socket should connect to. **Default:** `'localhost'`. * `localAddress` {string} Local address the socket should connect from. * `localPort` {number} Local port the socket should connect from. -* `family` {number}: Version of IP stack. Must be `4`, `6`, or `0`. - **Default:** `0`. +* `family` {number}: Version of IP stack. Must be `4`, `6`, or `0`. The value + `0` indicates that both IPv4 and IPv6 addresses are allowed. **Default:** `0`. * `hints` {number} Optional [`dns.lookup()` hints][]. * `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][]. From 2205818cca1bd796536a76c9ab2b51ed8f64451e Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 6 Jul 2019 09:49:58 -0400 Subject: [PATCH 040/162] doc: format Unix consistently Update the API docs to always spell as Unix. PR-URL: https://github.com/nodejs/node/pull/28576 Reviewed-By: Ben Noordhuis Reviewed-By: Luigi Pinca Reviewed-By: Gireesh Punathil Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater Reviewed-By: Michael Dawson --- doc/api/child_process.md | 16 ++++++++-------- doc/api/cluster.md | 2 +- doc/api/fs.md | 2 +- doc/api/net.md | 20 ++++++++++---------- doc/api/os.md | 4 ++-- doc/api/tls.md | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 3dc855f604bf76..c822864c657758 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -146,7 +146,7 @@ changes: * `encoding` {string} **Default:** `'utf8'` * `shell` {string} Shell to execute the command with. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** - `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows. + `'/bin/sh'` on Unix, `process.env.ComSpec` on Windows. * `timeout` {number} **Default:** `0` * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or stderr. If exceeded, the child process is terminated and any output is @@ -260,7 +260,7 @@ changes: * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is done on Windows. Ignored on Unix. **Default:** `false`. * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * `callback` {Function} Called with the output when process terminates. @@ -411,7 +411,7 @@ changes: * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is @@ -666,7 +666,7 @@ child registers an event handler for the [`'disconnect'`][] event or the [`'message'`][] event. This allows the child to exit normally without the process being held open by the open IPC channel.* -On UNIX-like operating systems, the [`child_process.spawn()`][] method +On Unix-like operating systems, the [`child_process.spawn()`][] method performs memory operations synchronously before decoupling the event loop from the child. Applications with a large memory footprint may find frequent [`child_process.spawn()`][] calls to be a bottleneck. For more information, @@ -729,7 +729,7 @@ changes: * `windowsHide` {boolean} Hide the subprocess console window that would normally be created on Windows systems. **Default:** `false`. * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * Returns: {Buffer|string} The stdout from the command. @@ -780,7 +780,7 @@ changes: * `env` {Object} Environment key-value pairs. * `shell` {string} Shell to execute the command with. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** - `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows. + `'/bin/sh'` on Unix, `process.env.ComSpec` on Windows. * `uid` {number} Sets the user identity of the process. (See setuid(2)). * `gid` {number} Sets the group identity of the process. (See setgid(2)). * `timeout` {number} In milliseconds the maximum amount of time the process @@ -858,7 +858,7 @@ changes: * `encoding` {string} The encoding used for all stdio inputs and outputs. **Default:** `'buffer'`. * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is @@ -1255,7 +1255,7 @@ can be handled by the parent and some by the child. While the example above uses a server created using the `net` module, `dgram` module servers use exactly the same workflow with the exceptions of listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead -of `server.listen()`. This is, however, currently only supported on UNIX +of `server.listen()`. This is, however, currently only supported on Unix platforms. #### Example: sending a socket object diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 83a541d6554b13..8036f82e797617 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -589,7 +589,7 @@ The `addressType` is one of: * `4` (TCPv4) * `6` (TCPv6) -* `-1` (unix domain socket) +* `-1` (Unix domain socket) * `'udp4'` or `'udp6'` (UDP v4 or v6) ## Event: 'message' diff --git a/doc/api/fs.md b/doc/api/fs.md index 62c07160f1b356..d74570af037542 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -785,7 +785,7 @@ The times in the stat object have the following semantics: * `birthtime` "Birth Time" - Time of file creation. Set once when the file is created. On filesystems where birthtime is not available, this field may instead hold either the `ctime` or - `1970-01-01T00:00Z` (ie, unix epoch timestamp `0`). This value may be greater + `1970-01-01T00:00Z` (ie, Unix epoch timestamp `0`). This value may be greater than `atime` or `mtime` in this case. On Darwin and other FreeBSD variants, also set if the `atime` is explicitly set to an earlier value than the current `birthtime` using the utimes(2) system call. diff --git a/doc/api/net.md b/doc/api/net.md index f1134c0492dedc..396cad36ab18dd 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -17,7 +17,7 @@ const net = require('net'); ## IPC Support -The `net` module supports IPC with named pipes on Windows, and UNIX domain +The `net` module supports IPC with named pipes on Windows, and Unix domain sockets on other operating systems. ### Identifying paths for IPC connections @@ -25,18 +25,18 @@ sockets on other operating systems. [`net.connect()`][], [`net.createConnection()`][], [`server.listen()`][] and [`socket.connect()`][] take a `path` parameter to identify IPC endpoints. -On UNIX, the local domain is also known as the UNIX domain. The path is a +On Unix, the local domain is also known as the Unix domain. The path is a filesystem pathname. It gets truncated to `sizeof(sockaddr_un.sun_path) - 1`, which varies on different operating system between 91 and 107 bytes. The typical values are 107 on Linux and 103 on macOS. The path is subject to the same naming conventions and permissions checks as would be done -on file creation. If the UNIX domain socket (that is visible as a file system +on file creation. If the Unix domain socket (that is visible as a file system path) is created and used in conjunction with one of Node.js' API abstractions such as [`net.createServer()`][], it will be unlinked as part of [`server.close()`][]. On the other hand, if it is created and used outside of these abstractions, the user will need to manually remove it. The same applies when the path was created by a Node.js API but the program crashes abruptly. -In short, a UNIX domain socket once successfully created will be visible in the +In short, a Unix domain socket once successfully created will be visible in the filesystem, and will persist until unlinked. On Windows, the local domain is implemented using a named pipe. The path *must* @@ -44,7 +44,7 @@ refer to an entry in `\\?\pipe\` or `\\.\pipe\`. Any characters are permitted, but the latter may do some processing of pipe names, such as resolving `..` sequences. Despite how it might look, the pipe namespace is flat. Pipes will *not persist*. They are removed when the last reference to them is closed. -Unlike UNIX domain sockets, Windows will close and remove the pipe when the +Unlike Unix domain sockets, Windows will close and remove the pipe when the owning process exits. JavaScript string escaping requires paths to be specified with extra backslash @@ -121,7 +121,7 @@ as reported by the operating system if listening on an IP socket (useful to find which port was assigned when getting an OS-assigned address): `{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. -For a server listening on a pipe or UNIX domain socket, the name is returned +For a server listening on a pipe or Unix domain socket, the name is returned as a string. ```js @@ -241,7 +241,7 @@ added: v0.5.10 * Returns: {net.Server} Start a server listening for connections on a given `handle` that has -already been bound to a port, a UNIX domain socket, or a Windows named pipe. +already been bound to a port, a Unix domain socket, or a Windows named pipe. The `handle` object can be either a server, a socket (anything with an underlying `_handle` member), or an object with an `fd` member that is a @@ -385,7 +385,7 @@ added: v0.3.4 --> This class is an abstraction of a TCP socket or a streaming [IPC][] endpoint -(uses named pipes on Windows, and UNIX domain sockets otherwise). A +(uses named pipes on Windows, and Unix domain sockets otherwise). A `net.Socket` is also a [duplex stream][], so it can be both readable and writable, and it is also an [`EventEmitter`][]. @@ -496,7 +496,7 @@ changes: --> Emitted after resolving the hostname but before connecting. -Not applicable to UNIX sockets. +Not applicable to Unix sockets. * `err` {Error|null} The error object. See [`dns.lookup()`][]. * `address` {string} The IP address. @@ -1112,7 +1112,7 @@ server.listen('/tmp/echo.sock', () => { }); ``` -Use `nc` to connect to a UNIX domain socket server: +Use `nc` to connect to a Unix domain socket server: ```console $ nc -U /tmp/echo.sock diff --git a/doc/api/os.md b/doc/api/os.md index 88a06346828ffc..80c97e84afb14d 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -164,7 +164,7 @@ The properties included on each object include: ] ``` -Because `nice` values are UNIX-specific, on Windows the `nice` values of all +Because `nice` values are Unix-specific, on Windows the `nice` values of all processors are always 0. ## os.endianness() @@ -239,7 +239,7 @@ The load average is a measure of system activity, calculated by the operating system and expressed as a fractional number. As a rule of thumb, the load average should ideally be less than the number of logical CPUs in the system. -The load average is a UNIX-specific concept with no real equivalent on +The load average is a Unix-specific concept with no real equivalent on Windows platforms. On Windows, the return value is always `[0, 0, 0]`. ## os.networkInterfaces() diff --git a/doc/api/tls.md b/doc/api/tls.md index 601eedd7c9bf92..4b8fd0a4943ce0 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1207,7 +1207,7 @@ changes: * `host` {string} Host the client should connect to. **Default:** `'localhost'`. * `port` {number} Port the client should connect to. - * `path` {string} Creates unix socket connection to path. If this option is + * `path` {string} Creates Unix socket connection to path. If this option is specified, `host` and `port` are ignored. * `socket` {stream.Duplex} Establish secure connection on a given socket rather than creating a new socket. Typically, this is an instance of From 6f3ebb8787d2def925ac28a4a6b8c836e42e364d Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 6 Jul 2019 11:08:30 -0400 Subject: [PATCH 041/162] doc: clarify http2 server.close() behavior This commit is an attempt to clarify the behavior of HTTP2's server.close() method. Specifically, this makes it more clear that the server stops allowing new sessions although the callback may not be invoked for some time due to previously existing sessions. PR-URL: https://github.com/nodejs/node/pull/28581 Fixes: https://github.com/nodejs/node/issues/28214 Reviewed-By: Luigi Pinca Reviewed-By: Jiawen Geng Reviewed-By: Rich Trott --- doc/api/http2.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 6be7464cc6bf4e..e75618b9abe086 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1748,11 +1748,14 @@ added: v8.4.0 --> * `callback` {Function} -Stops the server from accepting new connections. See [`net.Server.close()`][]. +Stops the server from establishing new sessions. This does not prevent new +request streams from being created due to the persistent nature of HTTP/2 +sessions. To gracefully shut down the server, call [`http2session.close()`] on +all active sessions. -This is not analogous to restricting new requests since HTTP/2 -connections are persistent. To achieve a similar graceful shutdown behavior, -consider also using [`http2session.close()`] on active sessions. +If `callback` is provided, it is not invoked until all active sessions have been +closed, although the server has already stopped allowing new sessions. See +[`net.Server.close()`][] for more details. #### server.setTimeout([msecs][, callback]) * `callback` {Function} -Stops the server from accepting new connections. See [`tls.Server.close()`][]. +Stops the server from establishing new sessions. This does not prevent new +request streams from being created due to the persistent nature of HTTP/2 +sessions. To gracefully shut down the server, call [`http2session.close()`] on +all active sessions. -This is not analogous to restricting new requests since HTTP/2 -connections are persistent. To achieve a similar graceful shutdown behavior, -consider also using [`http2session.close()`] on active sessions. +If `callback` is provided, it is not invoked until all active sessions have been +closed, although the server has already stopped allowing new sessions. See +[`tls.Server.close()`][] for more details. #### server.setTimeout([msecs][, callback]) TPb$HmEmg#Tao3sBXsmGqFe9WBxc+=w6 zBa^mW+plWY_KJP)Pkr}?mp{Gnv48yIx`D60^2rfk_rf)6>eIa+UDU7UK!P!8`^Rz9 zgB$uC2=hL8Nya?`e}3sz+X{}kK`~SP8DsKC=7rk-mnBosMoxEn+;cD|gUi|FQAEZyOkPB4Ng*L&HmqPv<>z*JGnE{B`m#f`4++qUZ>{*{C+2I1Kb|>kr03wYZP#A>#-*cQ|6tAw2Wmbn z-!ydpM;CvqvU2Ag?f3lO^{W%Z92qCCe|&$(;U+K0p6^ z^@$lrixxD@JAdgkx|HV^%8;)Fa-~0yiv77$( zdQr%U%HfYr`QV37zcl!*i6>fi4m|SPZ*N~S;HDXK*5CJP{9_@{9Uqx})$4a1d*%9J z+u!;1+F$Ou;+$DG{CfYTLx2DJZ)ePmIhyrQ*pUHK=f#e{HS1)?)eGPJPRZ~?TM90^ zdtTG)>%YC}>lrZzYCoJlaLTj~-`jjwWblb2kL>^W;+eyq^!#!=*0gBb-}Zg-_A}2d z*!z!Xf4O%3+U*t3je2`Z#gAU;d)^Zl{3W{V+z0USLH9?zd*ZDh-;yxsZ{uFPKkC_A z*1vw~HA61Soj&Iq#*bfr=fzik|IArX>wtqzT=mf3&cvjTd%YVFL-Ru`~Gwuudd11);-~9d$LNl*< zKJ(V*_E}f&KXK)GOaFW9!akSf{MUt7w{7W@^ycL|2kowW^Om%S{^y%d-TQ+nCl6k; z;IV0=_J8pu(qO4*5Z#U7j$I_*Dq+g@$z-#_i*56}PG?gh)9`CVE`%%F%-?-b1cS^UqN zjRzv$9X>Sn%0Ha{)b;CLIq=*!Z=GHKQjOEY2WSt z?9?ZWke2&8ZwMXm-0{`dZG3sx>elyeeP`<*)=nL;tmdNceQoWZH&tw!o4qXb>FiP8 zyZ@@3(kuVlxH_fJ{f*zd`mV6^&F#1SppS85$Q2*{^nbr`eRx#drot_xOT(&Xb8n80fHCpblVVghLMpdQyefLt$=@34D`H=z(ctK?Sz(5DNl zyO6U2}U9UhH*SQa=v36^J}-4yYB>W=j*=z z2p>4;cEkVFG{{vup^?bg~OA92;KS8S}`N(tY#vA%YF3SqchRDKl6SQvmX1g!7? z+#3U+sYw724*GN1{SH$Bh%7kBc?L=}U~v&Hmjf1yp(YBIJ_PIoanMLev>E5Q^sBCf zAB&9uEQjGv2LIxs@85B9Z~L9|e!2Wl|Khg~`&C}H?T7&!Q2VA|zC97)^R7I;{zc&K z`CA)npOVzhcf=mRGXiSy4zCeRTz(Gl^V0oX?!Ji@fM^1k{ZIOvW)s4ILODM(V=?b1 z5rUo>Xg_S`f&CW4kL6l2Ml&vl;jfA4r}z5B?=$f3SAEaxkLnX1Ks#ap``DiK;->(N z)OGa8tFGMqLV&(=b3HwNt(&cD><*{u(yO*QWe_JYF_I&8J+FMzdjuxHjj(UPz<>j| zf*@W^&zu9!z^>EmL^-KOP(Cl0Bj)pE&?KbK2_wigzQ6@5t^x*SY*hOgIrsfI{!Y&P zqTPP+2h99_0Qm?b*uQqf0QR9h{RLkI&PBx$z}yU3%u)tb6Xp`fS6dm_ROo zhctAzE_`AnC3>&^*J~R4JrFqHYd&Izhi zr2>L|KR^?MYKM|OY@Q2NyWcls24to|y@!}d3_?E+i_H1uW6r;}x19gpavV+)5x?OF zj#7`$x25y%;=$ZD@bmo7u|c$c?R8s^zvkMl=dZ7KFFk&I?c3Hjx(z0-M9+cvfkN;T zRi6pq5(mJ<_RkTWmGFpu_ZA;u&HKf~@NV67qLPc0SC?M>#~#6}A1D#l);e@uwQ3mp zjCLs-zR+4HE(W1-V`y-Zcp^5|W*eJp>)*Q8b-#4Q=CS9W*gW=l0ydZ#H~!Oy9rhx) zq}!1O@Nu?h|I$;y%xi0F=~Itwt$hKQ{@K>CwNL9PQITPc#2qA$6n5kGWV05h;$4Cwp8 z5Pj(@FdbgObbL6mc@I*OXDy6}>UZI1nVAV@J)Bqp(>=SpWGK&z}JM{vr zO#cOH>aX)D`lKOZAPat9LA=aX3CMwT;_CBNgY_O67wCjb) zBOnMZITo&~$w(>Lb5m-VSI)c``riWZlZ&DMqvgLyK%3$0}U z(!}MbIRLPNA9`vV4Oou}1MpZtN~CJL>=#f55m9>~#+gP{I)g`IiK`tI3)k9)B zRH$YJ11RS^Cg39lYx0nH;mKbgx?3c3s&+Z6v{(CI3y6BJ0oQzka{Xf7V;H8MI#2T} z>j${U(i{Spm1sX0@mm3tswFV682Y<2=YKoo{2L>W|D8bdSA6&D4twcb^zDcN+)I1* z%btWh^7_VBchlNh`qD)7BU@W*kL|R8Mp3cFz88Y^C_V#9^zykR_Bd=nuvnM%Cr$gi zmncA$_6{Qu#Gf+(i6@nTrHP$iK1+D7F#*mw)D~bT&6!z)hK3A-}HHS*J9{DoG2|{{XIwcz`5EH16a|X^@~r! z&~tbEs&v(CmcF3t==(M{yW7?}tD!1HEK53ZQuQA-y057I&hB@_u7u={1$AG)i(Q{u zuzZDU5C|9mpdrC+7NJOVQN718Bc)VBgR@5P$xRg_5P}m;L2e7iVlmV_0Vo5I^QDiN zDr{pZiAC0DByy;v&usWbau|cU6N!-Xh{e#qZRGqP#+?6fuV0?(D2+!o2&V0b0l4;c zFM1O0{_sE#f6V&vZbqM;X84x%_4FN^8?y}|a&gglAHBoA-En|e68tJdKsHPur|LWB z8uXK@Hj$i4>|zJZ6Ief-3mCNWU!nnU(6ONbJz7`5bzF$Fa1C$gYltvnEPx-=FpgL* z28=@v8h~m90_CeThvo!?NI^DDM32E~9l|hN48tTBfq~^XEQUP3IOqJ5A&-Clk?oT^ zS8W{Q*MI*}{D8D022k5`U-@J(^X6&_gIhUfg;F z%3aY6NSFiAO8BBFWT3hM<$M7SsbUEsfk*!OdVnH_vk%H~4=Cq3quW3`XZHh>1R+mU zu&{kS*CP8E%jJN6IR>KkEqVqFkMO0C{e}V%f z(f}ci6cpmFj6%4A0D{ZK&;WvwaJ}nM2s@=1*(mrxa;AW301;f2YssBgdX0%m%d!8n zei(lY;5X05{%ivEuX>Q<0}omT@QuIxL<|F`E3Qskd7v*@TTef*zDZA-%~D5PR*;3~ znmtd>1W-GfG8lxEi+bPX;?iTvdJF)3)*s;1fA`)0ZXSS0?7<|cK|U(lHSmXO`7n{R zZQziX`r^|!f-5lrfcDIS`a95#jTw|Ap`!W^L#}SY?0T5G1${zL5`cddgQ#}DFdL$( zB~-p5-P$&0dW(>HOhh~k9&`-g>wo#H zaQaM-n{L?L%$YxVwocFA*reyKt#`*Mr&MSw*T_6Ci5*c&d9JG3Ckgmr=x<8YHMc)$ z6kt~KJ#ptU0@=k6*!2NdI7c9m+Vs8zH~?gT5|DFcRTUF3+Bvfrp|=Bo@yC2Xmr$7;DS`;5PhhwSlPqdm$T` zLMBjRw?nWI$~YQm=Tm_NY#Vc)*z6wIQ_P?;m7GhTLtjh*UoA*gb#eVAt3N=>NPv_| zgkws!2Z2Q}He+zfN8;9O!;F0;BAql~T#mzs7ya^uVEVZs52uJ|2?Ad6U9UUrC3`{I zgJN&M=e**HSX-xV>qNIc4*ZRqTipw`j&;xK*68Y@eHzh;%CE!^4eZtLOc_jsgjCL# zfF80aK-rj6A!@YYy)f}s|F6MAWZ<8_uW|!I$?((u5L}WWnoxp)8dsp4rXjZuY?Gda zkV<;4jYMMv6dN>V(yH%%TQPu~O;3SPy=2$K!B*0@AS#Ks!+8vp;7MJHZkj_lGZCeZ z=)_vL_T@x)^2m8-bGH5$^P%U@y#3SoJ#YSt!(O@v-Y#nm;Mp&KBJv2j;u@OGclhxe zTl7D#Z{Z2EuG=cgaU@1lwQG=$ngJfDGs4sOeafI}>no|NHeuHj5;EnA4J3^v5bdH! ze>v3LPl-(yy`=lvi{uOo0IGzTb5rL(*zMC80FmZNeCqX>0e{eZ0r3cEW5W$3NNBkn zF$}8;huD_m9*B(YL>85qd};mOt(yRr>`j^j-$Zb0E)D01)yxj(dw?c-M05|LxYs z#(zGuvooZW_;LmcFG~jSjW2s5#va(b60_Xnk!zdu&o_?I*UV~fa|0_{?|1$SOqJ&pH|MFu5mmLFm-m9Jn0ErpLslyL# zT|wV8Tcd|l!a4wIU2gS5{ZoEZTUb(d10Eq5r(mICr5+~#|*58wA4g?@q*P&$s<|@szF&riO>MCT*1rQ@YaZCsb#0{ZY zip1}Og;W=>49S@b8VXD?9oKIds`v6%Nbm?mbI6Xv^@So*`&{=Hbf$zxG#~`;h*Y=O z1gkC_pPie12`FkL4wq2oMg|CqNkP-cuzLVGGw+UheDCgZ@iRAHdCf~caPlq?aM_pz zmplXb#$Wj=0KkcBiMCJS@mp8WkF0Of7p4x^5KTc&kE~M`$t#3yAiIysYp+eYt7ZcN zim!z`>Ua5#oR-i|z4so(7y}6jE@8Q4to2UKEu0}H@V#=_;P615v|sqR%Q~)P`B`>x`v74aNA&%Ou|^2C;GVxG zHQ9bXO0a!&xvmgwtYz4SBYV@sCI{w8s9(fm0jI?PK+d_(%zr=cm+zbp%YQjb-3KLK z;#Z&l`Ukv*FNQWd>;ZhdEsp>tY|e;&Z+;)U48Rr zH56Zd+dBUQ*s^zQNGT=e z2S~Ut`K~#`KVuGPdO0}}AwyD)EfUa6eq%fm-c((jT|$=`d5nQYF*l&T8QRO$+DUfd(4HluR!%BRQVCvzt6bQ(Jc(mORXbUmrS!;SY4aO4*4967cQJom zX8utI=KH+>XSMUp1XMh-#%NT$5FynME9@2sR!}m)>{l{$!?n-pRl98 zc?qt8kLE*h2i86^Wd|Ax)5#&h$4Z0?^#~?m_ny2Wk>;KOzyg8foM56mKromH^+It4 zDjM&mL^J`U2T*I!gG0jpO{!*SF~N zh;S37k0+RkjOMDEZgu$O9|!fn5WBb6Q`Hy>mS8aePQ`a-L^)2%NF?c}Fb>hv+oYlu zuWAJY(BK~j_(_v!K(mocq+a=K{&$tK%*HUJ4_61k!T*pAgz_rGAD$_gIgm4>Uk;iC zp_m?C2!H)XC9eaen<_|B1{*QK- z^B-g8KL9Yk`g<;okm8G;0X*xaPXZV;TgS~C$LN3GIF2tR!l$I}-t7GQcxdN#lkcr0 zwp@Gx2N^yw#~1Z%ae$KVUx31h1xPrtfPX@_mIqLNEBCd}Q_0>+`*V5&Bq6B50VLQ* zeD>@j_Iw%;JLxa?^P7i6C?Eod?h>bkF#2J{*pHLo9{Js404Y%*N?|4hr{cSMhU)WQ z;hYp;PoFMwgAjM%-J&Z!3vTXDZ#$Gc1~NV}*R zz&F48$pCPS5`J*=1fH4_J}Y%NcK+k0sQx<~fW&`K&=~)6iev`P$~R{c6m7v=fqr-) zB9KvmJ_+{mCI~9yk>RXh0D7Kj0jxT2boCWUXm+pH8mhT$-LXkx1^EO}V}FkM=4~AQ zT#=@gu{B~_h&1P1YX-z~e70af?17M+G)X3M_e!eTdp6d77gNFY0}lj3O(RhZQn-#n8A1T!}v$L%f(Aa z9$yd8-miZ5#pfxws2IR=UiM`0h_$s%e9qc&eE<3ezJL-wnbQ7_GZ2>Bin~mR5L~q1 z%c-~N+0#$On_~hRCFuI|eVV6X>Ous{^+N*)w&sAj_kXy%T>OW5zx?BlQhzbkCcG%J0iXGT+tBC7;t`)a zJbdE>{`ajb@m<{-zB0}BOX~aPs_+5;k_!fL1v)_p>MqH-)=z?=_Jq3AkJ$4LEDTYF zx(kqG`?+Jl#PcU()1(%q&vtRcFo5{6GKjE(qn%!|dOD;`6@(fAgDv`|&N|eQbxW0ethTo(yI@WVVKHUO$f8 zDB+8{8Ll|UM>h4}e813R4(1E7{eTbU6+q8d2cn$7$-4^y4$dNu zr9kMqTp@e=`5k?=AA-6AQ;7NR^x7Cv=v+{of~UX?kB9>Z@l%aKKsMbqm;mrO0`hyD zSRvBP*}MTO5PUf|0BAgQ{joC%WUR8wuetmjBdMBr9ewWscU6(&+Z42K%TgT%m;j!rg8Y3<8ZWAFYTr3Ah>{EOV8(=^){3bx6 zo=Y|1r&IGh1?eA64Vr*|W=>eS?<##;AkZ-cJ-&hogfd=kn=nQ5MNBhRN`FAm_%dQ| z-}{tcz-)8%7Qn_J{B9V^)?!k4WK}uvR<#ezd&Mdi_o28fsfj00TYeRDP;(H@rnh%4 z=g8akz+oI2^mur`05TXk=l3jz{&)8JUK{W&{brKmn> z2q7+oL;C8TB*#2Fcvnik!OmBcKn^v8@0mdht|?)`F#v~@!)XX!^84$deN>xS&4Z)~M`JYw zsBXLFF@-qJ2E4P`j3K}cOz%0KlYjIp@Y!GcnK*kFK6!l;&)>L$zh}0IFGw9W4hwzI zOs{IUOBk*d2Z4p-GDQSmPmp31(U)(&0}Aj#upi0PV7Zqt6$KL^Oe#uEqoxKF)O(RW zmT4Cr{hxf)`A~r=e_b5E!~;NyFLqX#gJ}kWzPEukrn0;7yAzlTCLsNICxuAXi1wR? zkecnoy+*T&r~}d;=EIPFy^CWeA#^J|AGx(vkBMpJOc2j0WNsP2EOi@+=rLXDK6`yO zdn6Hk=uh78o)7)b@ps{G-hOc2f&(MNXZ*y|0AP)XzKAn_*KCuYdg6wB^|5R6ir|q8 z-I|xKYPKc+_}>6D7{IDT9h2nZ+b?3p%7n#z0xc%M!h+*QBtdHsRn+_UTJj#T_Ms(V#6OoF!B#Z;^C-UI)Eftn}K!xuR909)+KVJJ=`X(czg z|CvqiXji~K=LU6?Qcsa%Q-nWkdj^!~OEyL*{Te1=BB0)X{nz=Z_-rmeoHAZ;ah zrpF{&R0*|+QbZ$%kky^KPffm7|BCXh5K2u{jS9YO^X?MD&I5FQg$av*2{f-QLA z6c)N1sOMWHpZb$S_uX=BS*Ugr0)KRbddpYwsxFq8zanHz4K80xaVYksgB0ujE*{iVw)~mxOgK zXnCamfb@s)HMW1w(A|UE`^Y^cz)0ft1*;$d7zpUPq{%(fce$QIUrh{Ch#62UqW-l2 zM$VZoCQ6-xA9bhNjpKZ%T0n5M$--2QodO;p zn|^wI0f4FS-eg zaRsBUrgV18rr_0Xk!Y#Cm%}L(MOSGXtN2JZpI`wg#pp}v(ERVy=`qmH7=h`vzA5tWkq)QLsp97LSu_oWg61KNa?BZbZ=b>G-JMTNL~{Ut^2o1zt(5_-3y7&}%_{Pk>g+Xy zRj&By#vbH?iricy@Q?r+qEUkhrFu~6%o`A~g?4UCO8cllmB`^#(e!+jq4eUO-;Dn# zo%NIeYQU`a>(CWa_;!bPhySPNT4VP3_MRq7MCOAr4j-p-K_~ z`drL`ACKw~#lBGHBHM&d7Cko%!8K|Ri+hqu0YQ^C4%cwr0KhGFjs%Q$IPK6{W^#^k z%00qQ4jAla$-;gek(XzgO5-+y(R(4x(_nS~+@TOh;a!Dct^jBDkTO8QO++JEwa#sGS>&0$Z&AP1I+s?B65tDiCz$Z5y(7yDzyWb!jD1Zfdy$Ya7r|2rJn0 za7<#wyS6o9dO~)L(99gKaWwlXIKWgu(YE4|&Jp6Kr9{AD7;t897t3*I-{`{uJOcaN z_LTvoVgp`Fglqi#s{Jbxlz_Y>?49huhgwF_RriJA0R;}~iUSy)kP#MVz|!bNyOdvMqA?Jm<32X$d z`4qL+WV|-wAobeZjP3N^4tD#+s>ON@fNQbOZGX|YGM85Ybfp{+l-$(K(#Dao+#xKt z4?_!(@v;+?9%QnTU3O|s4Tc?8|2{)K3sz^aLF%Ohm|UxvK!Zoro>$uc6o%M73c^l7 z3U+yFwd=H&zU$L3Oyv~<2)6IJp5Te1ZKh_oK%Vqlh`hxl*trwCl*(4&0YEdH!L}5u z@5Y;Kh>S(;dmmKfv>l)TdZA7N!A0?z)*>AWGw`72N=gs&;wI9~&tBi-?A|W=aagrl zuL5v2_POmd98UmfjfmF7d1I5$<_@XSW$1z33$6uF{LHP2Sw_gn?ih!tTCK|Aq_1rf z(xw87CNaG~BP*fGCZ)~t)%^tI5X=2jBy96)Hkw3b4BiW%eXWZBXG8a6(GYK|M#H*w zwRu0gH*W+L=c|F02boh^QPl5+BO#^Y` zb3sL-1!Xr^ejbz&xd15to47>q2>Vk7bnbW8?ez|@O+lA|6 zH*xnR&VaNckVxsG4P{J9gE?(PcO%l`r1c(tLj$o<0aHN}gM2*``BSw6qg@w`=e!I` zh1WEu^;bNK-9_ka%o%DN@Ed@g*6-Mx&8 zCxW<{bz6XjZCL3u(*VqVhNvc_4VD@H)J!NkC@v69tA%KJRTz?%m*NZw{ zK*5AW(S1CT(kguX?@=R2$qA-t?wcDFgciA%z#v8w<_iY|)=m^$oR|g9>ryqJ?Zq5B zi#?3&&CUzc4qo?mZjL~3bz%|-JQC)oI^_Psa6hVBdK20`|LX4n@bl+*wcUU}a|2e5 zfjAJV&m;_3k;ePmrXw*MkyUdFZPiAfWRYaHQE2HSXcB7M%c3XPdUP9W){{Nq0}(ZM zud#lP?l{|HAWAUJOl(GSz0Y^|K zgoe?OnkRrWq1cZln`Y&34b@_pks;E5z=c`;u^ogLpqW`eVJ2Y!DcD$0-?6#{??uGz zTVrHojqIxkn*1ZUs6RBweXRLOeP#gOp7zJ>HwpOA4Irv&CtAR;ya0UAZNQ#!*w)*C2EC4)?R){%C zh;MyPs};a2r^Dk1-dv(c>9%E=yQ$gnY{Uj3aDx}wh8O~eWRHOIIf8fcssyq2L-!kL zSTK;;`igWjph-qx-KVbw8Z{cu5v>OvliZI?YZ5a+#+n6rci>~HrOb2ojL3kWdI^Y$FS^yb^sQRts?uP6bgOkWYluQ{pWxbBFVHiG8D5p_ve7U~>e8f~L z2}4YWtlEd+3(XYE{~fBWlAkQ)$aW5j3Dw3Qbbkj9KdNL&V{Rg>w7!Bw}W}Vybwz7IorW#0B!VKa_DoD$tE+~r3B7|<(Urs z{NS{JNq|oYRCbklDuU~g<4_Gq2tSUIoZO`#gJq#7mHIhlXp)XY_0@E6`bnHD1aqYd z$SRphsfz)Sm?aXem^i4isMp#STn%BnMeYgJ2hxaCC83TMG=sYjMeQW#Y?7Z$TI&46 zqUw}62#Dv83BTi5N-VhP5Q*2kanTDQs!6-gfb?ZdrPTyn|4zF~&SVId8x?_fYH#OU zK|dF)9V`gg>Z5+^YUkdfM0z+6gx$MlDX;>M!j8O#qo_TMWj1 zS0V2P3idk*{m#MgCUMhw>&+|zj$RABhFzjhEcu<&h$6|YWVo0Q<|U9EfUL!aM1mxz zb#P!d9=R?Aj7G}9&#jHNnb>lSl0~73?VM8a$7`so+W02p1QYNeT{+d_Jf;6j9E4b#Qzr`oO-2>=msg!D=l~3My0OTdJ@|@^%ujZhW;GT(^N5j;7BDY6k zJ=wc7iArG)dynOr`f z?u&P10pnN*F$YOrq_k}yQka1qLoN7e?nROO-kUIWISMl>f1^sP$h82AsU>VS+2e(u zcM;ZUXHb0)<$F!qvc$=71c_a6|H+j@^iozsBRr@fT5WSQc4_V9!Qw6+b%4I8Dm1&RbJ`m0KqwgP2GQj!;rbz zTCaoN&)M=^JIrIY&(6QE_p3*uVvT73s-15asRzMbmJ+!!!rX+}h*&l(p^61~MBZ;( z=A#LHsIrd;L>O~4A(%-4!*bLy6FKHg7I`Mwrp%Z}F>RK4z}fk((+m!`?QcO4wMVU~ zgG=T$Q?r<-k_`ZIChXqRVZZ08@E&sNx(uEw1_0&cg7WK&mDF9b?`Aqw#GlMFP%NTI z(CPw2)g%P?O1Wwlo{5O+8v}@J!t0z11|dq8XbS=OGXJ(5R6>A(XCNbE1+r>RtJDun zDJH_ylP5%F;jtV7dNc}-BA%c_b@2#-uKV{Qpke_#9SDgcVS{4nRC;4ID{>P6)nF!* z3}co?_zjb(|B3rDmxKd7N4yXB?3_Jx;Lo>x)&Q!i+NPkwf=?!@tVlhEWw_P(9p{9_ z>4VY&yhlJZl8W-vQ0;YR6a&t5sLuqLeXpNge`3=IFpvXN&}c+PQ$`GGl9c!fk-DUA zBqhRRz?MiY$b9=cfbyO|phgw8WEiW1XP?DbB2Cqm+J9a;+Cp%Qm4tcN7(&dy{7oKH zD3^{oBj@5F@@lo0z+6FOE60VP=0~kxG@B?@I4--!3~+?cHdl7C;ROU>41lLZTox^2 zcQMEIVsEms>S4Bh)&Qu2Ri>0i^cUu$B67??Tma(YDznQB?A|lOIMV$e#C?sC801i6 zrqRJ&Wh^lqmymL2*?=rSpds`D7_7gi+#x0uW%xP*f)fbyBkr6!ZyJM@E{7LjrI#iW z5CBs0zG(SP7POfGVk4`IPF3TwWtW^&KshUarbLP;)k7AbzI*nA0D()z-~bpJfoNcu zL<`b6-n-JD?O~8%)pe#N%>CywfqrQI9B#OQFYgt1JECBI*v>_zGc5?J^9J0rdlvl# z&i1>nw!a!c$DqzM0G0Y)^HX4lOgUR;s`m7$jJae9~~%Fh6VAL;2#-Vu;nE%$P>Q71nLFgTui2dzB{6k zya3r!Tr>kj;LT_6sT!Y+NJT2@f7znt0^YM~uC?RxT{ga0rScQZpPzFMw!LRC$(8CB z6N*wHIG<26wee${x-2;mxm+n`Xs$0pq7BkkVT{ER>4m*FKeR71MzP3~bh3avN~SWj<4mnh|;n z*+OUS%+{Vx3FzAJ-5Svs(#6G`aFR2nq-Km=2b~*KO+|~0)RVm?BX~xPTr}bhPv`lj zV@O_r$@MZ8ZvwT6LZbe1W(?zqdv?xZxJZD%um<+EH;n^WL99*Sg?`qTOctC`r5U9f z-Z@aI9JG(~SI~Fox0jK*aVEDfAiE7g#gA`RdFdyotO8n@g?JTmXWj;f30SJJq!X88 z>R||jZa#>OuaY~I4p}+(Ht(#&$ngi2Y<^RY0Qk8+e4)=t4G6XhyTVLkl8|^q*cghp zp$Ro7ft6XQf1bRmU;A@AvTIOL!?<+K=~c!!HE0Q@J$ODLl3xnjc$7cPope@*c4o0# zLVhnY>F=j(f11Vtcu6FaTc_NCXn;2l7@D11uPdrlIbm@oVOZ>6DRHyM6NqPUwDVuP02cMH@Hw>uXg5xfAscYFkZuO zRIc>oH5pPb1K1J0Un8n<$U`$)v&26r!zDU3K|-rSo}(_jWp z?d@QBh}nMk)efc}fcqXmJ~<(r!-^1l6<__kKq+%YK);*N@1DOF5Hh*k&_zP4>rJBn zvLp-Dv&j0e=x0J=0&B>vvkBQ)j4e%PR`>!W;&5wsDs~@5%b=F>WkB+5Vir^e?Bm~k zNUmPWl^MAB2#W%A=Q?oC$-^+mYJ*oTL5~SBxzDkJkYE6$;GWl1j3LFy%8<^S>bQjH zc``ir_8AcbHIquN^SFpyW*P~rIg&^~*1{x~s|h%najzNZ0ak=s z7W5=Qqs}pBfJYQ9;JoHj#E(c4(WBG3Jpr<~+-}0c6hx}q^2Uup-!*~f3(O6Yr(QHDcTa|_Z*?|vTa>#GMA*Zwvi$Q|B^9=|zMv#S3o28;m!99{KF}L7kT&sv);tqfm#zBrTiV)l(d zbE?5Yu<+h;i3|Ug=t7cfZ08_#3p%jSETmMgg@r{ZWAsux;wZu#T4AT;<~W0@voK7? zV&7emaENJ7#*n??4rcq@B|8V7 zzD>1rJ_$I;fD{Yy;lrjO#8J}9rR&e&Kxpnldo~T5jitH(XZub}4<8&9Uz0m!WpIsp z29!sXU?7mG^M&b}dcr6~=EHpbQ%94bLG0zT(*m@Tk>ZCuc|?=;(FD-~B+|bKFOKmE z^33yLiL;Bni_-1aw*B83sHtJ6ZPlXk_4$=5*?lh(I(Q8j$Ya?{AP8qYJe~C#@K^-TY3t_ zm1~?D?!>+32THM^CeBVHi?2mLvXTChB;wz zCVgC5K)dIj-+s&A3M@qH5of^xSZ#fuJD_Ck>harsV0Z&WZdKq;Jqr}ZNP=0K09|Ft zx;Z9ipF)Y=KbM8|Vx|4-OLdt7E&q2}f3T#XX|RnaWNsLXTM9MyKP(qAf)!20*Y`K1 z!3PyhO#vHmO~)CU)$*-dOAJSG(HEdOI(G!vsRLUhfj49Kb*ltM|Z@VBHgQ!-J?&Ta{3KT*haMpeb5tQ$_C(KVjux-UAY2<3naSaA>%^#HMq7yvW_)Ge>V0MK8l%zrb#-^1Djgxft64G5~V+sx)3jfo?RWGU~N$aSO?BuP@_)h6qbe zzl%?ET1Qkze34Lg_=INZNk(BM+@Lj7f?sv-a!a{sHo~vRavEz%GLEjmdzos{UfMa; zco{x7flMX1W&1Upp?PoSa`5h2>rNQ9Kh^i=Ie?f0wLh3-ZPRcgX6x$}H1FCGZh4bg zv6h1FXJa%jL^v+EW}e*~`ogAT&N#WZt!sp2k?Jd1g;X4V+uwBHpjkJ>?swnO3mkEK zZSZ?T;)?A@1`w6RblGa^YtJp!_4K>XE6 zTR=kReGXc!0DR@KoW)uz22TMHd937qH%6)&sMBGMM^%5n8ZV$dfBar!2o0PE9B$ztC<8}Tw zpachK=H&r}Xltv(dz&*Ac?OZ=p`DUhu5HR~&xw9!O`j&ad+^H!h5LAD+ zVaS9b(#nqkZc*T^eI+ZN5ON<$kg1a*_l{YCj&K`70<0E*h7iMP6XIg?{s?xAm~45p zjNCxNGOp~r0E+gkSX*uSbIkX5=QCqxG1n@;No+3Rd3662e_?JHy6taCumG0WUrGi5 zsyj&8e#^~UGr{%c-?HAPbhO;*(C^ZHf-W37miTs4;SFji%*iwX8;ma(W^dX{NMjya zh8(%r`w&yYKcc8kCaEo5+5Nv&8vL0<{Cl1<)68F0I@b4Q-Fa4U6|Hq8T2kYQXgBeQrb}c#fTt&i_0;=~oH5Ei1s>mU z9)TEsy!yp37~6|I-QYvgx%E1?48#Oz^?{IPeSb{YeQpN=0@}Z_P}_H004FwyrxAbB z(P|K9f)yzJGLRVkZo+c+zJi0QWYSvw_JUmsj9d7V6D(LU4r%pr6md{A9i-?VaUu4mvHL04+WNmrNK!-${JH3Dgb2;lHMy6(?lqHE^n3q%b~~iVlUYD1VWcO zeGaLf%#+tMz{T{@kS92TN+jl-co$fO@ z$clL+>r@Hay9n8&eZ3JY@Fz&OJf@5K3krZG)A-6iS`36MqY#ysW67~LYS9)a1;A?M zQeo0Wt5w^AYY4FXby8RA1(2NBM9u}8bP&W;@`l$QKKo(&C6nBbvU)5ApfU+@J;DVl zxsE*Y5;3LHXRdJpG9R`}QmfU(EI^rx%o*Fuxi}U9lw%&dkl-m{Qb`#S2L?s8KxXuC zn09)Q*ucS61QN!)LgQ{#Px)QRZjw*Xf`W~Ppmt#m5#C8ScOsS_q=-WKh26ySba6uN zO|cKfG~L7d4MZWk1Hq~YY5zXdSh#-m0uTep8ZkW~e!x+jdoHJ41n4BFwKCT*z|gzT zsNv;`c}-0x0orcs0BpX-2_z`<4o0xS>(u7tF% z7mKAAhj0$6m{rsPp715l!cs#QyhEcVz+4I1E$uW#YYm-2r}+nJQ{@u-Hz>D~quRQCWTda$8rehY64Z9UN75OZT-RAVzbd;#aj*D)v%D zqV-(&Y*GWjY*E?3M28(e``CbRLPV=6nd)rw@6~GiEBW`T8K|vRpNvc;H^7i}Pe|*# zJ|P=HktaR&3}Z5UkO$2u62J9b#;GO(8lv~}wE|p|`;Sfw@bM9?M@Oz=FqUJlHU9n1 zL4rxh*rVo1fm!%bXhkDu*7!9Y02edB17ISpXEUIGeD3oUuNOh~VVaP*#h~@QPr>$A=?B2t1)v9V62SDHCqR zLCkF^+lZ566gnZI@jxQr4D^@;<}|x6StMUIWR&Sv#!^N+QRRL9z6RulsXW&Yjwn>x z#hFf2%7UxwuIVF~ByP=zQeR5wfcqb~mi)GBRsn7CF?@AlUl?>mMh9P{RdNt=;cTws zF=w1z?m;3Vfx@gZ9HSya&f_#Eq0Xf+(>hCNJx7V6p=y2XzZtN<41iYs<%j^m0Zs1Z z_~TwG*k`j>Tl7}dSvO;OC`_PRXLRdct*Zo4?QU`1i2YyaDo3-!E3lgOtHY{v=1dlM z9wvb`j;P7zX6kW>=0jQJq+ny~*Ef_unjv;qg6s~&I_I!OS;Lt71y^Sx-2g-m+K}0bVg~zl-R`#*&eO0oRQ{g0@lrkB^JX{ z!;)p}UFyoQob}#<{3nu<;mH^i8RKn%y|%W2Y?gYijK}kB2VW1MWm}D%SYDVTo~k8S z*efethj&Q^JjHkcwoOJsSneeBdlZ6$M0%U*jW9^F&!I%AV^!Cji{gXe6xz9aJh@Ix zeNu+N4*b(GHQI>ZEod^ePR%WnkE6xW&ie{tnxqCd8kZ8RJ6~8t>;E@=B9gw*s;iyL)nVWGA)zhD`qC|Hw!rMjX{v)A1g7Nq^!j4J_An0b+#ot zrl8)Q$oQRPj1#`tUf~vGpr(aDs`vP7E2Lw|A zmB@2K;tm2VDlV}yHkhVsKp11I7@T9RIE}fC-+d8jR9iXb z!vs`=a6ke18#eZSdk=XZvJIF|DfVy7yY+m1V+!BOSVk^PAVwz^;$HMiEUQ~dwWE5H z+`FrLDXKb8DFg+H)Ytq3qA>Tt^nqnjPNF~eu^rIffUY%I4mvRrL=S3KE+cLY23RZs z2^ePI)oj(iDnoJc1k2roWz_;&NTS>_Zso0jm&6JH5Z9m;2lXYui&RhC>B98+|3&35 z6@`kjlN8L8+yX`h91~il@aYb}PV&nXi{qteOHO@uT9nQ&O#PQMTV~sUGt2R0(lxw~ zh66K4gk7bo0EkY__TCG1msM@SOI>DY7;Rfxt1aGb310CrY}jvMEa!dmKQf3dq5) z#wl3UhWIA;8Hf_SN&-sOpCQyx>F3o~4|a*_yEvOLEb2?r3c2UttSsXf6-EMw#!wAN z#ux%;Rs`*cO`jwmKs*k54V(#77f~o$BGcm+bR4@1I(cZh)NeBw9+B-rvUwIHTEbYp zh-Y66OnEhBItK<-{o*y@5a+d^UqJlJ2M%`G8 z8Ne8_3lj#g7zd1;ON@U|J%Ns7hiNmB#6*#_<4}ejo(UCALQb??pL+oN7H zBKPpmCh9w}zA>!I6B9O4-cZKKBl;Bk zhEN`fY=>Z#9O6|bz||p?`>m?=7xwuB!SB9owC96!yb3Mvh{}RhP0D=U0!Rrcmo?Cb zZT?X=@l;z`q`!${FQs#KriFMH$lJno`!Tn4Y*(I|o#?`5N=F@%%tX3s!}V}ic=C;g7)DjI?H4H+kQroMZMH?t)favUn^H^44DM4+izZNa%wFuMrll$hX1HU{VnIL znog=xXv`TYl{w3tC%~ovqSB9OW?aubh$ukdfQy30kWz2=vx05)4aAXn?V&|!R_t&i z+mV&{0rG3vx~QhY*;5%iXR~%{DZ0>@eX9{b&Th9VzyMV*Kq3A>c9Xh?ZML7RboWvz zo-Y^yv1uu7^M+6`P?`)t0J=9oaPL*=-zLJC>F){FNmNnT*#643ejSK?E%%b)=rs<= z^RJk*5r0ag5rP5+`guxZJM^~q(B;CIm=!iAcIU@)GBbwCe7bs{R5c?uutiO)5;GxS zs=4{H8=u4p$hb4uB?D0)bY|Ji#28bXqp%{ zN~T&05j5zhFo8N(PAzBmTao5aQ^S`{&tneQf+yr8p|e!RFZN!llauRn7U`S}Nc8Fe z+p_YJs49i)95Wc=;1hty*ATi4VC6@hwGbcyvoXViwflx|) zlTaUwAWL_)Em+wl*i^zyVJ4?TZ(*z1-CZKlI6Jp9e-R(o+_EyE3W0u@R3f2>)6o@TV|@r2P^V z)mg?X#Fv?CDsH_diH%M0etE#W8diTV4voX&ifLd(ZXGxP(=)yhNL96kSxVJoKA>caWlFJOa}?Om+6xWOMt$Z6*Ss>!zTfm=D^Ws`*}U7`VH-teAXMXwSJ8<(aeVjw_0v z9B5hYGwZq<8Cd!jH(q2KP!mDIhdUP@T$p?5U&Dq&oC6M|9Y{qWNk#Rc;w;B9Vyu9Z z(7H}j^Rl|CF>t+B7=f7b&a7Z9g9SwC-(%U=;*A7spB`}b^Z=>WOWKv;*2T_80scIx zk!@B`OogIF6y}hM36M%$xsUiOL$WMHNXc=whxN%ntIB~XT<9Yd8;R@PfEqL5wKCtR zq`1lglnxXJNJ-}fa!l0SY_|ETAQi<598Tbqew0Z#*OT5WFtn;hcN=_*KbuW?pAUAc?K)%Bt#Utsxg%FOz1I|%K?k!5LCl)1kRq!*f~2w z+<)SeWsz=J5xaZbIBV#A#cle7G=ya#Xw=@(l9N z1FWrQz{mWU))d7#PX420{9L-)#3Z z1V=b5usiS353xuf5wNp8;LNF^)(<53Ous_Vl{sXQ;(!u580NG0VK$Z6)dYd|={E`q zFh{DWCMSb6wAhI4XIBFDs*3Ni6jqYHA@WU$-i-iYe(JKC-lG@LCS$lH4OV#$5C9EESx;`qg13sL$0D*}t-oHF|4kPm#uI{ijhqqzdpj9tPL3FQ z)nMJ7b!k!fRF%$6-S385GAqmHFUWy1IHXvF16!14HaO7X$YaB@ap-E&+H^W z!#o6{HB6X5BuY{7z0Vo`Sfm0aTrGRe=C6);ge&I_(>j!Y`&3_zHjJpc)G74DZ7Oo< zL)2m+-ZqckC+S$fHPW%JRgt>MU900HuN4WiAuyYEhHAT0N|sMiiCxaunc{Db0YH29izan+N<{C9b{sa-#aT zjTzWJJ>tx%!I=>rl~19Fs2-F1R*!)IfUMVx29S`lgm0QAA-Dlh!j8ooPv#-#m&u*DWnro$bFNuyh6$up7QbxKr5k@FGPOO}(xyE`xH6931ABT#71g2* z2>TI@gv0&pooKeAm+UTIp;i0MuCimqSbY=z>l2*>OiZbU{bngq zmh0HFY7D|4Ef6TV_toergaa`F_Bjw}x?F?wVR7=v#KV3AX@L**7@VuXh2K=PtrlF{ zVmV^I7($rp${`c5m}i_lnQ`I-VQoF~L{s1ExNCG?3FawkThe?0<6Oo#WL#MvKp04t zfFi{-T%eHRAgsR?so)67(U}%i;f8@Kz(kW{il&QO&4E$!9+b4%>}88!gd;!%1ltN^ zR-e9tj!ICP0ZUMsMX!6cs%x0DiR z%E-yWhvjN9kBS9Ew!@HIFN134Ry3vdIC-3e3`=oqJs{bDq4@&ziTWJWaHrbayNQy~ z`?yu@rU(Qo@w#Y0Am#&D!cprvAPxQrbpz$SG%@vUXtA8H?=5&h%0mgxkU;UepkOEQqPEiB?olliyf zO%0&NQ2?M&_s^^MhD}JnsXnVOX(soO>-=xUZ90v$INx?~8bAZc!Gl{KxB@G>uP;5j zcPJ`rweyt#2vO2iTF9BPyVqkFA9%>*_Spfa?&)>dC0Y+og7c)Lmu=`N#XPf}$DZgb zRG3`#p|G-xX_09N=0xy#HuS^pM-~r>J5|bnn`saiPgK{TOy``ylLBUCvc+v>3}ni2 zg-J}-tp^=lbRS^MfC!pyoEpN^1R)qGDHw&1>QjHdu0g%MN2Tl>_D@0X|6v-67Erez zPf2zJLNKYy*Q_?ZW(QWYNNfJd>JqPoaeA#bg!(M`q7DU~5Pg_OOcw|lGmsZj3A=o@ zpp!-`)EA`)bM^c0?G5OcEO~{a`u%i>dbKRs<}zSs8XoXZ~V*vJdZh&GgCNfW6|9dm!^%~i+nb~P#Bs1 zBuIXSrbxS}KMC*Ey#Hz^!2nL3sxc%-6_&Zl40(N&soVt5}_}>#p%TR$mf)cg2->qg~eNIUHzbxBMiQYef z_A@C7K2@8&`!r}nQgukxXFFf86t7xaX)T*{m8dQ8=ol{(xR(@suY-j?0{?I=RmyWIlP23 z-+$Cn-1+tH!nRbSkaL;ARb^(5l3hop>nOTH$&skJ38m7njLiyxj&&O_k2kFAW(|z+IeSmT`!j-=JWe@ z``zaw5HQ~xaO&>tZR0kyKQlCWbMLAdIH z;H?sKpmCpi96(1x#y~_p@S4M_S+o*WJ~}aSmQ}#3SDUAaL%vpk+y_qbPy4ZVam3=_4&k`Ljya)U;h3HNQ7n2dYKW7u${6JW7+qInJu9hLnnv8WVXyk6TE zrrw&RZ3LSzu3&!XTJX$+!CAHkj|PaBtXvm_sN}6iA%R5N2Z=^zeN9W9yD>QPMu=B` ztAC~9uV^d%I4XD<%v6dR)3k6YRMXKg@X&#CQ>KK}PWE}WgE0XVmGV!CNc_#BcR$FR zP@C3%Zp@1M(|kT)xg7S5L6+d45hw3ipdUs@KVVh7qw>$)}U903uI?miK{!+aZyf z8bUOaO2WE)Dp8O};N$Zds$nCgR*P|usWOJ*ga%B&M;yX5fwH$?t~f@nkD`>V8p4$P z?a}qM293c*1gtZLJ#5?IP+Dcxg7Jv zsT##O7Pq*{RF!vxU}eLd`rK$ItL88(6AZIx49~|Uh|KcZk^il>F=q^URM{2gCIE}A zMiYG$ve2axr80#T8rAu>1JD3q|HNLMsQlcV+h7CmeKd`&zrG)_w|oA;-?>`O#VvU9 z?&Y~3ISiD8M2Bub;(!MK-?9?gSO`=cZ_dX|M0=gBAYOlXfy(pi8@ zed0!2i_+R>2F7Kr{Q}{4Wv$}!3IJeKd%ah{GV$ytt%hJxjYf#_yq4oY?ipa-2-7i+x~k2rr2pCN<6VUl-$SluVMny zhYOY8**Sl=-@QH#l@Q@mCwnaBqb?|QS9(R+qx~8?AOSO83lI)Z6HFuUy!(33Q8RWT z#{zP~l#3PsBa&i2$L=QTyN|-ECR@lAm<-76Xe;00XeDSC5xqQz{C9nrI z9Rdk8Z(61yxJsyIM3@lq>bu#RrfTai$6m*&)r*}W7FkpbABF=R!B$&fvOe~y?LP?U zzEDX1Y2S`J7>L{vQ$SPWtrm+Bi~0TmfA`krdjsyddugUevn5#hBph57w~7PQyno$* z)Rq8OW&yy}8I1p*w0e7L0a5pRFx;u?6h3UYAtaS{qL#Y(_O3FeB~`iOG2s>B`);** zhc||CsJ-oG^*#li0|@UIQM4FS05+_om==I%*S`{I9jnaUDv3-*3+TsDu>`MS=-MC( zycOp#_q?_sY0&%G4kQjB5Pd7b&$Vb4b71KT48V9h#L@IwIE6__+&Fe>G0ssPCfHB`2uw3Q~BK@T; z<|FRDb6G19lQ9BO|0HTr%YfIt1*Kw83z~64*(N+Ud~!Nz-sUe;KtZBMti{cpc1jK1 zMF2|`2Ipc>*5nz5x9uHQnp6W0Sb-i5_OI=jgGv8E)8JLisg>mH)|^Wlb}Th$J;CfE zy{_2fwZ1^SLGaD{sKLOU$<7#Z*;{aRp8qN^kD|t*W}1;`sT+7PrvnQh6>LE0L+g|Z zCshED9pRI$0MBacgpFg_-G?ub^p`e{j5DW~*x7c~f=K{2QU6WS7p%bJ6R{AeU;{B( zg^h8zK21K5p6Aybi}Y7%=-vm6kRp))%5H);z<@u|3|8`%z!nvsf1jf)+&;B^E(>1meqpjP@XY}$u&`BqaJRViBGD39`NHn@a3F5K`_q=oj63hz zE4#%43ihezPj(gxvCh$!k-(lTm;lG6>_Uy|v8>Opb!R;>1CgQ{SVg}0S^)YkoJ1F* z5AHZ>eEd2}k&>1D1ZLlG`g({Rj~B+0R`f4gN8D6n8lV&_4|4&RY!7t<0bI@jd{d!=z|v`)v{j`Jx_2Gd#e-XaPbEM>C>pLih%ChEbDQ7r|o7S zWZYNqfxge!-R&=^>hD|5jO{Z$w$JoP+_@s25M&PCt}o%gk;XNG&@ECg?OR+yHGR`% zu~OyNIkqJvjFzOj@CsYl{P#vMT9AXe@w3Yx&%8+>5!ECneRH@p4#8=Qa;^{W^>(kX z2xNZzrX0Al*=3$(K0-neiSDF>cM7NxplT6;?M0A95PW3?ZVr}Xk0B5GOi87_J(p-% zHl>6KP`3LxN~-iyw4GT5480?2lshp704 z7l?%63U3hNCZ9fn&~IWYI}JOVUtEeUv3syh2*2HDk>Py*9C!y{630SRMN)e?e?5Dw_x2`+Q_OXI`b|{xz;*raevB@uDde3@L9A7v z;;Lk&qCnZ%nYp?Jje(kJ<>L}aYX-7qWnhS*OVdyQs3eyY&*hfv#}Pvw8!t&y6Z1$Mv%Zr{BM_)X z{w6W)<(Oav${3R^Bp3AwpllYgeWs-6UJPv*GVZ!-j-hwNQ#1Hf-ulfzRCrnjp(YGD zCjs?#EHGf4rVXIhc+h}=I-jhiAe|D<35~tFBId=s=QQ}HYa@(^u z*aKpmzxT^&&B0)H*q#xAXzR00HIf#Xl)=V4fXM|qhvd}va+P5iv7A|ZUuMRcmR(2Kk_~k*ggVg{$lCRSJ6LXD)8UmbQYlBPVf0!m-yx zoQ+=lrlxR+^jq#32P-Ij@!U+2Z+3mRA+s%^cr&2&CQR++_KfLKFOfadgPS8g*WI

ZAm<<|ykcVVa17laKsNGRxt~B$SH~e^ z=j`FD{%sou#@%-MtCy3pe8|$Fl$E)N}&B9=~Fl+|~HlB!8ihEG!IZF9P zqHy>dY)T#OMD1==bKx*v!|*e2HUAirG<1JJy2a3|2T6*Uc*csxgW)xTGPfCgNmK;# z>Sw}~G5D{+$Z}o-6xDNQdpOW||MO{!#fZD^nu8%b49@`ACZHBl;$EsE{XEI_*8(CU z5h89FTP1u$)5-oefifg4K;Mf=n6SdosNzlNDLb_rty_W=2LS^fY*}#kFxmtq3xJiw3f!LdeV?(rJsg|?be?S-8TZ^h$6}r<2%lZ`A0aNO z_Uj}$LA3<4r(L+PifdK z+hH~C!93B!pTmyfuz4QLcW#gE&(rH0Dced)pUdFm^sT&@-N$bp5;2OX-m_zx;&u$x zfIPziX$kXt1L_uIk0Fnt%22L_MEv*^Zy?xMFM1QeHyt&{mCNTi2Ppdm3h*~Fwoe~i zs_%ZazR&pBox2!$L`nFOz#S|2X{Ey~rabWsUW#dH@M=2vr5>ivF%kxVT){svsXSkG zWC_LSgn1@&=jKa z?#5`pL(Lc+i(&>V7>b`RP|zSevHHTFvR3cS94LU`0$Eaq$*LDie;{EvK33#XNCsN@ z#AG&KV2q7X%LM9*4V!a`y`S$659n5h(Q;;-Jh{YtZ$#NrJRygYV0GK)$_M}kr&>QQ zY&hzyQx`}@js0r#>TOv^_&&fY(5ySBLG?L%>FE}5V_&O{E`EDJ8JZBV5Q5)Ð!k zB`~<$zhDUEp}3X^3j6HAspnPI&N(adl7|lVvY`qf+rM`~}^o!9i z<_Z?(5!l-)*?yNw%b9WJ%mUjxy}8b+YcQGs^4Rj5?Kx;_zk!CT6+}nC^o!qIlqP~6 zg-~5T;``5q)I@cTt}WJ(+qUMPk6zOuICa|NjY>cPFAyBi7bb1okaZTsK2C|?ZS(91 z*4HrzKp;eQHcdpBSO^QQcbm|y13hCNLi8j!s1Yr*KUXW+f;~naAxf3azuyY2;sMo6 zxVQs>eDgrxIV6zI8K4!ih9P6;%*C(zw{095ANxqv0%W`JiU*|J)hVe2@7#rD9{?1v zuuN990?6%47#EzJreGYRoKgYp=6LFAWkt??rQGD~?#OUF8fCzjs;zGEM!m}R*A>t&GWNDFJ?SqkXU0cAwu7;^7=DrZiK)_Ua=8F?VjN>Ab4B{EFa_^} zuD^@Eu!2|0v=#y>*??ZbRhv>#b&EGwP>*DPIw%23pF%7}JvS9O)T(f9H3{MNsk%PF zMI@Aon4U=&h?L4ZlaFzPnyZc`4gVR_F( z=B(wu?{8aD`Idh5ysGw(IcxEZI%DX%6toeKGce~0Udk-`z8TZ$Hh@u- ze&NAcnXw&{u;mbv>`f!Gc?!ir_<@lqGh;q1>z)Eu9jbL}CR_p~!NdfJp_>tmQhQVl z#o~Wn%ttJCFCF0TTrFqD$L`$4Ffb^0s@|IcUDS68RrOnrrCKJee1|CqZu+b*H}CEz zsuzo77VwXVbqjUYu@<5WDnAtoD^k=4q-4%!k$A*k3DLx=$0Y=CTvhx74r`EdS5yO# z#xa94uPlQlg*A#R&|?PGns@FxxtDqPShbGmsW2aZTb@kSdLeKLc@B?6kevSq(n=9g z33s$(L(kYgb?K`9ZCfr!+;#UZaxNerYGk0q1jt?i zW}Uk1K=bT7c&a7&h+CHh>C|D_P*jM%{?6H`-%3@HnE=ToEMVWOmrlVb^0n$wOce=% z4aG$&3AxDP*ccjMlu|O6US zbu?m9?hVHr#N_!nh;%;my2+>?Rm=pv$h`oZDMa(NV`V_YQ;Vc2cHZ70mian}RgFIkPrXB^jmV}6NC1LpKj#C|86Y?WMk%dJNehMSSKH^R zz+UZlE3^fz>f9~&M$C6EKj|-R95X(8=QakZBJ8Akk@#b+3Y6-6Q8g7{*omWFapy4v z*sDJ=0A;+avGZk3609&N+&f`&Z3#;6G>lk)qq_Y($Ek!aV55!$5%I5Q1)E$>7HR5Z z5oB9z@rD%*AT>!vu$TzvhO}SHAQjPPuL0PcDuV$Bb3)7ul6gj9B<7K63z51(oo8DN zJ(lBOjMC*QWX|_H#^C<80}KVW1sQm}sQ$~0?bG8W?e@FRDPZ8#={dG{dt_TBNIAK* z;iMQr2>_~7=Zb-No+@)l=gOsEBOW~$MFaEKc$XCcA(Jf>xKJNAYs8xm)g?Pc2{D)e zFhcW>AY*8Q=ludF7!c>tZ`o-_vI5;O17Uh%Hvllsser8^5QrU);>-kzlMq-yodC|n z(C0djHXoMg^Qf*sd+v)p9atjN{J%Ou1&uD#mNR3%ld+s%KEU6(+Bh;k`mt?{L-hy% zRxzlG7YPe4A;hCr7Xpk41Q4)|>~oofvS2-7vYHdo7cZDyo5t!1&Ih)HC_FZz@~X1A zs*G@zG5Cq8k%wYW7kntIjV@rAm;P<;fiIw;8GZ-~icXz{*_x-KQHUn@QHih8-?)wU z00suK4{aC+EQh6IhTfjr-*&KWK>xuRfBk|l$$0;dx1HTy;Plx!#w^=}F|vgFI)oW6 zCV(`bpiW+E@WZ5!76eJ&*Db$Q)1d+Ay=ttHb#AL*N+#_^9VV(SKw0pf@bz2=@Ok?H zF{VIa3PKH^g}U*GEDO$i2mHPOhT11b?dPz;oeHJQO;vtp5>R`Ydqy=Qf{)RdlG8x; z!&NsQmRdc?7c99nA_3dyS7}8Uhm5_mBgTGzALL?gIWspX6-)6(E|p^h~R_f*z~(AMho) zt>m`=ZL%#kH0D6JD0Aw!+TxOc6JRHb#Hr?vODmT+B0e&pvphzqH-m9w$%DF-qL2VgOy3 zFQa?65`Am*))qq{a>2vwj`=_#h%dc<7a}*S-Z2?hrmX(6`T$0-YI;y)OysH751?Kz z@&2Jg5!}7mD&dIM63h)z=~3|$M~toa#5qv>FdS1r1^F!&LVgJ8$KD*M;}mt>V z7DJE4(CZj4`aq!2oLVLm+xHo}XEO5T3;dt6F*81P*AABbU<;V6c!**F^>{sFBDrIy z0>YW!FVy}63>=iN#6flSm1r#B2PQS0yDiiag!h8oyZzgi)PhGPuC?)&`@6ps?-9=f zOq1de9VnA#$x!Fk#yK$A{afJ6VZfsA%h(gI+*z~Rx`lcvg&tk;^y1WjhE2* z^Wg{=`dl_nr-}W&fB+g6)!t$Od<2}R`61d5UgdAxgv?H*_W+(rSfA@3={P`f zm03}EPVLLbBfv>twr2>Eo}C9F8*zeSMxBjY*oGTl@UpC!WHNhP=c0OP_R|&U+fcR{ zUo3}Vz8v-!KRXBpaI*f>w%E(qy$s|1Ki+oN$sO$N4aEZRF#)wna!}g>(bbUZqWv}t zb(O|lgNN85=WPqeDQ;VBwsBNhQ^r4@`dJOf(6|i2OT4bo22t%}8}cwNhUK^zm;2i9K`?;#1Nb27+zm^{ z-r4-1a{Jv^>-&s5@7~377@}l%wtNW)YO27v1u54UUN-d_OeI=FWiXeY#`Y6wNpJmK z&c)OWS%u!8v$>&%UNtd?YgsXm?u#kmeQ>PA>Q!!P?xnyeTKnI8`c@3Z&(mZo5r^RR zED(n3=Kmm8Ix{}Zgb(d^-v_|}-UHx|0RS18@6>qz2f6C+8xe5w%pP`jm&l{l|8qDr zRBo-@SjCwD8XsWagDbAV0p$L&g;xO69MKUFvgS-yb4YB8ra*Losr`M9cRvN*BprwJ zH(@T`Rj3zx4?x?ox>9YT{2{>;d|L9<#E1h|aMjIQMP2l^8T%6m)V9p|zjP`6{(kqn zuMFVjU-xzZ*ah(WMEJ|)B4ckmV?5ISCv6xq?!0FQeQ%k7zSf^swvn6w)s!7Uy42f= zw1Ts}SKPnd@KV&=M6irar$@6NnM2N5smgUUxmhzdjV`QLc(T9jT^cm}+u;@(`C-i%nqDkCHExeitpNpK7;c`k2Fn8-dV z0Ey_`1p3+Kxctk-a&7-QuC3em9sxZ1wogP#_-Gz+CkT%Q;}Z@57`@~h5wKilY;Mf3 zwYgTeoQ5N8L$}2`4*Ix5uKk6~jdq}y*}|u09KNwT*7l=dp=ScHxPIT~q_h^qYhf6K zG7Y&GIa~c)1JuK$VYuuu0XJ@|MG#eUjs17u{dl0)Lm7~t5ubF-?NjcP)JsHv-gVuN zUAeXOHc%RW^M`+9e>!&UKp4PZ-SK{W&Nn}Ly#5jE@83O>-?s|$F%AF#9EC|lK~%##3f(SCVLtVEQTGM0mvtRu2V(F``RgkCie~`k z83=NXix9Fubc3S4PV8(o)i;J!p! zYenVCK)Bx2Yg^p(D->BlzL*WWgb0@E|OP~5}cpZ)LlJi%Rg9*qb{i9XP!^qN^p|JRp3?s32Mk&`Fqcl^NqOaAHe z9bkLv3vWS6bi;BlKc!#hui;F$=8=yWfoq!^Yk1VduEEtOj#boJ;F;ofW7$newp4?u z`sFP7U}95!7m&XXS9--Lh?pix$&mvewdym}oAyZ%*r&?&RRDOD(%pfH?MWFxKb?J?3 zY4&CYf8?zPB=vo}pcvg#e(DLJgijon{M>%QUkT9T^T_*;Y+QnknQ_xYuf)TyzXls? zGoy8g#IxFdWvxdT+Gv#~i?8ex(4+)c%JiU>U)-^S@`nhus0nGY%~G_(BKyoCvPkg#spMc9UzbNW1GR0Cys`T^#+? z7Y_a1f`cfS8zJ0ag>LTm+zUUk3jk`KQ9^OOH^KYheMobdg9dms8vyEZY?F|DN5S*q z#^qzJ&XpnAzVAfzr(Ks`x4t&}(Gy!+zsA5lZ~4K4m-=BG7xZqfJ?&?2Me1;TxtDM0 z=lr~J#6RTB4}UNNg_#-GUwZzccH)m#uZ(JDGX=%@>&P{df+wJ@o~* zfD&Ch^!eG#z5Lb8_~Ja`s>2@FVYRMHc+}0;;i1=@Fc({E!v}FASeTQ_P0DC{KDZE9 zN^N2g)&88}O%!(l277t{n; z)&A;^_v7*ZuWOrJ{(1w zL-nJ3I-V^XgUSi&Zi@sbx%`3nC&4muJOy>X#nye%9*YsEXNttHzso)Y$yXMkcsurY zaq7O0^b=E{#R@cdr=7EUQPy9m5rr{axOMNzFJXIfMl7`AdP_t-i2i78*1dLpeeFly z_Cvq*o1gW}$LziFdk+rXzrXFGAh17q#ruHMr}3Dtebn~a7QM6U=nud+!I?Kfxb9v& zQyrY-@cIU{lYEcC~!q@U0$FG+}Cs%Q=CVY+Gut(wkdS7=zytSR|!m zDgcTnBO>A&AmmMSR}{pb=>7ZclbM22-ItAIw;-OzjSzY`m$4q1pFNkaS`1NhCay)d z(FrG_znaa`+c(x{|J&MH_bWs={a0`O8@%^T@7t#pbAIijB&^$Ccnb*F97o)?*vsFM zM|>`4zJVVkjDVSO^%ckP$eXUiiQ^k(0lM1$s}`-qzlgdos=EE|+=Cnmwygs|M7q(Y z=D5RLcI^NZPjKqLPv{BfHe%EhX-omOdr?hMZu`mARA6-jM)h0G1R$vRt!E*gW2M=& zjC(U@>Sb`=0&>^X>G~KE{nz!`?8Pb3n*hu&G{AR%+C@!JxBc`j0C0>mzGtyFehp`Q zR?fKMVjuT@wTIt$4L;$aSED1V9NhZ!wGn^}RhC>pTqUk4;}9I6Y`O{E53pzeQm)() zBN;=`>sZ&~{On0OxA&d-MD8>0kG#ezr!x zJ6oqaDA6_Jz{iMiH7;{}fSEC7#<7icY^~Q&2_MN9LV2ey!l*8n_<{Bpy*61fP-poD z>Fmpe`TX}bq_Dz$ss$J?a4tfaB-N_Ka2kN{2om}0U6T|DHUtxqNosG3SQJ1Uzx8i@ z2Utamhu9;ETQaEp1?T9Q=)bS8b#K~OpFMxpb#F^4^>6usi%;tNcF9Q6+h24G03>F7 z&T=pRi($c^&n3y|vSkF!j8Ayz)p+;~*J9RnDf_JLgyZdXfkpu^st0QMt@KjZDqTs&Mgduru zUR~T%qXAujkKT)+z@eHN%p(II>N@(P*)07i5#9|T-|>AHH{rV#bLq9)0bdlL>t1k6 z0`T>V-TY7Tz@L>FSA!3@#Q7mKX5iT78XkG$b-3=zE1as_NO32kI7aiTi*SYMUaxm* zZg8ndIxf_0sOLMsedtzw>vCMQ2Y)Y%?rS$2)p5hj5fkLa9jVcVO{8B4$%Q2dnaj}Q z0jx~RhbFHK8FuG*{D8rk8K)BA&(_vvKMUZMcYObETymvvE=lS6zB}H}pYe=Ode7QA zy&`o;@H4j@0PC~J{KZ%(wLI{J}C;yWTpU6!N2OVO0}#N znoU31#q)d9A*l8q_=|KP1xAIiEDEry`ju#tGYM2BKgX8kiQ=}|SwKCQ`mTVZH>y z${fM)0w0iMo)0)PftMh>e{I&id~KtOI}*u{=!=T0P~$p8^_WY zF6a4Q3`_o!oN?{t0u(Yc9(wf&JmSXdu(iG(+Y}S^L4{dRh_4qrpIqFnzL)2LG@j^zsaCB;Tr% zUw+)V4e_P$JR<`qLHu93j(&9L^Y3vLq*4MIy_S;0UF z3--@0$-4y$K+qVd*d%(vDE9)EKl`H{?6zm%VsnQ_gD<9Ota*Wrp|n+5FSMzsyzfhzU0OAijQ{N)2PBc+6K z%qs~_c!tjbFm#R^DJ|P*MJek8iQ4F8&k!;jVFMOwE3x<93>dSa`T|%oXJteg2)P0l z1mwZIJOTV_tN}CUB?BK!GkO_;{~drm0QvQo3E@k-EL3FQ-uLGB0g#Qr^OJ%lG7LYXYIrwcBO45~r3BtAwAr6ny*|dFSqzs^+4~5t}pA zl7Zw$7^?5)w=#ku5$^7~^r|$&Kgk(yoUPFUAb$P#TwcTvT*4CZ{L z&N)csi5h<|AeeXknKmF81?!N!rXeA|VupxXo>Hn~$slr{5hMC0wm+AW9zKpiT!Ic8 z$N=_0{GX8c$1$eg!CD@`;MaclTMqlxA6UDr8Gy8>{>&|)gl_lDINR9jzOG;79~_qa znS2Sl4T*r8uDu$MxZxpHQlf+aySjgqSOAG*spm)tuzdEu^>Pg4nQ`eg#{?-hbRt;)$2O!={x5Kde zUEGS2qo9xBae+vj9le zT`g9EX+1yxJ%$A{m^m}?4k*8j2tS<}f8DKPo=4y{-+9MjzuF7h9&`*q+U+mA1*xMn z-x;@3M_)J&`2JzZx8;#%7yG<016!MGc=$uF!}V8PsYF=HfdMrHt`NI|e^x5YgLb(R zk}v|F?I*tpp~j3nV+JJzmynW6|8*vXp!wdVSsHCq3CLjz zUb3@GLDqBOz{tjqmz{u2Q)p9o5rcZ1&Cito6vRIU##^}KvtabE`p!2U_G>)UcF`~L z3)OD>=_de$&9TRg%y{NF@c%R{`KH4j*SQ)4*qF`m2@kynH(z&6mEL0Oa{~%i+rH7% zMZ;HHyG93!i?GeHw@N;t>P=uM68bAms|nZZ#7Ym9dm1L|*MHJ*^QWwzI(tw4Z$x-| znqdy2f4~{D!yaGT2o@l7#b!wq@|kl1sH=%Uj23J&cY)g3Fn>RzChb(Sf|A+kk~82d z<^x(+v8cQqdV(Cb_h zjZfpX>^#8%q?)g4_N^|1_3LlE%#JaUrZ0@wgim% z**(lfn2C{Td@F$eK)@en8czc>zT!LHaM-WwqH9MC;9gqY(rmq7@D1a@Ukc_Q=@kIMwIw6MVoil-CM{SPCw$>^B}W7{TI~ zy=mcN@RIopi z<~ZV0$AP~pGk$nj@b!m1E@@p#xZ#?s@QF7(R6|}h<1R~dJ_S2k+A66n+kIIKfN_)% z(U&>8@LZoQGhnY+c-Pzt&~a4&kk$%tV;ChMh!`39E=K-w2EPr!UjUfD>^ok2*stcI zZ$}uw{b=ud^9S&m-|)%9RoBfv)-U-z%y?JVVFyH?&H3=>PynyZ_4TsFxFcq;q4A+k z9$O5)_xJn!ev$N^p-4ZT$lHGP96v^{_5-evNVzs{FhZf2h}I`?1x2(!;+|>zStkCM zIpsHvYs(LUF#O85z5cLY%O%l{G=K-#zWV2G1toO-g0JuA`SSpJ{?O+q=kajoG7;e+ zS6zum-FUrK>~U^D+uNE{s(N+6`|33{7tr688NiNfJb>KBW!tD1)m`t+1&Ti_W6)A$ zhyg*Ofe84SkvY@&n*e??)A&c3#*YFtzU*6%2>*e!BL?tswx|BgEg+(`Jn*BJi~I#3 z{Ig-fpU#I=n~(t^azX~ z6y6MZ{;?{tBK8io7kr^416p<u$2^cp~jM+!w57D1djkaVi!fjmj(A1wuMLPKmiwslqoNm^UFc_ zwLUF>FQ@S&nD}MSJ3{x*w;eHneQZyA(X9ZGIP)XsyZH+N`X9$We_760zffZ!09Rdc z43EC~M$FP|QY)}j2=dakT$E@U4h-1$QaH304H5g_^9!ur6;~L|D(?fExR1(;;u5*f zY5W~9UNlnw2Tc5a0Qsfg{JIM@otJ$(VgLu!ZhOHk35?HO?By>a!t;kEe=1*qBBcyq zeb(UIQQMDp!~hPkefw`b89S%O*{P5Aw=NfaD;VE441B|+YQ_Py z6I)w&^vyS7b8SsC1bsq~G^^NS*>lpoNg$!Ya*f9m)HT^5P-z5r=Z_oWABj5OW_ z;Kd{Qcg#2T-Z^%|@>jq9(yqLFF}EWIZ~@xWf8kazaP8jN@hkI)ugwFVHjaGdLEdxL zCERfJHF(7J*MT)P7%QUz*->+~_RSn{fI-+3Pa*;V1?^TQ^sr$JK8)BW1eM))#1ZrNj*Sz48b!Axg;0Wyh~|n=d*YO;DU%ECr~p42x>y{2IToj#nVu)AsS5yI;CIhh<7E&S{VC0lP!jxY=qJQD;*4dZll>g?X&pA@}52GDv z0EgVZ`sZ&&O1OUa%=naXz%%m5Psk&#*{}W+5w1OP0*|`kMyn#+cmX70M~iku0k08x zzK<-*lwzUkvSt0bFG5DJAvz%a(im^qle3ocYr@pWk~TB3yOsI6md( zn>0i?RN!e`eVzdTM%=y}m>k!}2q=H~oSBLLB4d2Zfd2Ia{HLFL&TEcV-9^-nUd2V& zp7D}fv2iSIoc!qc)P9lwQ6BlrIpbmHQ;1~Nb@;^Vug7&)o~Rjt&J(aAG#7BufuX{P z%L@p>KlV9;kvV^eG5+>Q!)tcBvu~d9+TJfc`;CV^wMVUKM-1R1ZcqE!Tah~4G~do& zGc5V*a^}y^8P|L~fkZ@vD>k?ADL37OSvL#CI(;D!ZO%q0k%6WrNIpOt=mRh^_%u^~ z_dvt1_q2FDf&Tu*-*{x_U##tj0bBy@winz2O7z&}-uMk;&$n^L<31jIpi2o4d&om@ z!&O&@3cvDy+mf3dp*y!9;Ozo+@0CD9UNZ8Z4jA6nQ~yc={prs?`!$C>bw}+!+L0UZ z5@_$c|el)Ep>?PlDl&NEwT!Wjhy)L)|#S9qpwAO#f)>At_BQt+EWBijb z^)Fd=dv8wMZU4fvUU%42bkrU|J7NHrXuJJIw;(0Daj}=bzF+V+^2m?P8CTt(Yd6-` z@ToUH44Z4S;I0E44&V^|L=^1(5%~-wzjsXit9n|zk~n?n=f2^{t#>K5BL;AZx7%KD z3yA2^{W5=7KhIBO#;0<|y%r)#M0n^`SK|>6c?gJ7tn}+jd5t;O65R=m3;=xw|5cCW zJ4Wh%l0bj?qHlQhVNbzPJCAmR0bJtkeRsSck9*c9-}CUt9(()lso@U^cu3ATMue-+ zg%2=*W#8k(v13@TA;QdVCmwgM6$0fC4Cwz;Pm3QpyMFQ)64G5i|Eym>?8iT9=h==l zfXk>o?dNVm>gZU%$4~6%`~!WTKOKzgSK$Lhgln(30-t#O4d{|>F`gwz2o(fOeAmFk zU-amIa*5>~32FQ1kJSCkrX4YW%dkE5g|{FPt{Zy(mgOFQ^EmP+G2=uVKhULwN8fle zt~|D7yZz{f9eF2X{M#ihUpZp@SpwbpqG!G8upjNH?Q=Ua0WQP#S8sYhzTn$GW$&&J zE`RTeYi4gq9j?v;UkSn*0UL0PzaK|jdF&WcN@Zu?#HTao4=!o()`6Da`2+KxedF)W zUc39V&pML&mt#B9050?PwJ*LE-Hg&=&JP=U{+@oGzp|Ds-vnVjQA&@x{)YaF&8^)< zUY^2i_zh0^1)0VV5L5oSuRn_7yPVrax9#;&+uv5pbZ0PskTZUG<5-$)9>-&u@mL}} zavX8&qdRwg%*_RzTX@7xD*LFk`I@AJ9@(pqIUa>Zjq0~xp@1=5$KpW z%?MKR?+xGij>8`6Q9Ei!?Wi5KqjuDe+EF`dNA0K`wWD^_j@nV%$M*jNL@2+b$R^}8 P00000NkvXXu0mjfosmk0 literal 99678 zcmeFa2XIwKwl&QB{$I`aYHI%ZUQJECnwpxAC_qR;h#ZW`IXMuF36em8oTJIffB|Eh zCw5y4UL6ySw+^og>E| za{Nb*|NXynpv;w{&HtMtN8=nha^%XT?-%0r?Rc$75$oP7M~<++<;YR7qP{O!IY*BF zuUw8Cg9lsp|LYGqN)E`8qaeNme~NF^ucOG3=+WOEJb3V5_vGGR zMC3mx7cN}*V~IKKs^D*C<%$Y?oF^(sltcze?#MvNH#IQ6;=FD(Zl~S;b4ps;pVBNT zJth1f1*e4!$`jElG2gUSl5e_}yfa!!UR>vy9xQpL1xxN}{GR5i`J-A-X}@K{U-9>U zq#$ErNY9Vl7CjHctP^b3X!}sLnP14){+O`mmA-e8_)HBA_FfK zoEBP#&t0g`S2um5y#g=rHV#~TovE|()@nWJ}zI<6?63@t|tNTi!B^{*TqIS}K z_cS?_bVd@cCQF`ZJPYcB?^x$Qxardh8wN;)%>$+4mO*mm>J_po+w$!F zM#_^XPvpgm7xL=WD_NcrBlTi_koG5|<;lxu^77?NdG`F76j{+#3N36e-g84wSNy4+ zgeJ_9Hkam0hii-F$(t7fT+p=o-_tiQ)dgRB^X3h{QdV&GOxgU2-J#nxx@B&wsB{U(2d1ho$U>Z>7kxuHrkleM;H>%}#bZH($o3 z9+vTGN96}OD&NatiB3BuSLKoViq~nWvhCq{2|XJv)%K2*Pd5*c5-WR%-@;B08#QY5 ziGN6)(8kmH-JEbIMrO%HnJ)1%SI6Ti08T@j)biKVoTE)+lMn@)G zsj+KBc(Ef9>^JIfon_I`nt3Y^2w67hz;c!(hbL{gJ@(bU0i$p4{c}d2O{6EU+^+#&65n!vUL49W1sJ<)QfFJ|{267C4`htez(x z&vO~ia~;n@-HG4J5ZA0e2S3MWxsZ0@k9?k4=eGQ{-0Uvxy&?in2TW_TWWnj3-Z5wo zwh5o%BA%1KPrdx1+JeuJZ+h_G@1<%0enA+k%u4%1uzU_B1de3`k)6RJ!18;lbH`Tc77<=<^ z>~#poP9+>aDIAMAenkaJE<8id$$_`?M6|4x(eGsRTH(-IUlscHE6G2twd9`;nGquS zqcMhK{Px0lZ6qJADI9kx95>ZCKEw4K<{5HDG)o0nMih$(dnX5>8^a6rZzu&}GZdT| zre#)`)LlA2#_w7vh3B=G{By#Tc%jTU8@2=_FYSq0cn<4Xa;xWHJ3!D5vlM20H>757|KZI<*-cAnJ9U+!u${iyG)Db)a&odXavty=hK+(}H zrOc|{Qf4(|O&=)@n2f4mFy^Q>y?ghLs^h`yvGVDT!BTeH z04cS(pOo0xM^+~tQg-5#Cy$k#dGp?F&5ya@2KxzYQ;Z+2&F^`ZKEXA|eLA_F)Y&sy z>cVcVdti*zJvdf+oth`NVfWrc+tSv3{P>X^y_F!9_l=MWyN4-Tmd~-~a*RBG{#>3t zdnQkxK2bKU5BUL`v>@%;+335o!`gfPuDSOKt}&rvRA>3((0KVW<|p~;=+E-i@d+~U z{8H<8A1hm#zj5)=4QX&>yi`3fQY!8pF6DO(ku_J3C|j6z@^je3Pw))>%e#sXZQ2Fx zq~P2(QebYI?&kMA%R)ibrc|BPLz}-D$QVbH;avuk;!XSooHvjdi@Ia@@q*= zeIr+%-IY$~=Bnq2zO+jozj`LGU%ys1I-h~PLcvw1 z*IxLo1fQQFtznafB+izQq&f2Ajcv+CPfbl#Hau;1Bd^om$b;8U?R$QP&-d!pONB+b zb>E8LGW3r{9mE^Dtl+Hh5$5+i%YuPb=6t?lh_p*yARVqQl8z}$rPIx2GVsm@Nq&9L z{tffnEcwrQ&uc!zYqZmg7tf{g#zEqbd5Iq|D1>>O_uMw)Jb%~R7YwYtsLA?K(*4Ft z>4mvR?+5Fo&!Y{}_sK^2_Q@vM{3>4FV9wzA&+|F-@4uFqTNmWBO#`Ips_x>yw6pjw zXfK84wwq*r&$GL`Bm+E4fVU2|V3sK)s6gM*}Z(lQzS zW}l2rJtRM*#XyeAxU?fOChf3{N;?SIFNe}F7qi;mJj{#KSF-3$_k}G>k z(Is7^$Xn`fp2t7D&OZu=)?QcryS6euWxvdpB$<_#B+-&6)6y=2B^uJV(AkpZ)Uq&r%2atLlzn^4Z1#QgT&~$HkU(@0t}m#D0#jy1_-m z>)!9SDOwg`?z>Q~srlo~w2Km%7AF%hmmP~|7?!$6zJ0b?y53zSZLThq!1!osa&odX zI5bXb?EFqDZ5Xhm{EB}6G~fF^W%0HR{>iqeJG!$>yKzRA$_-h78T2f)No3l2w8IJc z9&IrAKP%d?R~vN|Vz+wVHxV_RTNU_<>e-6ZnX3GnZt zM1hw-qkoLXTzuf8&C>Jw@-3Y&E-K*syAOTMb%~|QB;!5<`6FI)6MV-X-{9{B-y?%_;QR524=^?3Z>3cbu7?(Z z1VQX|iki6b_=g94XWcm0<(dW8Ah>Q3clq)^%-RLlC@ANxH4M(vDO|s>*D$cYVAe6t z;qNJlYW{xdzb-wv^j}vWUi~YcVqH%V{5GUEm${{Df-}1{1a?pMyBW zTsobX&&)b-4QK6%-KEx_-dDn`=j=~7>31~gv^Oy_>nU8*G3z?cHSY^pZ+^#fypucc z`g>wResS%GLVV7F4_xaCT|cfu!1T8B@=prB)O6XfX2j?Ko}JInHL0^#61<#sFzZ5G z8{&FBe*2ws<99vZ`@YY$l>(7LHF8gGu_5=AW~sTchLn3s3&}a9iVBvk%6ID13PW6f0=bKN1118;HrYN z+Oxm@YV1G6clgf?|3}`4;9+?qf^It3&oWv^Gxf?7(L5=CL}-Z*@%z8@JG`g03c#A) zth`f#o~!jYuEC`fYt1XtD(!VaaB6b%=lLUpGoADO(&u{H->G%O$dCqJ5y3mK7U+6j ztOt3nAM#$U+c`^950+M4@I4C(Oly_lTK(Ie<$d0RZTgo25v@9VVNZ_FZLd9Y{qY@Z zka|5*um8E~qt^ks9?3N@tlh>Im=WanKF^eu&lZjh$z32Sc%0Xi;QLssm3&;gRO^>| z4Kpv+F!N&1FeAx>bs48P*D+n|s+w21fJH8@KTiz`%*u0Rg&m$l!S59^@$X1GgU+-uS6vGzJF*JDv1RR@;#daP?rHdiFp0f|LqU=(#(R-Q4l z&-jPd?dsdMj^xL4t2JAD-Bz#NdSU(63+uN^to2*7cB@Oheyi4Tu{NaEaXr^^t$L_+ zOlw`)tf}Un()_shlpwFnp6^|+7j9i=l5e{@qV|coSB&RX`^DCtG1r}|E$SnmS$oH3 z|JVy_S$ZE??VJ#-xm zpEQ?pP5lPrcZ>Jl^T6{*`*f%$g=U6Jp;-{Ddl$mGw-T;>Lt3pJE9cIglk?}#OT>Yd z60oq7TF2r(wc4x3x^sT4FM28A`mx)0u`;{!{DE?UQ_s2RB*NO@+>LhJ9Pf%LtYV8NmKf=_b>AF#}_55M1BVU)D=Z~m<;np9Zlej;SZ%SaM>%*S) z!Fv5F->#oa(M6pFd+us|hig1Vv3EcT!2UtUZIjXNeD;g#*)Lzdggt~SY7b$}xqVUs z>rz}Jray++M=0Rf*Z6wFXxVxpM)^FQ?!b!caz`pJ5)2Kt;3dup>R*-o>iAKSK?K_u=m?c9U`$W92J=9`nG31d|KDoRisZN zsj$AkC|?__(^bH}3w>@rv!vglIjY^c=fr1co0A9JgJGL~x#N2&zP`56osF%Q(94EKjFq$KOTGRt>JjeAxd@Ds%#!CRkjR~ zDqDw275Jc3!TwDZtUFfOIZTEe!>S>ko&D~H)#i8Z+)bFXItRzd_h(lrp0mx#VeZS34}1|+f@J+M~2L)WA1)&X+w$wRe|r1rDmqs4l#4tF2i(>e>fSB)Rs+d>^^ljNTn z8lBnmdcN-6s%C7-VJ)QozA;jN|5#}NKd}afevk%-$4i442-eWY$F0*`v7VcIZ}bIw z`t+&VUuu0KO6`GhFRtPqtaa}iDxbo)tlaj2a_{LQ|Gzy}Zv97K7#9^G9kQi=Web zdU|h>I22vkUF|<}3{*aE7{k^6-kk6inLV%P>ji>qT%w;{lcN*m>*JH;YpmHf#kzUZ zGgIZ8vk~&mxd@56vQy#C_EXP{eKqa@a-Wa;Y;Uj+xclyTX?%R5R6qQ^R7E|SADt{) zZl03Yc;D;?zQo^|IuN^3t9$8vIbwjlL2v8%u|K%M^EorSFA!WUrTn-sX?`j~TAYoN zmglBP;Q8qi7&k-hK?Ej5%d8vw3|Kki%VeMI-Y#9J>P$*{y#vhv1Jp+8?5 z_SyJ3exCK@exAlbV^DrwKZ`@1^xmS`U!C1%S7y)a`Fj4ARqj^&xt+9%#eU}n>~|*2 zme7lHBs6KRgk72^VVCF0!n-l5jrB9T_C3vB+q=qCs~&n!ly%_V@N=oM(b|{fz92b- z=U4lqv)dfJO2hma?1ugAF5(9c`H(~C!|1;!GkRXn*XUoF zzeS~|H6pu7$IFYP^R=bYHD$SUyR|~P-(Dr%@2-~a_tr@F`)g$A!z~i~`lkJCe9p}N z@p(}T`?IFbtONUldHx35M@g~OJ(SOCVPXJ1#QotybKAt>3;ysfDHay?ANc|+y{r@6 z3;V?@r04C`();dO>2rU*^u?a>w~w)B{B#p!v)Y^Mi|Z9H&&o^emz!sLpHgG+S{^-r zDiLv;<Y*abx=7*0oz(ua&%Ab*-u3K!KVQe1f6U*kVru=l-^#al*Gc~e z8)e|*%`yo4&VyfUmmx2A$k10iWhnNahrHe?gJ18Efv>mA_}2&Ia@qsC4*0H2uH7-< z^KZR*S{fhxQOa+_7`F*F2ls_n_r%^bc(kN5{BApl@9cKBv-13fyI1>@SBuJ0JEFS` z!oJ(kr`u)ti=FZv_5nw}*(;+`_si(C0}$?4ACQsQvmTMQPll!K!G7s(*_M`+;a)!L z!+%a}ECNO^pawjLj)`Z2ADhf&2RIt(c;DL z+@m3X;P12na{#G6zJm<9wO+=&*>CT;b5HZfv|~!fqvRg^SiJT<_TWdNPQy``sI=qo z1#tOZIG>r<_u-c@HDwp}!>34t<3CBA!(*lTzEM(n7slzWgQVQXe#*az^NpgID;2?f z558Z|-)E1S`?5ZvHSQPd^rdvzHw}Bz$FNU-QYNRJmMPeqrA&r!@1FbBKViT42RQ~` zf*8w};D8)VyQtDhU!9sL^^cBMeg)O`V4U7QM9Oa( zAZ0PfD7gw4z|TGa{ssQ?+orznx>i8DFLQEV7yFq~e_{{$@%|y~tH#L;?Dfw`i^uf^ znI;z`QqE()IaVf#@k2PK@E8GZ%|_ksr#+W5Z*ItlN86;stz{B+ZGi+Q&6Z{trb%O9 z@CAGV>cUUF=3dwuu+J-O86=;s2L|vpE3q6LTF~)sz`PFOXoq*|AJ5Mie|6O1VaYBH zrSGA|*q=^TG6&`Cv?QV5z>Ks6@aBT5$3$TCBRE7XzC#^`!;hf<%dOJu@doK~Z^zs2TS=4{W16JnOb^T&*)OC`u?})bG`39vEaTk zd=8}1aVXQ2IugOCA9L!IXo+4i!{YmN_7%Mg5*T(r$#r6G9S6tnpi{!e@M_uMfve2J|u>h=t#^JDxNZl)g5EsxF;|Iq;j^km;^Caj( zw0v_WLfN;p(=p$8Tz%{C-Zj_%^qcKHmJF$vyD;bYz~Y;TAu|6_k}OZVB}>v$WFh)2 zv52;Cm<0Ya&Vo9ZK1=;E?)AD44B(H^_VNPwlg)yS7%5E6sKXpdQvIBMMiUf|4$F6M_Q>F8+obP<_0sL;3h8iV5n@?p zOVH`4q~<54*85P;_CDW3Ec`?3Y%7fLq!!bL%e*HSWik52d_jLueHwZRdUrhf0e!cI zKHo0=FsApsg?@Zx!OOPsb4PYRF*{rLNQO4Zj#rV;x;u)5)JbZydD4=JuVPBQ?eo9lJ^U#glGH!9vVwm74IG#F zI-QGH!ik9`9hq3d5or+1NoY6m!F4N~`X%;M{&{Y-npNei#jPpcwi zFvRxL;*G~Y!1G?V6MbsvOM|stScf?ces`zv!ohXME?pDJ%8(HJ{;g(5HyF zXrCkZ_(Rr@zE$*j+Y@)ppRs@2;Xh`C_k3OX#997VrcI15nQ4>wtGX@dk41knwgr8g z$O}G$#f#sqO^nZ(X$!W8@u4Hf*#{0-?V;l#_XW_0j=pr1Ex6tud$1VW!}!x3gD;wC z2gWF}4KnhpGx6kXhhKx|2m0Gjs3&6Kw`j!l6}E|Km*p4s=B+%pXK$~`!EwcBv{|z3 z^d7|na)CaRhvLur7@s`PHZUA8eub?6)rSxNnjOA{zp{-!sl2G`KYXJ?N939mc$+?a zN+!3E0#k!ew%;(JjOp*h+Hl{LiUU@xth4T{|Hoc;?`drU5bGbEXHv80CJt8nG18Y& zOD@EumYLJJDS1rp(D#+s6kZ!K_ly;$@O9vl?S7f>;)3$qjA~sk-_+o3@Nq<(DFt=4 z#q(ajmoFlCT+Q{rJSO&C&-GisUv^s0Khuve-;|&@<3H(H8ecuTwA)0tL9Qt+_xa3d z`_JF{SwH0W2TW_16ZIYg|I7QTzL7fiIuA<^QE|t3&91-YyJ+8|Js1;QATp$eyr-R( z-JkcJ7FGuSc#CquH!r=vsl%reev+Q=>v(YZLgGEuCZ6pO(LB{FvegjwrR=WP+kTJh zzTQ!-o8*rQKA`uvB{8RHfBqKjo=WDhPsA+>p@WO~{5BSPN25#|y2dNAWoo*5!}r$Cd%$bk57*&83_sh9 z^B`y+7-w53U)&7a0d;5nRT~(e+@Rk)W}rxDy#WQrH52V`?BR24`5k+~=a`a_@3HYk zW-PZ7M_ai0A>;KtGk`z1VT(sQ*f|<39?&m2_iq?;fVk3;zSwUoFuu9vvuyb-GuMPA z@c*F?5X9lT?C@ds^k2>gpG@PwY}zD`hcB~g2WMMAHyGb?w>F5>JoxA2mM?#cm<9jV zwfC_81%GNO1>mb)0CiTr&-8nSFxQ3_X0oMeYKBDf&z~MEQZ4_CRU; z^IU%2;DSdx*gl}j|B(8?_!O%=S|2p#!8f$lAyxkgf$*6QvHYg#JI#C_I!_pVz6-#I zn$mgw1R1@3uJZ4-atD|k0^&6r{#Nt@w?z3*o7`e(6Xio~wT1EBHSOTm2GcbcRE`YO z1{M#HGemMvLd?X}4-+$iy_}=0zxSkI@wWWM=`-$)x>69EuYAVoH%{rcak88_b4J!3 z*(Ft$^tJuR3&3ZNesji;oc?o0nExZaFS)}HduA)kcNV411*;95zO;55w2)krnmzUU z05KOnp*2sl{)MKra`!oR^E-$CIr21k!}q+$rm1rF+*y@-<>a~3(rNP~okPL$J=Z?y zXa~y&UHhS|F{nxb*JA4u8!%ngMzg2D;W4j3aCBLVRR2H&h6sq63A2IvRIza9S7 z-G8YK;M2Nxk`L*T=$*IE5aN&l!C^WU-|QEANaSn19Svq6WIO(cg>X82|_n+C;-QVBx`S*wa2Zg>wlmR=VE#H6EJyF%2{{NRQU6Q0r$@1O) z1RV1innn)j^-8;rr$( z+>?@$ln*~~XZ|Jn@n5@k&GzO0>F5gOOX`apNIuBP{V9C@rPR{yQffs{DTNq|QY(8& zDfka5fln;`VoOrs*ERCsLP<(u+z4YYblk{QV1E5N<1bQFECBN{O*p<<{E-KWxu6Oo zeu4R*e3|nG?ZJ2qwnf)HQC19t&JSf`8JJIrZGrVZIgofN!+0fU8|21%qi4Ocdhgr1 z+Dqckc#U$1*C@B9uarZ)h7$Nul|`8=PZfBy#IT1ue*GeVw1< z+|nngTB=V-P5BJI!=EAM<1_d!eTE#X%+I0({$$M8Q+~6S@!++=-SGX!jT99F#Cj7m zVmI~720I3%DDtufpe>55K}-vBaur^M+(Rq7NEi6VnOG2AG9KiCt1S>4fISr}E(G=h zZAjV*Xakkoj(tJRorAONU+%1bN8}?!elPI}ttFK<4wOop21(`3kS&9?Y#oC9rCR7) zN11SP4f;CuoQXGL-EUg)47U*%z?g=+5*52yN^eHY#U}XTA?|`PB+N_3I1=V2V@yov z1Jjh>KjQ}|CZ5E^#*hlsw$e>NmdS&&xe$Q5aF2wqW)t0JThDcTT zepN%POttO9q}mS3aH+Nv0>3sTyGO{BGwZFo>%MNs{Qz^up_q7%85g#xcn8L8l-bfB zZJ}dOm=jIM)AW+gho;-P(HQsPj7QNq+a5^Lt*d&>RJIf2QW#%~c2My(m}g=wBG2@o zU0JQO^K(`DwD>FQ@7t!1RNpoX@ivILVZ06U1Jy*#P0igSrRE+8d=r)I8zoWaHrcT^ zh$%0tNORAE45JPT2{-d6F4}V%mbSG;9aP#N4`n$Bye!HYIIq72AV32HJr6FY`?g&60n; zXZ@MGs8Flw;@6?R)ZK&pdV9Z@dWid}w;uw3$a=`LS0DMJlpOv+<#(O~TwR#E@aD6! z-X;!c!KHmtb^l1@rd2!>_|Wm_3>AN(V}V@pK)M~+22bQZ;?0;Vj&VVD zTn+8&d1wc4p@5omhsSx=Ei3m$JAR(GP;hlA+_`}?*f&-_KQK-{Klp=uj(Ddp5byK_ z;)lLC0)c<1l4C!~f~37_j8b@mpE~x*#1ZNEC&of7zH&gS9~y1N5V0M=1;i1lm@dVI zLDB*BXY2vvKNyE&VsSJVn6L1uJO&S#Lz{Um8NbP#c`7!?#D-vAT5x8YD_Ny-TXrnEgXQ^irS9TZdti68d9g2cThDc+N+U# z!~Bvbr%1EY5z_ojB=WmQNekqxYY{t5TAYW#SGvW8>9P(v&P?1H>#XXF7#e3B7vnk@ zt7T#jjy_CM@nAKNjFon0W=YKbi(+D+bS#%Ep3AKbpclyj#^N$I&=2+3@qw62IrtA9 z_mepC;1sbfg5HohCuC(4=(x6O8waa=m4#Iw00)c? zF!6a)~rwv^)Jz{sg8GxL%du3EalhCn71&-yur^r4Eg%QFGH@(m+g<@ zRDH8jXV%>rcZD096Q*5s>5A)9^=Dk49h>+}Y9p?!h>0sB2hax?TW00%R57Ae7x#v* zrTpQ2#IIG&Dy)C0fz2f>ezuC4Ym+oj+9ofMc9(VBTzkaLwZCp+=a$H#hsP9m-Jjnb zQ(bReSJv72FY~|CZD3;R$N@7Re7t;{Z9}x5VOr=>v1ZrPTaR@4aX07hJ1W zfxxO#W@t-kpM*0R5G&a6%3|qsZHaVFStecJr{4v>?mUm6>+O}&^$z6jN}2p&jkkx&+i!U-t`Zz+LZBv6~}~2pW8TB1Tl~O9&C^S zk2cA`CtGCDGsHbU-)6@?4tcf1ihJBCgI*){@zr)2@M@ckdbLO5QtxEB-p&s?>&|P| z|IUj?^8NYMQgJ8Z=C@+r#JI@yeN}8{F>(O0kwq9=h;>=6OLKibU|#z&?_2+ZEvf{1 zwWuUj#PJ9a$`8!Vq4nV zV`)vjue`h`-(6iVjn7S$FHcWYF{yQ95D$r5(bd3#%E(tzVH;u!vHr%hd`hoHT;wWn z0DXY#^J;Gbxr&O;@AL(}^S$)H`FudQj>}^^lLi@CGf~C%oJ9NR_*KtX+(@+9%}nxgKSBKc{QF0w^`*Hgp0(-uNNIEyv4|%p zsF>C|hsH_`aG)yIoVf1x*_MIwDPnWWpbv08n(Oh*XTRb&gY;ltmJ91#yf?v!r?abQROv@bn}V6U(!tY8^mKDb}AD z7h7>FIIxMaz2E?1W0@DJ81^dyuwR3|pHh5Ir(d0uQpW|>Ys*+PwnMo-&16XITEsKP zBThC!W=f)x=(I$MMxN;zIQvP(03$AVD%yhQK&f^>%+wFSo-wrS6YLK&Q%}mN)En}{ z^S#mo_JfM0y|q-r8H)-I1SZauW^vP`$=Rv$)rkqnv+|=l=YZ>O)sQot>#)p2#MofY z2f0^KVrl2p5{o)d`gC5O|8ipaYp=-ucj9X}JiCkSVYdUg!oD#@#g3v4g#CeW?TCTJ_&~dX_EWFN zh$FqXS~?;oyzMo_l7a(4m}@r2T>ERpBr{*l=ZLGWi?uke!*Wf!@@9;M8@|1dJSXk5 z%P)>=WPXTiWE=R0)sfJJ<7MH?%PQyl5=l|9%gjMPA8j#5wFBbG(KjN&1?I$`Kpv>r zeHuktJme7Q}XozN2;=z@6#oMKORO_6rnxcJow)v1AM21@kFCzN_)UZ7 z)z~on@0nrtTfJ`LBB>YH4wd@1lAjay%L=(A%S6X;FGdVEbKuVfAIJr^L6qTv(u+82 zjye%`)R0#@WdQ8xK9AO`cc~$j|5B~pqhsrCA6@0Q zs$W*WmocvXA$4~dF0@-RQI@_+K|9=5?XVbpU`#%B1kXpHeuTFO^x|p6z#hkW5wsJa z58v#TK`+1o#IyIpT%#-Fsjn`U@T7U_+`E?NqNFL-q8c6g@#&Wb#`pUzo0-Gnbhn=#JZL-Q}deN{n$#z*wS~9ZGe0q(qZ`&aN#<5a6=YD zA1pvWU>tq48W&(EAg=^D@B?h;(U?aJe~CF1=2+iip2>LhF39!M9_udQ@iVW4#zuej zvDG)D=TUkgylz*YRy7qDstpd4Ny&$x8?Qqza%{l(2)luC>=Cq)U?(yb|9i|UM!ejm z&U4{>v)8TF(&_Tz*PW6Uj_Db@k}*EN$d3KJ{;qhN`UMJy)!j!f1b_=2S51)xuPpFkhL`6!rEjeLpoYo2UV^UglE*6itZd4=Ea_52^=cP-noyRYIx z9jP`nTz?{IOU zjs&!+FYVS$lId?ae_-C96VL%MGVaBm)KSlNM*XYg6L{ZtBNt#h_Czj-=giGfZFsnh zy1E5($7AyIo5Lr6c(uRW`+n!Y;^#|Ye^Kd$u-fq@+JCuZSi+jN5pv}Bh+jnWz5QRb zewzsf_>Tz(_-`i_G5#?L0sg6k4JeayH8YFDMU!mk53}!h< zy`2M@4OBh^{DCh2Xq7zIM*YjI9Av%!FI(z%Ktt?Q^&F(yi4DZW7Hlw8K{h1sb6O2J z2xT%8U*I1;$ad96w_lk9`&PMmVw(_#5zj5SfG2dm*AG3Ktz2MLdPCghN;aR#kZRNNDCy4*Q zbN|nTlb<+s0l8q>&a|n~{R)3aA2*mY-wuW6mr-IXB97;c!-n57V~O2mQBLd8wF#i8+~!nA}V(H<=tw$X{jhRvAthox!oincK_oLXAs~ zGad~OSel$Zd~R~UDMl|C`+<3Wbgn1O36uZk_s)HliSGW*IYj+PJ!!b$)Cp#sFg6+6 z*X9H4exAL_d|b@WX1JjE5U2UTvn@@2uGL3(mT}2mT<=piwyk2IEU}?Bucwq2%me(IWg6;U|Z@}Q+a^B$J-Y4V&&-gSv$fzVQjGl0E z;wZ3ia>C@T+h+KH+-!yuMn9O6dSlD!!zzE9Cl^c(GxETU4~7Q@|I9e>HvG+;f!K3g zaJ0j3-tRu<-{Ksb`hYwzVtC+rZ(e6<^n~Gtr>>ZPVoN}kxxGddjA)fqD!Svm6{q$T zqrRYhu+3pdWMnhA>jSL|j6TSW18>7#j{&;h6Mw{9(9hxD-A>Gi_iU3-I8GQb_tX{2 ze#lH;So8Eg+oOsVpV@9o&MAQpasDpONY&zve0>A9Pp?3oK{2+4nJ<{q*o($CIC)i{ zG3==es1uxeK;wT$<+`N)cj|m|P3&m{eC)aZK4yJk^&6Wf)F0$Vy=4Qc`9_7U%84_U zRenO^uJSb^&xpl=d{e%;Uw6^K793MJmQXzNHkvsh=ZZ$}XI8!s{>0w0`!eGF|Gf4K z*3cL$;x|3KX@Q8KLnbHXyUV7j#b>tvY5(Q8f0*$^+iQB=+VCQyG9z1${odGnne}_q z|JnB~{{9c%zW{Hem#WO_^VdStLXe9#@QT8lxr8WIUec_T-chag_1YQb&GiY6D{4K@ zvDWLd*En~(`d5mXin#E&9gMR|9|lRaLg?{qiwwcQLVP+i9k+i)z?uX zKedf*By_u*SnsRXc}*A6b^j|g7&q2rO{chsvN({I;b+4IkZ zriZo97Zr^228gvK#QlSa#+=+B_NGk7jm&t!*TIE+Qv>6R&wBrO?2oCfKc;6XGq-zA z%-cujo!tDc$wmKOct>Tx558tzH>HC^Jg0!ak?!0Aa)UUtG}r0)&{FbD{N}k|ba?2; z)Q4c#5vPz_dzPk%2KqXLih+U2Xlb{7%C~#F3nyW}AsG86WF58=5@d`)q{aDioJdcldmxdsn-wiC~D$uqI} zUB4OO4L%lZe#_^mjNE)UJ8lrpcT2&Uhp>k{uy^$LjBqz+PZ^BWJuqgeF@E1tb0ZJF zBU27|a>K@-9LNd}paY`Z^#H~=8-IPKPt(+bks)Jf^Zu6Y|9gEm*JcYvhD^^tDfqd4 zrr2BiJ1~v%IBN_T+jtZ6Oe8}dIL_g6o=wJUVsA>#gRF5OH+Z2$alnHI8R~*}aRB2% zRN$V{GrRud_rmEz|8CJqp_O3MZSjiWnT|M5%~R0dy=-YEUci`Q`ng?Zg0+hSIFAij z8X=y%_QX0X_ipF3vF|I6p!CoKHvZ&+&4G9E0R2AFL#%PYobC0`h`^h^Gs3HVXe_e( z`%1O@vTeS>jbEq3oE$*kb`uMCgTE?)xtA@DGxyxi-XqS${_T<%@4HLp+;GF6*t>~~ z2X6QqU0`zo_JGqiaM%axOgoGRneqVZ#=m$1lleoZWrh{9a9*qf#uq{v4f06Zj8ptk04J-Z)d#CBQwu z64%+1`OO)VA3)Wfj?ij z&#R;!Fr4tv35o;eEFS6rBc3|I<^ayJBmU_)U}5jz0M3NI;y0sBdDF%pb6KoSgWd*v zb(Z4rCJxMjDbCfj#lqX*u1a8>-&260>+DT^?d8NC=YH_)kBo%at8+nkHpp8OTBv*dg+V-7fU0C@mCVELGJ|JcWaqT%(15r1N@@E`HD zI!l$9n=@6_wZa})PPfihHJE3Bb$*;bs_+MX`IYE1SIyb0>ikun!D?id=UJ@g-r@kx zO>&;gs;(W}@I0s0=7bv$th1*K7u@(@aUdNJGPVgaV8mVVG@_h!HWiwC(eK4@`_1s-Dp&v4Xd*E#fnb38C(fGI5wHDhxkNQRmdSG5~2CyXVo_O=#fwR8GS;Kq{=kFR>dw7TR-#ksc zan=XVJn}qySl@#mI1|deXU-wctaP1EY#yXExh)3W&BCMmbDyL!#M=f;OQ;D)D=FV<`3OlHFgb1t)c2_E1~ zUg`%o9^h=+ycFW@6z6!5kuG@4n4r(Neg_9E9l-N`b0Ibj=b+Ck3ty;@g$Kxa8Rf*k z&=}$$D&7>}&U3Yiy*gJLnA@cTXLZgt@6o?AlFdi<;N0!ga`x;QIdtl%1g#n4I(vH# zbb^QIbGUgPw+nl7ZF2zc+1Jn;j8&N=)r;95iQU9&ur)OF>nBRE~DM>AKOBorS3dWow(yHbuG?oyavpjLj2V|Ff9n- z`8L~*?o;QkpFMk4&Ye3a=VH&vkGmJ++>;K%Gtksocsvi!?V9&m)Y`J_Y`vb(c8t_xX|d8_a?0 zEK7hj@%C|Gtub#ah2~}=^YA)k=kbH0ut(q5*lYab;^O4Y`E$}^YlL|7JU9wIuLWmA z8vHXTc^17bmTvGusm0=fI-C6+TyV1!GSUTj&9V_}yD)?CKXzaa4m@iOnoCMmVJo6Q584~7>g3*fx@bOLVV zSK{CUxS@4{DZzmZxR4h*K?`gGjtkbo zaDcfArnX4@J@79aT5p}gAK3d+CIpM`?6z8fx37`8?Znq9z}D9xJj=}`?QsoRpv!%y zVr-r7#6I4_J|Q7N5)%{T@cEPS^}12|d`zAXXh}hwpX?@z3*>`4C-Q?IN*ubuOL4)2 z2R0Y<*pLwiI9G7zfkO`{4z!ZG%LdAd6Fa5b<|)?tvDN=G8V4dX=71Ro^1`R&cflX$ zCMnzv{*zjX-<)>h2dv!$So5eF$;f#eY_+<=bL_S zuun?5D9Oo5kYw3-X1`Qk*-r{B!da;hZ=9Lx63vT(;D;?v4ybEO7Z^Sm{7nh$IYy-8 zKn6U>11^vU)tB{?MJKk&wd>d9x+T}HU6cMhq8)QYhYrX{512WDvID>eV+$ZA{g<2r z{A)RbbCC`Ze_~H592pAiJLq%SfU!ECjU}-5U(iuW;e{R5*?s<2sqWEV3wsLAI4lf_ zIeWq$@8jd0*t5^;e(%Ko(xqg%bm@}BCdEtp?UVG`>5Fl8xZwi%;1nkhaP6iK7P#}k zO&2JApvMNq14|#|B?lZlsJiT1L2fa*o^oA~cL;J_U6TXEf5@)c);!T=6R`igtrgok zz%eJVbO3EZ%DDZDvfa11a7djPC;tA^!llUkj#30zD*?tu7Itz8&g|p4eYODKB1&+U z-C_#P^ka$h9sP0EFUzCnPAXf^UFU1uFQU&UC9%)zeox#lUA`p9Au3m{K(1bq8OJtA zahw_H0}fCM+2X+iaH8NMhfW|D7P`iV{0=U7&9}w_hd!`5VDX^Rvc59s#AZpkks>#4 z-jEwND8Qd$cyRr?jNCIH_O!u6Mw|*Nl{>4ba5AV0k%b*g7Z6hhNqk0T-&0M0H@%*$@m~<>|O{maXR+>$T43IIqWgTi;*NxYM>~zt?sa$6YPdzhzeS1_wHeFL?m* zQC!e`uz3J3cvGkoAWj|>P~(C%Heh@xx1zU19A76Xw{OUuJ9i+r?!5;MDG`<_7I;F_15_!pnw8E3P0lM>6iyJR`8 zJq2gjmhcds?d&NfaOU^f3$f7o27BjNudz?x=V4dbHny?3Fa~q{h5jwOx{nlIj&tOf zcUI!-M#Y?p=r6!8Li{6wQHjJh*jJqK>Y0 ztrt-TIQ0PWS7MC?#*fGz2P}IK_!phoDcgMn{6p%bIPovJsH>D(-oqupnCJB>S&7n; zk|>qnJnNE9!THW5an3o(@Cpjfl85+NeDDP)l#mCC3lYXxo`fL&-fV2uN|ADPVoJr?*!hi7{pBAoGdSK;5P2IhY?r1aA6 zQW|)dUfD~_DwIya`PDqb+D+Er-jY%%ZNYixrPub6xWsta_!lL~w(*l;=fT#qvDdoZ z9sBF)aKDAV#A7I^f*BX)o!n~eF+0|cl^?3Z9>@X*{M_>r{^3K8^O=1Y&dGj=Ge8Ar!m9ay z8R*2a7+;kDXX;udIJcT-SC<8zy6lVVzEZ}>I$V25Y224x|E*lOm;n4;^E-vTn%{A( zclLYCt6}H4`aS!*?(@nHS9aKKsjy*y1gz;H0js-95z4CW;!iFpK3H4;9~2M31)~!@ zd9Weju-t!eADCw(o_Ya102l6Ae7Iwc5401OoZ0EVf55#%wSQ=>85^509S3xrnTahc zI1L9bW@Ek}t~UYy=L&n`A5v4w0q;-O^p$cDmY)LOPuG5{1?Sg)N&%+jJY|FR+J=5o z4%cNZ`E+A{Nk~dm^LyHQ?l!*F@6}juY&>h6$5^khXP;L>dtB?@iW>(?(X~CbkOyvD zuy_D2D4jqati8qp^VT#^iusbXcS8#6JSDi+&+hUpnzG53I|t?I$>=-6c4;zWn~~c*50T>QdrPr(y_6U(C?0?dMb>D&;J-QpE+`&oovk23AeA@eivd71s5a3c$L;`TYqehRDN z9?B!gLkhWIO2Z3>elX*OOCQ{oE%7n#dkNqG{Y{kL8T{0hE_f#gf}~J%NVevj>OQ9X zpX{-p`ait3RNOF7DnY+00oIi^4brk1C1nd`uohrTd~Ml=Ye+?hRM|dMt><3Byq;^h zdR}krd-r~?`@HV=M%UBUqMqgajAJkLZ;kE4rPQWxrR2uGN=j_BxUj+E!g@`kBN+6#5P6L)Q&-&=p%09WurK+v?RQ}N zAJGTR;(+ao%<;gAQ_}c@3mgk94iuab);l}#Z`e2ZZ^WP2EBxEn#n?Jns%{yg1$bA5 zuC2PwA=`&ZRmu*B>>Mstow5t}mekrkO7(j)-fMl2esAl0U~k)ZW}Hvo=S^F)57ym1 zTFPx3C}p<}kTP5QYc6cDxUd;|!O{&*E)=uu1)B%Z3Cj}q$&)9Kl{~ge-fIpx%k(@j zwgR6k=5j3d938$V#t#h~@G`n!7W9G90~QAuv&!5Dh6C^;8jzj%SMJ*K9|n7tejVxq z_n~ThN|!@HA|`kZ}#o#yBxCnJE;z-<|ym#{a&x@TsJ!3TF+57 z9`{%DoL=ku^tkJJIc;)nlW}~mzjut3-!WJ|-9AW(;=(p^LGz)sr5j3FTquEYf?OyL zn?czM7$2w;mL%?#r%#_KdGh25c#vLPTyS#Wk+KsE2TokQ06zq4pHcapSiUEU2bu%Q zKi%ShifeRofO7-r0q+?hBeN6#YTcXXcEi6@1E~(om0*mmP66JO8aqZv4dAT=nAh0# zozwu%T1HBZJr3E6YfBpJAFFMAwSMnd$Fuu9=X6+SwROF7Ek=*Cw7<2Du5Gg~_K%a# zb`6owb`H@zAQyHFl5*ffS?UEhF7%U97$-_9E|3R?3%zBr!v87oHv;^@2l9Zt(0p*$ z0~{;Nn80TuFVChVy7rxoABy1tIFKKEippOd;{jvbRP36GUnCEh>i~MdduHhP?8Lun z&!%2Z{0n#aT-jE%uN2?wQaBVSahE^ww)Q{^*r44dCbvZhtWponEd6zAEe^$VNzlDP^qwMsNzC- za$%>72j#Yt2Lq*y;sR_1=!8-jBb+*6Vd5Tn_UswtsVy!pkQ0UjEZuoP4w!kug`1aL z`;EpIg**TU=)-QuEpR+QJd=uFA`d(`P;h4GlQfdKjC3}D^q&8*mXf43GHf2BMdzT!*HKgI8AN9VCZR6>AowDzgZLe+mbhz8| zatn8~x6#G?&PscSOQk)-rQ#m)0FsUegQc9(2^sJJ`hYx`pSW9|KL`F4#RF$)bb>C8 zE-*ZB+J?!uuetV~>6f$+`;FuQI6$9v6UU%<01hz5(Qv?yb%!26Y*lo2;$NoYR{>7^ zi}d(P;a(eLk{Bp;8>}1Xsk4j`B~Za%Eq(S zZ}ptcHJ_smW%qZ3yXx=6+``?q&z?x*!#_*qeIumu-Vy0|@R`j6=mMh;z=N_zAHYT^ z4V$qvbiusDUGn_Jb8x_jg})mg3=g0KEPX&*kz6!$$7^?QYJUX!rC7d6%0EqU06YK( zY#v}dV7!}(XCn`w2Xq{K2xBJ~WhefhcK)iA6aRo-4W-U5;0@e~d0h(ZHzmNm?*1{h z)C1=A4vdw0z*z~fuBT)iO2}a?O^;4g>v;Bj-Z9R*`aJZ!g}c)6s;_I@wSBI~W22j! z#7vMX`$s~)Q#`0-@t`8~K?S7`^q4>!L5~R;>w-DJ{{``fsM6*E`QX$Gh660knBW=@ zZr#75{Sh2KDauF9(gn(g+0q3nre&@b^F|(k14_UHpIKq6vJ?Me;a`^1_*a)g!PTW` zpT-LFdca)CK41*Y>%)dq0=(-}4vv%hz?jnD&<|4outQ>Stz^8^KQdmLAD^Q9D71Zt zv7T!alwoUpTRz`IRIUt z#{;bkXcx>%+zH%YI7IWn$p!bZLE8!Bp;H&!eRyB|u@|j;QosS_o8-_1g)klzf-X?; z4AccG#tHFFmM$={(1@kml%4pOY+JvQ!XMZZ|6={VmioY)Lc3kb0bmTg8^GrJ99Y|O zc)WZbW8_Eq{D?!2;@XnH6A^0t&S~FidtR@*E8N|5ynA0axU)YRJ>Bfs6sdl2v{XAt z4j3L#7Z`n@c|cuYa{#))9uGKAz<3ayxIf{#R1p`jA;P}yloDE2halr5J!o4t6kZNe~I>A)*$W_Z%FY0 z-^k~{{d3H(J_qh!0P`<^`4@-A%NM{~Nz9M(C9wYT$WL01qBL^sXZg~|aa==MotmcB zZK>kP8+cY)%*+Xxl)I3wSO)7HON{5o`haIVpc6`XYJg0EIus0>uG^ zzk>r93y43(XLj2|*@=Jgum<&<_?H;eOgLZr^5A&+5}1E^7&t?|iup+kF#qc4&q^8s z=Z427NW1NN`v)oTdL47fnP zx!VVpjcDlrZ4W$F{xHfXEgk;Q0iONesRM|=#R0@rp3YAEi-y}X#~8L9G@tSPfUVXPov#e;~%t@y6j zN?aUp=fMl79-ytLY(&igV~>)<+&4G)8~&70Sf^8B9kid!VLj*OF59uI6gQFB1sg)Tdw^7?_6A0m8G zjSe9GiUSz`J@vl_{v7`cMz^_=o%k1TQ@4e|o@JSl!O|GGH^H2(32<+6e3E=kIWbw9 z0`I0Lr$|#^-t_cTmjLT;&P2#JXDvAwDc?Ax(}nqJuB`RE?(b$yH@3IY>o1l5%@}Lq z{pQUZEvauLRY|J6M!6{Ekkmi+BY40u!NmhNU2s6#hCR;Alh}vX@b{_eJM?#g1D-sv z^^LI)Fb-L|fa8I4UO+uiW8)C*k4isO;O}SI09pqSf6E4RjQ^Yq8r{z|fkM%3Z)Yd| zMM7$~cH&?5`_|GFcsD%`tbzGAz+1^FU<}NgosN)Zz`EJlNNEm?o1cqvNi4374xk-q*#UJokFb1_;g4)_K-qy- z|F>-b2mWddF!mq%KXRZx&Q|$LR_t|s0=T0R{cD&L%#BF#<$Yhd0ScsD--oFOfM zd5g1A(gK*bh@B=aDd(qai9;DTLt0*NNIb3~J(HH$HoO_vjczxXzYFg)53HTIi?}%O z?9EI0`O+4tbL;Q1! zi>;#+{#*wz_$wW-1iprgEgR5n46x>a7XIx2`DV0v8F3{0&Jzd-tKHG=|KPx93?;VZMze9 z_H|F4{I>5(T3uIm#y$6)Fk3=^cgV##5=u#$t0fs_@;nK>G*7}H zp_ldbpzCYZm}+b{)89NXF!veZ#Qy7iUEO5xKl2?do&WT`Yn;efADFR#rLix`0qOwf zyuex?Qu6`VI1s#Nf{sV9Vi5dc0~B6Hv1~!u0lu&SiNE52=Nf>u22^=f-~Yz5XAk}% zwFepOSyq|aSz4dhn1=xK5MUk(yeVOcb0iFShh3a2;lMl`SSz_SU)o%zERZ%=9C8)c zR~O2#8yjq!>zDL%;+PSh?ytGu36eZt+Fn|qp$h`(bTFzZ3>_eV-m6NiE^pa|lg{So`F zbih(@0Cu1!{%Q<>4Pf#lGIwUF1)aU|Y}tapZ>yT4o%q*`?jhj`bEFM0Zv)KRQh<58 zepdI{@&_|5r1K33FjjI4rIHoW`L;vutdKDecF6VD4{cpQ>@sTm zcVTKUeAnmR_P*;oGUp)2Dtintwjjm<*IZDq1#m5h>sdWxW=Zk2h&zA|usLAq0Dsy6 z4jo|I0ptMfKuZS@{}S^$m%+1V7ygroe*sJC&i_{0qpx?kv`{);)|ht!?wx^o=j$5p zE;p77rR&WV()AW)rF6RuxwFb8cX3U*x7tm5-Crv^pC@46?cVNh!|KDnmtJRRF1SCB z<|XH#h69)nIMxKXW@T&uqyN7>I#)`pL;MM142nSq6onlSpvD192LS)V7z5NefIL~Y z4gmhlk*dZ35e9pf4HgZMPQYDZeszg-xwcfgTwf+#(a*aA^KQVr zJMdO=dzJLKvs%mDHPYjrmY%>^$pe%Q>G5!_7@6|qfZR)c%GnvJ>cYg;FFy?G=KD;U z@waA#y?IUJZ)^a)PoU?527m1<@=OLDUufY^9pK;qbU+c<0Y(QX4sZ;>T!8r!nKM)6 zNu3K05dZldvMmPKC#ZU~3;!ze#nQpj<;oK23f#K__iic6rTYzFesksj-`sGzw-uv#23VKyE28ZA*sAwD#X9Wr13pkzbGi>me7T8fG1^tTy1(wGPt$9iwZHS7z1NY6zHuitD9$co@fF~5JlxDlpho&?@RvH-^0Q^5C{`x#X z;{ZLBM~Um&03ZC{PSO9r5AC@2lR@pph~C>{W&FJ@GNEXjOa$%|fqU?S3<)XzRze=` zkkCiK8kkRdvP&kF?3OTK9rkpOgaPZY(o6||rpNOv31_@8#ml`ChB0H3icAT8u}4;y zpO$B~3I+A+_tQ7e1|V(UE+5y$1LJs5tpyq9ih)1Zu(=j|;(nnF&YLeSGSP#!2mOfT z0OkQre?|io2R0%PAP3MZ)6f8VCeugTZEet3&cgq%gF9?8u;+c>o$_r~fVE++@W^Vs1$jW%fQCu~kO$zasl1YP{2QkQ4#!t<%KrbC zAzy6!WKcVO|8FM)GG|E0ePCX^LndK=4|}vr!XE>3;2!ZbQzkP?v!LC3B@&oN0q>}n z`^3U1+b@=K#sRTZn4&UAER`4|qD&E4v0oUIEA~kQBD_3XwpLz}a$D7FPdqN>0PL?pN|xpKeE zs?3u+)+cWs=wI-Obz#rv)c%iS!0h|yr7wC9+M?g2O)hGSb5KjRA3ccsz=66nU*gZC9dj_7S)GjYV~26YBk~r9%~VY`#3xw ztH%`UAz{Q=!3PF7VW|cm5ah+)>Kjspl#20w5HI2CddJ9$N@Dp0RF15?BNG zX~270^%02&zVX(hDyG}=#2oP$8!-)!r`e9mR2ATa?TEzM4$BlojGYg;iU$j-Pe_rC zB@u7_My$=Zy0Cv(Q7W@;?UAkps3l;nF>1{{kD{)S95@6HKm$CW0iQzyS}P3z2QnkX z9o|PRc85uGdap8!@1=}H|3$ftD5$pGA&B%<`@A25+ zK!vqRHvLqfY8<ccDK9MM$j)4PtItLD;|4eBBH~`@vG@unUKyiThQv-Hj zE=Uak{!QSEYS#dG=_;RWRYxR2$9#r0UlOgyv;dwnf%8n;37Ms$0QZcO_LzyW5s7#YgWO0^ zp>e|C1GT}y1&s%(*0b{1R`y0=H*0`_eg4xM;*Xlup6BO@_t|7sSJ>_3Y;a(vbUu!n zvit<;01aRsXsvm0pCIc;D^~1IeN7K$5kQgI>?+?avS(YSCNx^N7dkPl7B z0}qZOKWLi3{Bqh>#3S`L&VxJU4`s^tJLJpDi=_9(6!E#RKzg172hJo*cW3}P(B%Z` zOQ8WBsR2j80bK*y<~TH5%oEgv+B{fqyJTN8 z`YlA@KL513OjZ=<$-o<_(!X%2^t-ym&VgR%=S$DCbHy9A#pD3z0bQU0ouC07;d9`5 zSkr)Zxeg7W_nDyq^uBC?9H8*01|SDCr8o8#Xn?{W8eqpCc|g0~#yV%>&u#ho`u-cQ z18-Le2Mv9@O8*V9l30Eec%1;=1;Ftn@I9rlo(C-F0oVB|&dUNDLX7(hc&x>I z+Xb1A=Na=DwsZLVbCOJ6Ajk=7#BA_DaRJ&uT}S{IYV&||#hKv672CsKtpq%_$SS>p z^V#cV@acYsV|&yB*H^San-{c>93+!(ZU<(kf!!J4%{U9Z&q)d}PXWFQRb0gVMOh@5WFZ6l zs=C+5DRNO53mA$M7w~!KWv-A5=b#H`B?;OvTTa_GVFolI0o)@GrirEpMo!4EUHg~T zjF>wvl>aDEnCFhTn=Zq?Pm`f{R?Fa9E1>}^@jocAoS=9$-In zH(did!`s5pfG^;OLk(!lc>w(I=z-We3wZ!JfEwVA96*0$1OKMT0ZIdiKjr`i{=C)> z*8j5%Jl@8=?_y|yzgL8z1?Ifa(6^fm+L9o1D^CIMa|-W8z;F>TUW`~`yR63*+?zu1 z7_k`7Eyn#K6_>$_%izK#J0IplE2s@~5!3|51Mtnz12snw%nyX~18r_VEl378?$}E3 zbG`mnR9z}5Pmjts_czO^q7CAEZ@rB8LF2%X+pA>|>XyHT1`I&oLcc4>1L$AsgB~^? zXh2W&vU;PZ+0X!bn@|JjbL2@40RHs8YXkf}vY`RM|13L95!OhdHhO^L6<1H8n3# zTHsmXz+dA6t{W%Awvtm_Hl-ceh3ac00(~BD1JY#myyT=!QKcgSEjz4|$iNDeSTwkN9j(?N%v6pZSV2}R~ zkGJ)DtH7R(8V~P$$}ul==s~-f5i;Yu99ao$8LQ-`DQ@AhBUa+E7B|6*n>rtEC_XF$ zCzgUknl9Al0Xe{&fcb&W0Ukf{Sb@ikj(nhTfNMrs)*CXf@|Zf$IO%1UsySf&iN=BL z67+DZ1RxLi7l8xF10#_KhC>5})}aA?p#goM0X~=q^n?a@V;(?{o38LVqVE+w(3A$i z6Omr1ZQ+}#GyplEHSniry7J2BbrXyn!0W4Q9{ zo`qr1fFaO;LC^s9FAjhP^n(Vlx1HVw^tYhb2|aJR!TX4wXY{`72#++S z0S7b7^rvCkEaxq&f1v~$2dC*Zu$ z#DPk1pd1`P{YmKaObJFFn1DPm4tZdVkq1z_JPI1%i#~=C=wlgr3wZ#&Yy&Y5_zLrY z{^)J)djT2%j{_h0UG#+CiFbjn0r0`1{~bLM>4oZv9MB$qx%9|x1N=Y7wJKU;4nX{Q z-HcWl6K=Q32=}fpc>bF2(FwlsO-FfI3@uPRAQup>{$4VA*Ahvu{!Z4*4~V<=Sck`q zbUaUvnE7CEfx2MuU^()Mnj;`D7;^(PN5s67#|Z`pxMsk$Wv(Yr$DB|*HXsLZUJ>UK zS!ckS6V@KF4o&3&Xuw!#z-ZJf2cllxAAJjc&;a%?v43soP0R%i4M49mJq_#{01uQN z1<(NGfNsE_o_L)x2cRb^{c(vuJ+p~Fz4Jfk^%HgmSG3s?9`Biz_@`go*(g71Vf#@w$US?k$73@e)`Amh;6!a6aL&k_Kpq&!44fY_ zA8_43TQk7C5V@cx2XI_~bIq(bu%HGd616E2(11zMfDqItPJ{-Grv{)-oxKVHmI;b6x-Q~q8bG5oFHsZ&tUM_4k!&&rd9gvo zJ?MkRg>+~`O&&P3fIQHS7qsI>I|p2)AN8HC-k|Y?-Bj4 zdYpjA9lX)#i%36IdZp4InSR;y%J-5pGr0AS%k^A=8EI)w{j3Vemk>Y}b2S2FXz&Qfv2U>i96$~5Lr>!f}mg1-*J1B-;Y}0=I0&z zw;^4s%=q(hlYkx)lAR`7t@mZCJWxSCkOvwUUgd#93u0p}tRrLX+0232&;ZsVunvWF zNYhZ86blWAF=+s6)!C~MjC%G7=v^B702+XvwgB`s`lIKKz0D(TK?CS(0l$lZ@I#>Y z4gHVki$p&(`r^?Wkv^GTIn$r^$elUH*NOfe^_drHUf}OF^>0JEzN!U*Jth3Wdf9F* z1`i(UJSeWA367kg9WU@$foljnR@6AaIia?0xJaEx;Q9d09bmnfwFd?V5^St9LcN); z0nyX|)GJ3I2e5A;1icIsA7LKw0P_IkfI#%Rv8S26&Le?8Juc{dLBAXN;0!nqf3vgD z0N_u5JmrmfbmoRZd9(hzKI8GWzT4}xpvTOKva0y1WPk&P9xyi;d4Y2S&JlSG$z#T~ zm=BNxTvM#c0iILhc_f}=<~akNOU8L*91|v*G$5`D^~b1HjzSJ#zd|^A7}&?cex?b< z&;azfv6q=W&i(YXM2KAE2gPSA+=kg66)aJlO93N;L;Ftvip{d9LtWRg%dL()m*uN46{MpOK-Zu8Mvd=XTea`H6_qz=b6W~w(6Z+uL z4~d>wea_4+8*nnkGA?g})4Y1#6|7(PJ)3{y)7*7L*GqNH3wkAm%IZgjb`ESa>40NC zpsgEe#|2s*;CUu359k`engUf@LJeU3A!`jW4*>qGRgOcwdJO8<*~7rzCH6D1r;UA$ z>~9@|zDM@C2cQRV`udYzONCVF=+2eP5;m5E0KR>+o^XIRr1#Y9f66(@| zW}|zHmH|E78x8Axr7kV#og5}>9v3POY*lLpTqockJdXkX zf#`#$5618tsa1a0Rwsqt+~_o4u0JyF=Kqaa&}5WXVqIF$d`usS$=fd5Y+NtUG+-0( z-+;Lw@lVG*fae)k<9Ki->J3&9f7TbV-V8ZlfsQ|GR9T~(h&cdj*V(_oeufy}Z$WgTlJ%lQ$qy5yS51DXc# zd=lpYX8f50SaZZWvrDK)W6kL~tO*%8;DoAKXAL|17^VV$_A?QG_BIm#N$7bc{u6+I z;N8uS#@*R8a-;n5*KO+y&u}fmKQ$fYJ*&}>4%XT^p~cuQCFXdBY{oex=70^re;x2& zi~Zl818|OTIpzRMu@xVstF zkb7HF!)|8On;NY8f{(Ml2ekn81=kvm?27Zr44zlk?)#=h%F3r#6#nahe>&y>X_y17 zR&xN>o@w|m#{R!h$A2#HpQGc?J_h1HjrhMn-!gjKqDtUjz#jJpJ1<1u+tJ!t|L2G8 z{QNNjwV;WgSCT^u3@&sP_wjutreM3Qx7EadCH8;fzYKMx2L21M|Fchl_|L}vpNRcG zp#u2BZz7KPm*RY2$L|0{6}xPtY^tV72-AoqXbKTqHP75-H^{x5<5bM!Np?A;docz=WU?RR~b{$DjO z@bgZl7LWtX1=@WVai7pnET^~0YRvyvp|;$PKlFc*3IAj(_Wx@1Emi{m@vBHD-vHE zicc)c`oq*npJE)pV<7W2@;_;$kt4L~>m` z%wwC2O9S(`+{J~c+HZGUTxx8<#l^+EfohCh>~9t+;n>6RL@vh->|<;VH^&CBHQXE< zxTD674MeN4eFJK1c*@v-+8V~j26DBx+c%&OjSXm9!;|_3?ijD@8_2bfE$SQFhuQ|T zFRz|d|AA@z5#MioJG?_}z%*7HFps$b^SD8+F*jg-of|NZxdHQ-8>lh1d>H>rzlTSy z-|NG;CZF(o*moc90`JyT2%jblTO_$t2WTUc)$LQE%veYf%c)sDaXfYAL#fv5q{$aj`yn%w3x>DjUDL$ m&*LXBe;mKD`Q!M34NQN|pTJUMTvFrX09uWY185%l+y4*PL+@|^ From c432ab13918c087597ecfcdf137cc4fd319c05e7 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 7 Jul 2019 12:44:07 -0400 Subject: [PATCH 048/162] src: simplify DEP0062 logic This commit simplifies the DEP0062 error logic. Instead of looking for certain combinations of flags, just show an error for any usage of --debug or --debug-brk. PR-URL: https://github.com/nodejs/node/pull/28589 Fixes: https://github.com/nodejs/node/issues/28588 Reviewed-By: Ruben Bridgewater Reviewed-By: Franziska Hinkelmann Reviewed-By: Rich Trott --- src/node_options.cc | 9 ++------- test/sequential/test-inspector-invalid-args.js | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/node_options.cc b/src/node_options.cc index 59b474166150ad..8666de948b6b3a 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -34,17 +34,12 @@ void DebugOptions::CheckOptions(std::vector* errors) { } #endif - if (deprecated_debug && !inspector_enabled) { + if (deprecated_debug) { errors->push_back("[DEP0062]: `node --debug` and `node --debug-brk` " - "are invalid. Please use `node --inspect` or " + "are invalid. Please use `node --inspect` and " "`node --inspect-brk` instead."); } - if (deprecated_debug && inspector_enabled && break_first_line) { - errors->push_back("[DEP0062]: `node --inspect --debug-brk` is deprecated. " - "Please use `node --inspect-brk` instead."); - } - std::vector destinations = SplitString(inspect_publish_uid_string, ','); inspect_publish_uid.console = false; diff --git a/test/sequential/test-inspector-invalid-args.js b/test/sequential/test-inspector-invalid-args.js index ae051b92ceda23..846a46a429ff73 100644 --- a/test/sequential/test-inspector-invalid-args.js +++ b/test/sequential/test-inspector-invalid-args.js @@ -10,7 +10,7 @@ const execFile = require('child_process').execFile; const mainScript = fixtures.path('loop.js'); const expected = '`node --debug` and `node --debug-brk` are invalid. ' + - 'Please use `node --inspect` or `node --inspect-brk` instead.'; + 'Please use `node --inspect` and `node --inspect-brk` instead.'; for (const invalidArg of ['--debug-brk', '--debug']) { execFile( process.execPath, From a8b094cf3b9bfe1e2dbc56744a71145d37f59007 Mon Sep 17 00:00:00 2001 From: GauthamBanasandra Date: Sat, 6 Jul 2019 20:09:13 +0530 Subject: [PATCH 049/162] src: implement special member functions for classes in env.h The classes in env.h were not adhering to the rule of five. As per the rule of five, if a class implements any of five special member functions, it must implement all the five special member functions for enabling the compiler for better optimization. Refs: https://en.cppreference.com/w/cpp/language/rule_of_three PR-URL: https://github.com/nodejs/node/pull/28579 Reviewed-By: Ben Noordhuis Reviewed-By: Joyee Cheung Reviewed-By: Rich Trott --- src/env.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/env.h b/src/env.h index 3d955297920a98..29b9a036cc11e0 100644 --- a/src/env.h +++ b/src/env.h @@ -462,6 +462,8 @@ class IsolateData : public MemoryRetainer { inline v8::Isolate* isolate() const; IsolateData(const IsolateData&) = delete; IsolateData& operator=(const IsolateData&) = delete; + IsolateData(IsolateData&&) = delete; + IsolateData& operator=(IsolateData&&) = delete; private: void DeserializeProperties(const std::vector* indexes); @@ -552,6 +554,12 @@ class AsyncRequest : public MemoryRetainer { public: AsyncRequest() = default; ~AsyncRequest(); + + AsyncRequest(const AsyncRequest&) = delete; + AsyncRequest& operator=(const AsyncRequest&) = delete; + AsyncRequest(AsyncRequest&&) = delete; + AsyncRequest& operator=(AsyncRequest&&) = delete; + void Install(Environment* env, void* data, uv_async_cb target); void Uninstall(); void Stop(); @@ -636,6 +644,9 @@ class AsyncHooks : public MemoryRetainer { AsyncHooks(const AsyncHooks&) = delete; AsyncHooks& operator=(const AsyncHooks&) = delete; + AsyncHooks(AsyncHooks&&) = delete; + AsyncHooks& operator=(AsyncHooks&&) = delete; + ~AsyncHooks() = default; // Used to set the kDefaultTriggerAsyncId in a scope. This is instead of // passing the trigger_async_id along with other constructor arguments. @@ -650,6 +661,9 @@ class AsyncHooks : public MemoryRetainer { DefaultTriggerAsyncIdScope(const DefaultTriggerAsyncIdScope&) = delete; DefaultTriggerAsyncIdScope& operator=(const DefaultTriggerAsyncIdScope&) = delete; + DefaultTriggerAsyncIdScope(DefaultTriggerAsyncIdScope&&) = delete; + DefaultTriggerAsyncIdScope& operator=(DefaultTriggerAsyncIdScope&&) = + delete; private: AsyncHooks* async_hooks_; @@ -679,6 +693,8 @@ class AsyncCallbackScope { ~AsyncCallbackScope(); AsyncCallbackScope(const AsyncCallbackScope&) = delete; AsyncCallbackScope& operator=(const AsyncCallbackScope&) = delete; + AsyncCallbackScope(AsyncCallbackScope&&) = delete; + AsyncCallbackScope& operator=(AsyncCallbackScope&&) = delete; private: Environment* env_; @@ -697,6 +713,9 @@ class ImmediateInfo : public MemoryRetainer { ImmediateInfo(const ImmediateInfo&) = delete; ImmediateInfo& operator=(const ImmediateInfo&) = delete; + ImmediateInfo(ImmediateInfo&&) = delete; + ImmediateInfo& operator=(ImmediateInfo&&) = delete; + ~ImmediateInfo() = default; SET_MEMORY_INFO_NAME(ImmediateInfo) SET_SELF_SIZE(ImmediateInfo) @@ -723,6 +742,9 @@ class TickInfo : public MemoryRetainer { TickInfo(const TickInfo&) = delete; TickInfo& operator=(const TickInfo&) = delete; + TickInfo(TickInfo&&) = delete; + TickInfo& operator=(TickInfo&&) = delete; + ~TickInfo() = default; private: friend class Environment; // So we can call the constructor. @@ -757,6 +779,12 @@ class ShouldNotAbortOnUncaughtScope { explicit inline ShouldNotAbortOnUncaughtScope(Environment* env); inline void Close(); inline ~ShouldNotAbortOnUncaughtScope(); + ShouldNotAbortOnUncaughtScope(const ShouldNotAbortOnUncaughtScope&) = delete; + ShouldNotAbortOnUncaughtScope& operator=( + const ShouldNotAbortOnUncaughtScope&) = delete; + ShouldNotAbortOnUncaughtScope(ShouldNotAbortOnUncaughtScope&&) = delete; + ShouldNotAbortOnUncaughtScope& operator=(ShouldNotAbortOnUncaughtScope&&) = + delete; private: Environment* env_; @@ -796,6 +824,8 @@ class Environment : public MemoryRetainer { public: Environment(const Environment&) = delete; Environment& operator=(const Environment&) = delete; + Environment(Environment&&) = delete; + Environment& operator=(Environment&&) = delete; SET_MEMORY_INFO_NAME(Environment) From 9be1111179e7460552b4b362811c2ab95fa7f48d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 5 Jul 2019 16:35:19 -0700 Subject: [PATCH 050/162] doc: move Usage and Example to same header level Having Example under Usage in synopsis.md is misleading. That suggests that the examples will be examples of the CLI usage, but the example section is mostly about writing a simple web server. Ideally, the Usage section should be moved to cli.md and the Example section should constitute a Getting Started or Quick Start page. But for now, make them equals under a combined header so that the Table of Contents and the header/layout of the page is not confusing or misleading. PR-URL: https://github.com/nodejs/node/pull/28570 Reviewed-By: Anna Henningsen Reviewed-By: Roman Reiss Reviewed-By: Trivikram Kamat --- doc/api/synopsis.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/synopsis.md b/doc/api/synopsis.md index 5c4cb820e4d82b..c296ffb0fa43c7 100644 --- a/doc/api/synopsis.md +++ b/doc/api/synopsis.md @@ -1,4 +1,6 @@ -# Usage +# Usage & Example + +## Usage From 5b9c22710aa7278fc2182e021aa1b5cdd4900298 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sun, 7 Jul 2019 07:59:44 +0200 Subject: [PATCH 051/162] http2: override authority with options Make `options.host` and `options.port` take precedence over `authority.host` and `authority.port` respectively. PR-URL: https://github.com/nodejs/node/pull/28584 Fixes: https://github.com/nodejs/node/issues/28182 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Franziska Hinkelmann Reviewed-By: Trivikram Kamat --- lib/internal/http2/core.js | 2 +- test/parallel/test-http2-connect.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 75ade8f7fa7acd..aadacdcdc497c2 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -2799,7 +2799,7 @@ function connect(authority, options, listener) { } else { switch (protocol) { case 'http:': - socket = net.connect(port, host); + socket = net.connect(options.port || port, options.host || host); break; case 'https:': socket = tls.connect(port, host, initializeTLSOptions(options, host)); diff --git a/test/parallel/test-http2-connect.js b/test/parallel/test-http2-connect.js index 2137ef28926726..a1291e3be956e1 100644 --- a/test/parallel/test-http2-connect.js +++ b/test/parallel/test-http2-connect.js @@ -101,3 +101,18 @@ if (hasIPv6) { } })); } + +// Check that `options.host` and `options.port` take precedence over +// `authority.host` and `authority.port`. +{ + const server = createServer(); + server.listen(0, mustCall(() => { + connect('http://foo.bar', { + host: 'localhost', + port: server.address().port + }, mustCall((session) => { + session.close(); + server.close(); + })); + })); +} From 44de4317cfb0dc2de0f0f7a6e0b46ce4c2fc2321 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Mon, 8 Jul 2019 23:36:06 -0700 Subject: [PATCH 052/162] n-api: make thread-safe-function calls properly Use `NapiCallIntoModuleThrow()` to execute the call into JavaScript and the finalizer for consistency with the rest of the calls into the N-API addon. PR-URL: https://github.com/nodejs/node/pull/28606 Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson --- src/node_api.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/node_api.cc b/src/node_api.cc index a10664d3e344fe..a9f26e551db03d 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -325,10 +325,9 @@ class ThreadSafeFunction : public node::AsyncResource { v8::Local::New(env->isolate, ref); js_callback = v8impl::JsValueFromV8LocalValue(js_cb); } - call_js_cb(env, - js_callback, - context, - data); + NapiCallIntoModuleThrow(env, [&]() { + call_js_cb(env, js_callback, context, data); + }); } } } @@ -347,7 +346,9 @@ class ThreadSafeFunction : public node::AsyncResource { v8::HandleScope scope(env->isolate); if (finalize_cb) { CallbackScope cb_scope(this); - finalize_cb(env, finalize_data, context); + NapiCallIntoModuleThrow(env, [&]() { + finalize_cb(env, finalize_data, context); + }); } EmptyQueueAndDelete(); } From b1db810d501079f767579a241c3f613e8a204294 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sat, 6 Jul 2019 14:13:09 +0200 Subject: [PATCH 053/162] gyp: pull Python 3 changes from node/node-gyp PR-URL: https://github.com/nodejs/node/pull/28573 Reviewed-By: Sam Roberts Reviewed-By: Ruben Bridgewater --- tools/gyp/PRESUBMIT.py | 16 +++- tools/gyp/pylib/gyp/MSVSNew.py | 17 ++-- tools/gyp/pylib/gyp/MSVSUserFile.py | 4 +- tools/gyp/pylib/gyp/__init__.py | 89 ++++++++++--------- tools/gyp/pylib/gyp/flock_tool.py | 2 +- tools/gyp/pylib/gyp/generator/analyzer.py | 88 +++++++++--------- .../gyp/generator/dump_dependency_json.py | 3 +- tools/gyp/pylib/gyp/generator/eclipse.py | 2 +- tools/gyp/pylib/gyp/generator/gypd.py | 2 +- tools/gyp/pylib/gyp/input_test.py | 22 ++--- tools/gyp/pylib/gyp/ordered_dict.py | 4 +- tools/gyp/pylib/gyp/simple_copy.py | 10 ++- tools/gyp/tools/graphviz.py | 30 ++++--- tools/gyp/tools/pretty_gyp.py | 31 ++++--- tools/gyp/tools/pretty_sln.py | 50 ++++++----- tools/gyp/tools/pretty_vcproj.py | 28 +++--- 16 files changed, 218 insertions(+), 180 deletions(-) diff --git a/tools/gyp/PRESUBMIT.py b/tools/gyp/PRESUBMIT.py index 4bc1b8ca26afda..e52f9d2d22d607 100644 --- a/tools/gyp/PRESUBMIT.py +++ b/tools/gyp/PRESUBMIT.py @@ -76,8 +76,7 @@ def _LicenseHeader(input_api): # Accept any year number from 2009 to the current year. current_year = int(input_api.time.strftime('%Y')) - allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1))) - + allowed_years = (str(s) for s in reversed(range(2009, current_year + 1))) years_re = '(' + '|'.join(allowed_years) + ')' # The (c) is deprecated, but tolerate it until it's removed from all files. @@ -124,3 +123,16 @@ def CheckChangeOnCommit(input_api, output_api): finally: sys.path = old_sys_path return report + + +TRYBOTS = [ + 'linux_try', + 'mac_try', + 'win_try', +] + + +def GetPreferredTryMasters(_, change): + return { + 'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS }, + } diff --git a/tools/gyp/pylib/gyp/MSVSNew.py b/tools/gyp/pylib/gyp/MSVSNew.py index 593f0e5b0b2e88..0ec628cc1f759d 100644 --- a/tools/gyp/pylib/gyp/MSVSNew.py +++ b/tools/gyp/pylib/gyp/MSVSNew.py @@ -4,22 +4,17 @@ """New implementation of Visual Studio project generation.""" +import hashlib import os import random import gyp.common -# hashlib is supplied as of Python 2.5 as the replacement interface for md5 -# and other secure hashes. In 2.6, md5 is deprecated. Import hashlib if -# available, avoiding a deprecation warning under 2.6. Import md5 otherwise, -# preserving 2.4 compatibility. try: - import hashlib - _new_md5 = hashlib.md5 -except ImportError: - import md5 - _new_md5 = md5.new - + cmp +except NameError: + def cmp(x, y): + return (x > y) - (x < y) # Initialize random number generator random.seed() @@ -50,7 +45,7 @@ def MakeGuid(name, seed='msvs_new'): not change when the project for a target is rebuilt. """ # Calculate a MD5 signature for the seed and name. - d = _new_md5(str(seed) + str(name)).hexdigest().upper() + d = hashlib.md5(str(seed) + str(name)).hexdigest().upper() # Convert most of the signature to GUID form (discard the rest) guid = ('{' + d[:8] + '-' + d[8:12] + '-' + d[12:16] + '-' + d[16:20] + '-' + d[20:32] + '}') diff --git a/tools/gyp/pylib/gyp/MSVSUserFile.py b/tools/gyp/pylib/gyp/MSVSUserFile.py index 6c07e9a893bac0..2264d640152a29 100644 --- a/tools/gyp/pylib/gyp/MSVSUserFile.py +++ b/tools/gyp/pylib/gyp/MSVSUserFile.py @@ -91,7 +91,7 @@ def AddDebugSettings(self, config_name, command, environment = {}, if environment and isinstance(environment, dict): env_list = ['%s="%s"' % (key, val) - for (key,val) in environment.iteritems()] + for (key,val) in environment.items()] environment = ' '.join(env_list) else: environment = '' @@ -135,7 +135,7 @@ def AddDebugSettings(self, config_name, command, environment = {}, def WriteIfChanged(self): """Writes the user file.""" configs = ['Configurations'] - for config, spec in sorted(self.configurations.iteritems()): + for config, spec in sorted(self.configurations.items()): configs.append(spec) content = ['VisualStudioUserFile', diff --git a/tools/gyp/pylib/gyp/__init__.py b/tools/gyp/pylib/gyp/__init__.py index 668f38b60d0093..dee834013f4144 100755 --- a/tools/gyp/pylib/gyp/__init__.py +++ b/tools/gyp/pylib/gyp/__init__.py @@ -4,9 +4,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import print_function + import copy import gyp.input -import optparse +import argparse import os.path import re import shlex @@ -14,6 +16,13 @@ import traceback from gyp.common import GypError +try: + # Python 2 + string_types = basestring +except NameError: + # Python 3 + string_types = str + # Default debug modes for GYP debug = {} @@ -34,8 +43,8 @@ def DebugOutput(mode, message, *args): pass if args: message %= args - print '%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]), - ctx[1], ctx[2], message) + print('%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]), + ctx[1], ctx[2], message)) def FindBuildFiles(): extension = '.gyp' @@ -207,7 +216,7 @@ def Noop(value): # We always want to ignore the environment when regenerating, to avoid # duplicate or changed flags in the environment at the time of regeneration. flags = ['--ignore-environment'] - for name, metadata in options._regeneration_metadata.iteritems(): + for name, metadata in options._regeneration_metadata.items(): opt = metadata['opt'] value = getattr(options, name) value_predicate = metadata['type'] == 'path' and FixPath or Noop @@ -226,24 +235,24 @@ def Noop(value): (action == 'store_false' and not value)): flags.append(opt) elif options.use_environment and env_name: - print >>sys.stderr, ('Warning: environment regeneration unimplemented ' + print('Warning: environment regeneration unimplemented ' 'for %s flag %r env_name %r' % (action, opt, - env_name)) + env_name), file=sys.stderr) else: - print >>sys.stderr, ('Warning: regeneration unimplemented for action %r ' - 'flag %r' % (action, opt)) + print('Warning: regeneration unimplemented for action %r ' + 'flag %r' % (action, opt), file=sys.stderr) return flags -class RegeneratableOptionParser(optparse.OptionParser): - def __init__(self): +class RegeneratableOptionParser(argparse.ArgumentParser): + def __init__(self, usage): self.__regeneratable_options = {} - optparse.OptionParser.__init__(self) + argparse.ArgumentParser.__init__(self, usage=usage) - def add_option(self, *args, **kw): + def add_argument(self, *args, **kw): """Add an option to the parser. - This accepts the same arguments as OptionParser.add_option, plus the + This accepts the same arguments as ArgumentParser.add_argument, plus the following: regenerate: can be set to False to prevent this option from being included in regeneration. @@ -260,7 +269,7 @@ def add_option(self, *args, **kw): # it as a string. type = kw.get('type') if type == 'path': - kw['type'] = 'string' + kw['type'] = str self.__regeneratable_options[dest] = { 'action': kw.get('action'), @@ -269,50 +278,50 @@ def add_option(self, *args, **kw): 'opt': args[0], } - optparse.OptionParser.add_option(self, *args, **kw) + argparse.ArgumentParser.add_argument(self, *args, **kw) def parse_args(self, *args): - values, args = optparse.OptionParser.parse_args(self, *args) + values, args = argparse.ArgumentParser.parse_known_args(self, *args) values._regeneration_metadata = self.__regeneratable_options return values, args def gyp_main(args): my_name = os.path.basename(sys.argv[0]) + usage = 'usage: %(prog)s [options ...] [build_file ...]' + - parser = RegeneratableOptionParser() - usage = 'usage: %s [options ...] [build_file ...]' - parser.set_usage(usage.replace('%s', '%prog')) - parser.add_option('--build', dest='configs', action='append', + parser = RegeneratableOptionParser(usage=usage.replace('%s', '%(prog)s')) + parser.add_argument('--build', dest='configs', action='append', help='configuration for build after project generation') - parser.add_option('--check', dest='check', action='store_true', + parser.add_argument('--check', dest='check', action='store_true', help='check format of gyp files') - parser.add_option('--config-dir', dest='config_dir', action='store', + parser.add_argument('--config-dir', dest='config_dir', action='store', env_name='GYP_CONFIG_DIR', default=None, help='The location for configuration files like ' 'include.gypi.') - parser.add_option('-d', '--debug', dest='debug', metavar='DEBUGMODE', + parser.add_argument('-d', '--debug', dest='debug', metavar='DEBUGMODE', action='append', default=[], help='turn on a debugging ' 'mode for debugging GYP. Supported modes are "variables", ' '"includes" and "general" or "all" for all of them.') - parser.add_option('-D', dest='defines', action='append', metavar='VAR=VAL', + parser.add_argument('-D', dest='defines', action='append', metavar='VAR=VAL', env_name='GYP_DEFINES', help='sets variable VAR to value VAL') - parser.add_option('--depth', dest='depth', metavar='PATH', type='path', + parser.add_argument('--depth', dest='depth', metavar='PATH', type='path', help='set DEPTH gyp variable to a relative path to PATH') - parser.add_option('-f', '--format', dest='formats', action='append', + parser.add_argument('-f', '--format', dest='formats', action='append', env_name='GYP_GENERATORS', regenerate=False, help='output formats to generate') - parser.add_option('-G', dest='generator_flags', action='append', default=[], + parser.add_argument('-G', dest='generator_flags', action='append', default=[], metavar='FLAG=VAL', env_name='GYP_GENERATOR_FLAGS', help='sets generator flag FLAG to VAL') - parser.add_option('--generator-output', dest='generator_output', + parser.add_argument('--generator-output', dest='generator_output', action='store', default=None, metavar='DIR', type='path', env_name='GYP_GENERATOR_OUTPUT', help='puts generated build files under DIR') - parser.add_option('--ignore-environment', dest='use_environment', + parser.add_argument('--ignore-environment', dest='use_environment', action='store_false', default=True, regenerate=False, help='do not read options from environment variables') - parser.add_option('-I', '--include', dest='includes', action='append', + parser.add_argument('-I', '--include', dest='includes', action='append', metavar='INCLUDE', type='path', help='files to include in all loaded .gyp files') # --no-circular-check disables the check for circular relationships between @@ -322,7 +331,7 @@ def gyp_main(args): # option allows the strict behavior to be used on Macs and the lenient # behavior to be used elsewhere. # TODO(mark): Remove this option when http://crbug.com/35878 is fixed. - parser.add_option('--no-circular-check', dest='circular_check', + parser.add_argument('--no-circular-check', dest='circular_check', action='store_false', default=True, regenerate=False, help="don't check for circular relationships between files") # --no-duplicate-basename-check disables the check for duplicate basenames @@ -331,18 +340,18 @@ def gyp_main(args): # when duplicate basenames are passed into Make generator on Mac. # TODO(yukawa): Remove this option when these legacy generators are # deprecated. - parser.add_option('--no-duplicate-basename-check', + parser.add_argument('--no-duplicate-basename-check', dest='duplicate_basename_check', action='store_false', default=True, regenerate=False, help="don't check for duplicate basenames") - parser.add_option('--no-parallel', action='store_true', default=False, + parser.add_argument('--no-parallel', action='store_true', default=False, help='Disable multiprocessing') - parser.add_option('-S', '--suffix', dest='suffix', default='', + parser.add_argument('-S', '--suffix', dest='suffix', default='', help='suffix to add to generated files') - parser.add_option('--toplevel-dir', dest='toplevel_dir', action='store', + parser.add_argument('--toplevel-dir', dest='toplevel_dir', action='store', default=None, metavar='DIR', type='path', help='directory to use as the root of the source tree') - parser.add_option('-R', '--root-target', dest='root_targets', + parser.add_argument('-R', '--root-target', dest='root_targets', action='append', metavar='TARGET', help='include only TARGET and its deep dependencies') @@ -410,7 +419,7 @@ def gyp_main(args): for option, value in sorted(options.__dict__.items()): if option[0] == '_': continue - if isinstance(value, basestring): + if isinstance(value, string_types): DebugOutput(DEBUG_GENERAL, " %s: '%s'", option, value) else: DebugOutput(DEBUG_GENERAL, " %s: %s", option, value) @@ -432,7 +441,7 @@ def gyp_main(args): build_file_dir = os.path.abspath(os.path.dirname(build_file)) build_file_dir_components = build_file_dir.split(os.path.sep) components_len = len(build_file_dir_components) - for index in xrange(components_len - 1, -1, -1): + for index in range(components_len - 1, -1, -1): if build_file_dir_components[index] == 'src': options.depth = os.path.sep.join(build_file_dir_components) break @@ -475,7 +484,7 @@ def gyp_main(args): if home_dot_gyp != None: default_include = os.path.join(home_dot_gyp, 'include.gypi') if os.path.exists(default_include): - print 'Using overrides found in ' + default_include + print('Using overrides found in ' + default_include) includes.append(default_include) # Command-line --include files come after the default include. @@ -536,7 +545,7 @@ def gyp_main(args): def main(args): try: return gyp_main(args) - except GypError, e: + except GypError as e: sys.stderr.write("gyp: %s\n" % e) return 1 diff --git a/tools/gyp/pylib/gyp/flock_tool.py b/tools/gyp/pylib/gyp/flock_tool.py index b38d8660f72853..81fb79d136a0a5 100755 --- a/tools/gyp/pylib/gyp/flock_tool.py +++ b/tools/gyp/pylib/gyp/flock_tool.py @@ -39,7 +39,7 @@ def ExecFlock(self, lockfile, *cmd_list): # where fcntl.flock(fd, LOCK_EX) always fails # with EBADF, that's why we use this F_SETLK # hack instead. - fd = os.open(lockfile, os.O_WRONLY|os.O_NOCTTY|os.O_CREAT, 0666) + fd = os.open(lockfile, os.O_WRONLY|os.O_NOCTTY|os.O_CREAT, 0o666) if sys.platform.startswith('aix'): # Python on AIX is compiled with LARGEFILE support, which changes the # struct size. diff --git a/tools/gyp/pylib/gyp/generator/analyzer.py b/tools/gyp/pylib/gyp/generator/analyzer.py index 921c1a6b714328..dc17c96524fddb 100644 --- a/tools/gyp/pylib/gyp/generator/analyzer.py +++ b/tools/gyp/pylib/gyp/generator/analyzer.py @@ -62,6 +62,8 @@ then the "all" target includes "b1" and "b2". """ +from __future__ import print_function + import gyp.common import gyp.ninja_syntax as ninja_syntax import json @@ -155,7 +157,7 @@ def _AddSources(sources, base_path, base_path_components, result): continue result.append(base_path + source) if debug: - print 'AddSource', org_source, result[len(result) - 1] + print('AddSource', org_source, result[len(result) - 1]) def _ExtractSourcesFromAction(action, base_path, base_path_components, @@ -185,7 +187,7 @@ def _ExtractSources(target, target_dict, toplevel_dir): base_path += '/' if debug: - print 'ExtractSources', target, base_path + print('ExtractSources', target, base_path) results = [] if 'sources' in target_dict: @@ -278,7 +280,7 @@ def _WasBuildFileModified(build_file, data, files, toplevel_dir): the root of the source tree.""" if _ToLocalPath(toplevel_dir, _ToGypPath(build_file)) in files: if debug: - print 'gyp file modified', build_file + print('gyp file modified', build_file) return True # First element of included_files is the file itself. @@ -291,8 +293,8 @@ def _WasBuildFileModified(build_file, data, files, toplevel_dir): _ToGypPath(gyp.common.UnrelativePath(include_file, build_file)) if _ToLocalPath(toplevel_dir, rel_include_file) in files: if debug: - print 'included gyp file modified, gyp_file=', build_file, \ - 'included file=', rel_include_file + print('included gyp file modified, gyp_file=', build_file, + 'included file=', rel_include_file) return True return False @@ -373,7 +375,7 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, # If a build file (or any of its included files) is modified we assume all # targets in the file are modified. if build_file_in_files[build_file]: - print 'matching target from modified build file', target_name + print('matching target from modified build file', target_name) target.match_status = MATCH_STATUS_MATCHES matching_targets.append(target) else: @@ -381,7 +383,7 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, toplevel_dir) for source in sources: if _ToGypPath(os.path.normpath(source)) in files: - print 'target', target_name, 'matches', source + print('target', target_name, 'matches', source) target.match_status = MATCH_STATUS_MATCHES matching_targets.append(target) break @@ -433,7 +435,7 @@ def _DoesTargetDependOnMatchingTargets(target): for dep in target.deps: if _DoesTargetDependOnMatchingTargets(dep): target.match_status = MATCH_STATUS_MATCHES_BY_DEPENDENCY - print '\t', target.name, 'matches by dep', dep.name + print('\t', target.name, 'matches by dep', dep.name) return True target.match_status = MATCH_STATUS_DOESNT_MATCH return False @@ -445,7 +447,7 @@ def _GetTargetsDependingOnMatchingTargets(possible_targets): supplied as input to analyzer. possible_targets: targets to search from.""" found = [] - print 'Targets that matched by dependency:' + print('Targets that matched by dependency:') for target in possible_targets: if _DoesTargetDependOnMatchingTargets(target): found.append(target) @@ -484,12 +486,12 @@ def _AddCompileTargets(target, roots, add_if_no_ancestor, result): (add_if_no_ancestor or target.requires_build)) or (target.is_static_library and add_if_no_ancestor and not target.is_or_has_linked_ancestor)): - print '\t\tadding to compile targets', target.name, 'executable', \ - target.is_executable, 'added_to_compile_targets', \ - target.added_to_compile_targets, 'add_if_no_ancestor', \ - add_if_no_ancestor, 'requires_build', target.requires_build, \ - 'is_static_library', target.is_static_library, \ - 'is_or_has_linked_ancestor', target.is_or_has_linked_ancestor + print('\t\tadding to compile targets', target.name, 'executable', + target.is_executable, 'added_to_compile_targets', + target.added_to_compile_targets, 'add_if_no_ancestor', + add_if_no_ancestor, 'requires_build', target.requires_build, + 'is_static_library', target.is_static_library, + 'is_or_has_linked_ancestor', target.is_or_has_linked_ancestor) result.add(target) target.added_to_compile_targets = True @@ -500,7 +502,7 @@ def _GetCompileTargets(matching_targets, supplied_targets): supplied_targets: set of targets supplied to analyzer to search from.""" result = set() for target in matching_targets: - print 'finding compile targets for match', target.name + print('finding compile targets for match', target.name) _AddCompileTargets(target, supplied_targets, True, result) return result @@ -508,46 +510,46 @@ def _GetCompileTargets(matching_targets, supplied_targets): def _WriteOutput(params, **values): """Writes the output, either to stdout or a file is specified.""" if 'error' in values: - print 'Error:', values['error'] + print('Error:', values['error']) if 'status' in values: - print values['status'] + print(values['status']) if 'targets' in values: values['targets'].sort() - print 'Supplied targets that depend on changed files:' + print('Supplied targets that depend on changed files:') for target in values['targets']: - print '\t', target + print('\t', target) if 'invalid_targets' in values: values['invalid_targets'].sort() - print 'The following targets were not found:' + print('The following targets were not found:') for target in values['invalid_targets']: - print '\t', target + print('\t', target) if 'build_targets' in values: values['build_targets'].sort() - print 'Targets that require a build:' + print('Targets that require a build:') for target in values['build_targets']: - print '\t', target + print('\t', target) if 'compile_targets' in values: values['compile_targets'].sort() - print 'Targets that need to be built:' + print('Targets that need to be built:') for target in values['compile_targets']: - print '\t', target + print('\t', target) if 'test_targets' in values: values['test_targets'].sort() - print 'Test targets:' + print('Test targets:') for target in values['test_targets']: - print '\t', target + print('\t', target) output_path = params.get('generator_flags', {}).get( 'analyzer_output_path', None) if not output_path: - print json.dumps(values) + print(json.dumps(values)) return try: f = open(output_path, 'w') f.write(json.dumps(values) + '\n') f.close() except IOError as e: - print 'Error writing to output file', output_path, str(e) + print('Error writing to output file', output_path, str(e)) def _WasGypIncludeFileModified(params, files): @@ -556,7 +558,7 @@ def _WasGypIncludeFileModified(params, files): if params['options'].includes: for include in params['options'].includes: if _ToGypPath(os.path.normpath(include)) in files: - print 'Include file modified, assuming all changed', include + print('Include file modified, assuming all changed', include) return True return False @@ -638,13 +640,13 @@ def find_matching_test_target_names(self): set(self._root_targets))] else: test_targets = [x for x in test_targets_no_all] - print 'supplied test_targets' + print('supplied test_targets') for target_name in self._test_target_names: - print '\t', target_name - print 'found test_targets' + print('\t', target_name) + print('found test_targets') for target in test_targets: - print '\t', target.name - print 'searching for matching test targets' + print('\t', target.name) + print('searching for matching test targets') matching_test_targets = _GetTargetsDependingOnMatchingTargets(test_targets) matching_test_targets_contains_all = (test_target_names_contains_all and set(matching_test_targets) & @@ -654,14 +656,14 @@ def find_matching_test_target_names(self): # 'all' is subsequentely added to the matching names below. matching_test_targets = [x for x in (set(matching_test_targets) & set(test_targets_no_all))] - print 'matched test_targets' + print('matched test_targets') for target in matching_test_targets: - print '\t', target.name + print('\t', target.name) matching_target_names = [gyp.common.ParseQualifiedTarget(target.name)[1] for target in matching_test_targets] if matching_test_targets_contains_all: matching_target_names.append('all') - print '\tall' + print('\tall') return matching_target_names def find_matching_compile_target_names(self): @@ -677,10 +679,10 @@ def find_matching_compile_target_names(self): if 'all' in self._supplied_target_names(): supplied_targets = [x for x in (set(supplied_targets) | set(self._root_targets))] - print 'Supplied test_targets & compile_targets' + print('Supplied test_targets & compile_targets') for target in supplied_targets: - print '\t', target.name - print 'Finding compile targets' + print('\t', target.name) + print('Finding compile targets') compile_targets = _GetCompileTargets(self._changed_targets, supplied_targets) return [gyp.common.ParseQualifiedTarget(target.name)[1] @@ -699,7 +701,7 @@ def GenerateOutput(target_list, target_dicts, data, params): toplevel_dir = _ToGypPath(os.path.abspath(params['options'].toplevel_dir)) if debug: - print 'toplevel_dir', toplevel_dir + print('toplevel_dir', toplevel_dir) if _WasGypIncludeFileModified(params, config.files): result_dict = { 'status': all_changed_string, diff --git a/tools/gyp/pylib/gyp/generator/dump_dependency_json.py b/tools/gyp/pylib/gyp/generator/dump_dependency_json.py index 160eafe2efeca0..8e4f3168f3e7ef 100644 --- a/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +++ b/tools/gyp/pylib/gyp/generator/dump_dependency_json.py @@ -1,3 +1,4 @@ +from __future__ import print_function # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -96,4 +97,4 @@ def GenerateOutput(target_list, target_dicts, data, params): f = open(filename, 'w') json.dump(edges, f) f.close() - print 'Wrote json to %s.' % filename + print('Wrote json to %s.' % filename) diff --git a/tools/gyp/pylib/gyp/generator/eclipse.py b/tools/gyp/pylib/gyp/generator/eclipse.py index 3544347b3bacd4..b7c6aa951fd131 100644 --- a/tools/gyp/pylib/gyp/generator/eclipse.py +++ b/tools/gyp/pylib/gyp/generator/eclipse.py @@ -141,7 +141,7 @@ def GetAllIncludeDirectories(target_list, target_dicts, compiler_includes_list.append(include_dir) # Find standard gyp include dirs. - if config.has_key('include_dirs'): + if 'include_dirs' in config: include_dirs = config['include_dirs'] for shared_intermediate_dir in shared_intermediate_dirs: for include_dir in include_dirs: diff --git a/tools/gyp/pylib/gyp/generator/gypd.py b/tools/gyp/pylib/gyp/generator/gypd.py index 3efdb9966a69a1..78eeaa61b2294a 100644 --- a/tools/gyp/pylib/gyp/generator/gypd.py +++ b/tools/gyp/pylib/gyp/generator/gypd.py @@ -88,7 +88,7 @@ def GenerateOutput(target_list, target_dicts, data, params): if not output_file in output_files: output_files[output_file] = input_file - for output_file, input_file in output_files.iteritems(): + for output_file, input_file in output_files.items(): output = open(output_file, 'w') pprint.pprint(data[input_file], output) output.close() diff --git a/tools/gyp/pylib/gyp/input_test.py b/tools/gyp/pylib/gyp/input_test.py index 4234fbb8302eb9..1bc5e3d3081ea6 100755 --- a/tools/gyp/pylib/gyp/input_test.py +++ b/tools/gyp/pylib/gyp/input_test.py @@ -22,38 +22,38 @@ def _create_dependency(self, dependent, dependency): dependency.dependents.append(dependent) def test_no_cycle_empty_graph(self): - for label, node in self.nodes.iteritems(): - self.assertEquals([], node.FindCycles()) + for label, node in self.nodes.items(): + self.assertEqual([], node.FindCycles()) def test_no_cycle_line(self): self._create_dependency(self.nodes['a'], self.nodes['b']) self._create_dependency(self.nodes['b'], self.nodes['c']) self._create_dependency(self.nodes['c'], self.nodes['d']) - for label, node in self.nodes.iteritems(): - self.assertEquals([], node.FindCycles()) + for label, node in self.nodes.items(): + self.assertEqual([], node.FindCycles()) def test_no_cycle_dag(self): self._create_dependency(self.nodes['a'], self.nodes['b']) self._create_dependency(self.nodes['a'], self.nodes['c']) self._create_dependency(self.nodes['b'], self.nodes['c']) - for label, node in self.nodes.iteritems(): - self.assertEquals([], node.FindCycles()) + for label, node in self.nodes.items(): + self.assertEqual([], node.FindCycles()) def test_cycle_self_reference(self): self._create_dependency(self.nodes['a'], self.nodes['a']) - self.assertEquals([[self.nodes['a'], self.nodes['a']]], + self.assertEqual([[self.nodes['a'], self.nodes['a']]], self.nodes['a'].FindCycles()) def test_cycle_two_nodes(self): self._create_dependency(self.nodes['a'], self.nodes['b']) self._create_dependency(self.nodes['b'], self.nodes['a']) - self.assertEquals([[self.nodes['a'], self.nodes['b'], self.nodes['a']]], + self.assertEqual([[self.nodes['a'], self.nodes['b'], self.nodes['a']]], self.nodes['a'].FindCycles()) - self.assertEquals([[self.nodes['b'], self.nodes['a'], self.nodes['b']]], + self.assertEqual([[self.nodes['b'], self.nodes['a'], self.nodes['b']]], self.nodes['b'].FindCycles()) def test_two_cycles(self): @@ -68,7 +68,7 @@ def test_two_cycles(self): [self.nodes['a'], self.nodes['b'], self.nodes['a']] in cycles) self.assertTrue( [self.nodes['b'], self.nodes['c'], self.nodes['b']] in cycles) - self.assertEquals(2, len(cycles)) + self.assertEqual(2, len(cycles)) def test_big_cycle(self): self._create_dependency(self.nodes['a'], self.nodes['b']) @@ -77,7 +77,7 @@ def test_big_cycle(self): self._create_dependency(self.nodes['d'], self.nodes['e']) self._create_dependency(self.nodes['e'], self.nodes['a']) - self.assertEquals([[self.nodes['a'], + self.assertEqual([[self.nodes['a'], self.nodes['b'], self.nodes['c'], self.nodes['d'], diff --git a/tools/gyp/pylib/gyp/ordered_dict.py b/tools/gyp/pylib/gyp/ordered_dict.py index a1e89f9199087d..6fe9c1f6c7c22b 100644 --- a/tools/gyp/pylib/gyp/ordered_dict.py +++ b/tools/gyp/pylib/gyp/ordered_dict.py @@ -161,8 +161,8 @@ def itervalues(self): for k in self: yield self[k] - def iteritems(self): - 'od.iteritems -> an iterator over the (key, value) items in od' + def items(self): + 'od.items -> an iterator over the (key, value) items in od' for k in self: yield (k, self[k]) diff --git a/tools/gyp/pylib/gyp/simple_copy.py b/tools/gyp/pylib/gyp/simple_copy.py index 74c98c5a79594b..94a6f17dab5d1c 100644 --- a/tools/gyp/pylib/gyp/simple_copy.py +++ b/tools/gyp/pylib/gyp/simple_copy.py @@ -28,8 +28,12 @@ def deepcopy(x): def _deepcopy_atomic(x): return x -for x in (type(None), int, long, float, - bool, str, unicode, type): +try: + types = bool, float, int, str, type, type(None), long, unicode +except NameError: # Python 3 + types = bool, float, int, str, type, type(None) + +for x in types: d[x] = _deepcopy_atomic def _deepcopy_list(x): @@ -38,7 +42,7 @@ def _deepcopy_list(x): def _deepcopy_dict(x): y = {} - for key, value in x.iteritems(): + for key, value in x.items(): y[deepcopy(key)] = deepcopy(value) return y d[dict] = _deepcopy_dict diff --git a/tools/gyp/tools/graphviz.py b/tools/gyp/tools/graphviz.py index 326ae221cf8e82..538b059da4a7e6 100755 --- a/tools/gyp/tools/graphviz.py +++ b/tools/gyp/tools/graphviz.py @@ -8,6 +8,8 @@ generate input suitable for graphviz to render a dependency graph of targets.""" +from __future__ import print_function + import collections import json import sys @@ -50,9 +52,9 @@ def WriteGraph(edges): build_file, target_name, toolset = ParseTarget(src) files[build_file].append(src) - print 'digraph D {' - print ' fontsize=8' # Used by subgraphs. - print ' node [fontsize=8]' + print('digraph D {') + print(' fontsize=8') # Used by subgraphs. + print(' node [fontsize=8]') # Output nodes by file. We must first write out each node within # its file grouping before writing out any edges that may refer @@ -63,31 +65,31 @@ def WriteGraph(edges): # the display by making it a box without an internal node. target = targets[0] build_file, target_name, toolset = ParseTarget(target) - print ' "%s" [shape=box, label="%s\\n%s"]' % (target, filename, - target_name) + print(' "%s" [shape=box, label="%s\\n%s"]' % (target, filename, + target_name)) else: # Group multiple nodes together in a subgraph. - print ' subgraph "cluster_%s" {' % filename - print ' label = "%s"' % filename + print(' subgraph "cluster_%s" {' % filename) + print(' label = "%s"' % filename) for target in targets: build_file, target_name, toolset = ParseTarget(target) - print ' "%s" [label="%s"]' % (target, target_name) - print ' }' + print(' "%s" [label="%s"]' % (target, target_name)) + print(' }') # Now that we've placed all the nodes within subgraphs, output all # the edges between nodes. for src, dsts in edges.items(): for dst in dsts: - print ' "%s" -> "%s"' % (src, dst) + print(' "%s" -> "%s"' % (src, dst)) - print '}' + print('}') def main(): if len(sys.argv) < 2: - print >>sys.stderr, __doc__ - print >>sys.stderr - print >>sys.stderr, 'usage: %s target1 target2...' % (sys.argv[0]) + print(__doc__, file=sys.stderr) + print(file=sys.stderr) + print('usage: %s target1 target2...' % (sys.argv[0]), file=sys.stderr) return 1 edges = LoadEdges('dump.json', sys.argv[1:]) diff --git a/tools/gyp/tools/pretty_gyp.py b/tools/gyp/tools/pretty_gyp.py index d5736bbd4a6009..d01c692edcf8d6 100755 --- a/tools/gyp/tools/pretty_gyp.py +++ b/tools/gyp/tools/pretty_gyp.py @@ -6,6 +6,8 @@ """Pretty-prints the contents of a GYP file.""" +from __future__ import print_function + import sys import re @@ -118,23 +120,24 @@ def prettyprint_input(lines): basic_offset = 2 last_line = "" for line in lines: - line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix. - if len(line) > 0: - brace_diff = 0 - if not COMMENT_RE.match(line): + if COMMENT_RE.match(line): + print(line) + else: + line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix. + if len(line) > 0: (brace_diff, after) = count_braces(line) - if brace_diff != 0: - if after: - print " " * (basic_offset * indent) + line - indent += brace_diff + if brace_diff != 0: + if after: + print(" " * (basic_offset * indent) + line) + indent += brace_diff + else: + indent += brace_diff + print(" " * (basic_offset * indent) + line) else: - indent += brace_diff - print " " * (basic_offset * indent) + line + print(" " * (basic_offset * indent) + line) else: - print " " * (basic_offset * indent) + line - else: - print "" - last_line = line + print("") + last_line = line def main(): diff --git a/tools/gyp/tools/pretty_sln.py b/tools/gyp/tools/pretty_sln.py index ca8cf4ad3fb836..196566fb9e4470 100755 --- a/tools/gyp/tools/pretty_sln.py +++ b/tools/gyp/tools/pretty_sln.py @@ -12,13 +12,15 @@ Then it outputs a possible build order. """ -__author__ = 'nsylvain (Nicolas Sylvain)' +from __future__ import print_function import os import re import sys import pretty_vcproj +__author__ = 'nsylvain (Nicolas Sylvain)' + def BuildProject(project, built, projects, deps): # if all dependencies are done, we can build it, otherwise we try to build the # dependency. @@ -26,7 +28,7 @@ def BuildProject(project, built, projects, deps): for dep in deps[project]: if dep not in built: BuildProject(dep, built, projects, deps) - print project + print(project) built.append(project) def ParseSolution(solution_file): @@ -100,44 +102,44 @@ def ParseSolution(solution_file): return (projects, dependencies) def PrintDependencies(projects, deps): - print "---------------------------------------" - print "Dependencies for all projects" - print "---------------------------------------" - print "-- --" + print("---------------------------------------") + print("Dependencies for all projects") + print("---------------------------------------") + print("-- --") for (project, dep_list) in sorted(deps.items()): - print "Project : %s" % project - print "Path : %s" % projects[project][0] + print("Project : %s" % project) + print("Path : %s" % projects[project][0]) if dep_list: for dep in dep_list: - print " - %s" % dep - print "" + print(" - %s" % dep) + print("") - print "-- --" + print("-- --") def PrintBuildOrder(projects, deps): - print "---------------------------------------" - print "Build order " - print "---------------------------------------" - print "-- --" + print("---------------------------------------") + print("Build order ") + print("---------------------------------------") + print("-- --") built = [] for (project, _) in sorted(deps.items()): if project not in built: BuildProject(project, built, projects, deps) - print "-- --" + print("-- --") def PrintVCProj(projects): for project in projects: - print "-------------------------------------" - print "-------------------------------------" - print project - print project - print project - print "-------------------------------------" - print "-------------------------------------" + print("-------------------------------------") + print("-------------------------------------") + print(project) + print(project) + print(project) + print("-------------------------------------") + print("-------------------------------------") project_path = os.path.abspath(os.path.join(os.path.dirname(sys.argv[1]), projects[project][2])) @@ -153,7 +155,7 @@ def PrintVCProj(projects): def main(): # check if we have exactly 1 parameter. if len(sys.argv) < 2: - print 'Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0] + print('Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0]) return 1 (projects, deps) = ParseSolution(sys.argv[1]) diff --git a/tools/gyp/tools/pretty_vcproj.py b/tools/gyp/tools/pretty_vcproj.py index 6099bd7cc4d8cc..8263389d9b4d43 100755 --- a/tools/gyp/tools/pretty_vcproj.py +++ b/tools/gyp/tools/pretty_vcproj.py @@ -12,7 +12,7 @@ It outputs the resulting xml to stdout. """ -__author__ = 'nsylvain (Nicolas Sylvain)' +from __future__ import print_function import os import sys @@ -20,6 +20,14 @@ from xml.dom.minidom import parse from xml.dom.minidom import Node +__author__ = 'nsylvain (Nicolas Sylvain)' + +try: + cmp +except NameError: + def cmp(x, y): + return (x > y) - (x < y) + REPLACEMENTS = dict() ARGUMENTS = None @@ -61,7 +69,7 @@ def get_string(node): def PrettyPrintNode(node, indent=0): if node.nodeType == Node.TEXT_NODE: if node.data.strip(): - print '%s%s' % (' '*indent, node.data.strip()) + print('%s%s' % (' '*indent, node.data.strip())) return if node.childNodes: @@ -73,23 +81,23 @@ def PrettyPrintNode(node, indent=0): # Print the main tag if attr_count == 0: - print '%s<%s>' % (' '*indent, node.nodeName) + print('%s<%s>' % (' '*indent, node.nodeName)) else: - print '%s<%s' % (' '*indent, node.nodeName) + print('%s<%s' % (' '*indent, node.nodeName)) all_attributes = [] for (name, value) in node.attributes.items(): all_attributes.append((name, value)) all_attributes.sort(CmpTuple()) for (name, value) in all_attributes: - print '%s %s="%s"' % (' '*indent, name, value) - print '%s>' % (' '*indent) + print('%s %s="%s"' % (' '*indent, name, value)) + print('%s>' % (' '*indent)) if node.nodeValue: - print '%s %s' % (' '*indent, node.nodeValue) + print('%s %s' % (' '*indent, node.nodeValue)) for sub_node in node.childNodes: PrettyPrintNode(sub_node, indent=indent+2) - print '%s' % (' '*indent, node.nodeName) + print('%s' % (' '*indent, node.nodeName)) def FlattenFilter(node): @@ -283,8 +291,8 @@ def main(argv): # check if we have exactly 1 parameter. if len(argv) < 2: - print ('Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] ' - '[key2=value2]' % argv[0]) + print('Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] ' + '[key2=value2]' % argv[0]) return 1 # Parse the keys From b4643dd9dcf6c01eed446a83354674a8786d009d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 5 Jul 2019 14:15:19 -0700 Subject: [PATCH 054/162] test: add test-fs-writeFileSync-invalid-windows Add a known_issues test for the Windows returning ENOTFOUND where EINVAL is more appropriate. This happens with various functions in the `fs` module when an invalid path is used. Refs: https://github.com/nodejs/node/issues/8987 PR-URL: https://github.com/nodejs/node/pull/28569 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- .../test-fs-writeFileSync-invalid-windows.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/known_issues/test-fs-writeFileSync-invalid-windows.js diff --git a/test/known_issues/test-fs-writeFileSync-invalid-windows.js b/test/known_issues/test-fs-writeFileSync-invalid-windows.js new file mode 100644 index 00000000000000..614b7427c02d98 --- /dev/null +++ b/test/known_issues/test-fs-writeFileSync-invalid-windows.js @@ -0,0 +1,21 @@ +'use strict'; + +const common = require('../common'); + +// Test that using an invalid file name with writeFileSync() on Windows returns +// EINVAL. With libuv 1.x, it returns ENOTFOUND. This should be fixed when we +// update to libuv 2.x. +// +// Refs: https://github.com/nodejs/node/issues/8987 + +const assert = require('assert'); +const fs = require('fs'); + +if (!common.isWindows) { + // Change to `common.skip()` when the test is moved out of `known_issues`. + assert.fail('Windows-only test'); +} + +assert.throws(() => { + fs.writeFileSync('fhqwhgads??', 'come on'); +}, { code: 'EINVAL' }); From ac9908fe3710d0c00c4f72bff92e4717fa2f0f6c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 8 Jul 2019 14:58:24 -0700 Subject: [PATCH 055/162] doc: update stream.md "Organization of this Document" Revise the text of "Organization of this Document" in stream.md for simplicity. PR-URL: https://github.com/nodejs/node/pull/28601 Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- doc/api/stream.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 57babaf3020952..471a0cdda49942 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -28,10 +28,9 @@ the `stream` module directly. ## Organization of this Document -This document is divided into two primary sections with a third section for -additional notes. The first section explains the elements of the stream API that -are required to *use* streams within an application. The second section explains -the elements of the API that are required to *implement* new types of streams. +This document contains two primary sections and a third section for notes. The +first section explains how to use existing streams within an application. The +second section explains how to create new types of streams. ## Types of Streams From 0aca52726397e5b503f70949eec867c06720a66f Mon Sep 17 00:00:00 2001 From: Jan Krems Date: Wed, 10 Jul 2019 13:20:43 -0700 Subject: [PATCH 056/162] doc: mention unit for event loop delay measurements PR-URL: https://github.com/nodejs/node/pull/28629 Reviewed-By: Ben Coe Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater --- doc/api/perf_hooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index 007445ba056a27..ce72ba680aebd9 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -419,7 +419,7 @@ added: v11.10.0 * Returns: {Histogram} Creates a `Histogram` object that samples and reports the event loop delay -over time. +over time. The delays will be reported in nanoseconds. Using a timer to detect approximate event loop delay works because the execution of timers is tied specifically to the lifecycle of the libuv From 997531193b27e312cf8ca8c142019599b9dafdd8 Mon Sep 17 00:00:00 2001 From: vmarchaud Date: Sun, 30 Jun 2019 22:37:18 +0200 Subject: [PATCH 057/162] perf_hooks: add HttpRequest statistics monitoring #28445 ```js const { PerformanceObserver, performance } = require('perf_hooks'); const http = require('http'); const obs = new PerformanceObserver((items) => { const entry = items.getEntries()[0]; console.log(entry.name, entry.duration); }); obs.observe({ entryTypes: ['http'] }); const server = http.Server(function(req, res) { server.close(); res.writeHead(200); res.end('hello world\n'); }); server.listen(0, function() { const req = http.request({ port: this.address().port, path: '/', method: 'POST' }).end(); }); ``` PR-URL: https://github.com/nodejs/node/pull/28486 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- doc/api/perf_hooks.md | 2 +- lib/_http_server.js | 20 ++++++++- lib/internal/http.js | 20 ++++++++- lib/perf_hooks.js | 5 ++- src/node_perf.cc | 16 ++++++++ src/node_perf_common.h | 3 +- test/parallel/test-http-perf_hooks.js | 58 +++++++++++++++++++++++++++ 7 files changed, 119 insertions(+), 5 deletions(-) create mode 100644 test/parallel/test-http-perf_hooks.js diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index ce72ba680aebd9..c143b161a3ff10 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -183,7 +183,7 @@ added: v8.5.0 * {string} The type of the performance entry. Currently it may be one of: `'node'`, -`'mark'`, `'measure'`, `'gc'`, `'function'`, or `'http2'`. +`'mark'`, `'measure'`, `'gc'`, `'function'`, `'http2'` or `'http'`. ### performanceEntry.kind /;var h=/^<\?/;var p=/\?>/;var v=/^/;var D=/^/;var g=/^$/;var E=new RegExp(i.source+"\\s*$");function blockHtml(e,t,r){var i=this;var A=i.options.blocks.join("|");var C=new RegExp("^|$))","i");var y=t.length;var w=0;var x;var b;var F;var S;var B;var k;var O;var P=[[o,l,true],[f,c,true],[h,p,true],[v,d,true],[D,m,true],[C,g,true],[E,g,false]];while(w0&&v.indenta){return}if(!m||!l&&u.charAt(c+1)===n){return}f=u.length+1;D="";while(++c0){const t=peek();if(!i.isHexDigit(t)){throw invalidChar(read())}e+=read()}return String.fromCodePoint(parseInt(e,16))}const E={start(){if(f.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(f.type){case"identifier":case"string":c=f.value;a="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(f.type==="eof"){throw invalidEOF()}a="beforePropertyValue"},beforePropertyValue(){if(f.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(f.type==="eof"){throw invalidEOF()}if(f.type==="punctuator"&&f.value==="]"){pop();return}push()},afterPropertyValue(){if(f.type==="eof"){throw invalidEOF()}switch(f.value){case",":a="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(f.type==="eof"){throw invalidEOF()}switch(f.value){case",":a="beforeArrayValue";return;case"]":pop()}},end(){}};function push(){let e;switch(f.type){case"punctuator":switch(f.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=f.value;break}if(h===undefined){h=e}else{const t=u[u.length-1];if(Array.isArray(t)){t.push(e)}else{t[c]=e}}if(e!==null&&typeof e==="object"){u.push(e);if(Array.isArray(e)){a="beforeArrayValue"}else{a="beforePropertyName"}}else{const e=u[u.length-1];if(e==null){a="end"}else if(Array.isArray(e)){a="afterArrayValue"}else{a="afterPropertyValue"}}}function pop(){u.pop();const e=u[u.length-1];if(e==null){a="end"}else if(Array.isArray(e)){a="afterArrayValue"}else{a="afterPropertyValue"}}function invalidChar(e){if(e===undefined){return syntaxError(`JSON5: invalid end of input at ${o}:${l}`)}return syntaxError(`JSON5: invalid character '${formatChar(e)}' at ${o}:${l}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${o}:${l}`)}function invalidIdentifier(){l-=5;return syntaxError(`JSON5: invalid identifier character at ${o}:${l}`)}function separatorChar(e){console.warn(`JSON5: '${formatChar(e)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e]){return t[e]}if(e<" "){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function syntaxError(e){const t=new SyntaxError(e);t.lineNumber=o;t.columnNumber=l;return t}},,function(e,t,r){"use strict";var i=r(66);var n=r(589);var a=r(345);var u=r(347)("unified-engine:find-up");var s=r(692);e.exports=FindUp;var o=i.readFile;var l=n.resolve;var f=n.relative;var c=n.join;var h=n.dirname;FindUp.prototype.load=load;function FindUp(e){var t=this;var r=e.filePath;t.cache={};t.cwd=e.cwd;t.detect=e.detect;t.names=e.names;t.create=e.create;if(r){t.givenFilePath=l(e.cwd,r)}}function load(e,t){var r=this;var i=r.cache;var n=r.givenFilePath;var p=r.givenFile;var v=r.names;var d=r.create;var D=r.cwd;var m;if(n){if(p){apply(t,p)}else{p=[t];r.givenFile=p;u("Checking given file `%s`",n);o(n,loadGiven)}return}if(!r.detect){return t()}e=l(D,e);m=h(e);if(m in i){apply(t,i[m])}else{i[m]=[t];find(m)}function loadGiven(e,t){var i=r.givenFile;var s;if(e){s=a("Cannot read given file `%s`\n%s",f(D,n),e.stack);s.code="ENOENT";s.path=e.path;s.syscall=e.syscall}else{try{s=d(t,n);u("Read given file `%s`",n)}catch(e){s=a("Cannot parse given file `%s`\n%s",f(D,n),e.stack);u(e.message)}}p=s;r.givenFile=s;applyAll(i,s)}function find(t){var r=-1;var n=v.length;next();function next(){var a;if(++r{if(e)console.error(e);process.exit(t)})},,,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:code-block-style",codeBlockStyle);var s=a.start;var o=a.end;var l={null:true,fenced:true,indented:true};function codeBlockStyle(e,t,r){var i=String(t);r=typeof r==="string"&&r!=="consistent"?r:null;if(l[r]!==true){t.fail("Invalid code block style `"+r+"`: use either `'consistent'`, `'fenced'`, or `'indented'`")}n(e,"code",visitor);function visitor(e){var i=check(e);if(i){if(!r){r=i}else if(r!==i){t.message("Code blocks should be "+r,e)}}}function check(e){var t=s(e).offset;var r=o(e).offset;if(u(e)){return null}return e.lang||/^\s*([~`])\1{2,}/.test(i.slice(t,r))?"fenced":"indented"}}},,,function(e,t,r){"use strict";var i=r(589);var n=r(77);var a=r(289);e.exports=Ignore;Ignore.prototype.check=check;var u=i.dirname;var s=i.relative;var o=i.resolve;function Ignore(e){this.cwd=e.cwd;this.findUp=new a({filePath:e.ignorePath,cwd:e.cwd,detect:e.detectIgnore,names:e.ignoreName?[e.ignoreName]:[],create:create})}function check(e,t){var r=this;r.findUp.load(e,done);function done(i,n){var a;if(i){t(i)}else if(n){a=s(n.filePath,o(r.cwd,e));t(null,a?n.ignores(a):false)}else{t(null,false)}}}function create(e,t){var r=n().add(String(e));r.filePath=u(t);return r}},,,,function(e){e.exports={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"}},,,,function(e,t,r){"use strict";var i=r(54);e.exports=enclose;var n="(";var a=")";var u="<";var s=">";var o=/\s/;function enclose(e,t){if(t||e.length===0||o.test(e)||i(e,n)!==i(e,a)){return u+e+s}return e}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:table-pipes",tablePipes);var s=a.start;var o=a.end;var l="Missing initial pipe in table fence";var f="Missing final pipe in table fence";function tablePipes(e,t){var r=String(t);n(e,"table",visitor);function visitor(e){var i=e.children;var n=i.length;var a=-1;var c;var h;var p;var v;var d;var D;while(++a0?parseInt(t):null};for(;i1)return true;for(var a=0;athis.maxLength)return t();if(!this.stat&&m(this.cache,r)){var a=this.cache[r];if(Array.isArray(a))a="DIR";if(!n||a==="DIR")return t(null,a);if(n&&a==="FILE")return t()}var u;var s=this.statCache[r];if(s!==undefined){if(s===false)return t(null,s);else{var o=s.isDirectory()?"DIR":"FILE";if(n&&o==="FILE")return t();else return t(null,o,s)}}var l=this;var f=g("stat\0"+r,lstatcb_);if(f)i.lstat(r,f);function lstatcb_(n,a){if(a&&a.isSymbolicLink()){return i.stat(r,function(i,n){if(i)l._stat2(e,r,null,a,t);else l._stat2(e,r,i,n,t)})}else{l._stat2(e,r,n,a,t)}}};Glob.prototype._stat2=function(e,t,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return n()}var a=e.slice(-1)==="/";this.statCache[t]=i;if(t.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,false,i);var u=true;if(i)u=i.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||u;if(a&&u==="FILE")return n();return n(null,u,i)}},function(e,t,r){"use strict";var i=r(36);var n=r(439);var a=r(934);var u=r(724);e.exports=paragraph;var s="\t";var o="\n";var l=" ";var f=4;function paragraph(e,t,r){var c=this;var h=c.options;var p=h.commonmark;var v=h.gfm;var d=c.blockTokenizers;var D=c.interruptParagraph;var m=t.indexOf(o);var g=t.length;var E;var A;var C;var y;var w;while(m=f&&C!==o){m=t.indexOf(o,m+1);continue}}A=t.slice(m+1);if(u(D,d,c,[e,A,true])){break}if(d.list.call(c,e,A,true)&&(c.inList||p||v&&!n(i.left(A).charAt(0)))){break}E=m;m=t.indexOf(o,m+1);if(m!==-1&&i(t.slice(E,m))===""){m=E;break}}A=t.slice(0,m);if(i(A)===""){e(A);return null}if(r){return true}w=e.now();A=a(A);return e(A)({type:"paragraph",children:c.tokenizeInline(A,w)})}},function(e,t,r){"use strict";var i;var n;try{var a=i;n=r(644)}catch(e){if(typeof window!=="undefined")n=window.esprima}var u=r(211);function resolveJavascriptFunction(e){if(e===null)return false;try{var t="("+e+")",r=n.parse(t,{range:true});if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(e){return false}}function constructJavascriptFunction(e){var t="("+e+")",r=n.parse(t,{range:true}),i=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}r.body[0].expression.params.forEach(function(e){i.push(e.name)});a=r.body[0].expression.body.range;if(r.body[0].expression.body.type==="BlockStatement"){return new Function(i,t.slice(a[0]+1,a[1]-1))}return new Function(i,"return "+t.slice(a[0],a[1]))}function representJavascriptFunction(e){return e.toString()}function isFunction(e){return Object.prototype.toString.call(e)==="[object Function]"}e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},,,function(e,t,r){"use strict";var i=r(171);var n=r(984);var a=r(426);e.exports=reference;reference.locator=n;var u="link";var s="image";var o="footnote";var l="shortcut";var f="collapsed";var c="full";var h=" ";var p="!";var v="[";var d="\\";var D="]";var m="^";function reference(e,t,r){var n=this;var g=n.options.commonmark;var E=t.charAt(0);var A=0;var C=t.length;var y="";var w="";var x=u;var b=l;var F;var S;var B;var k;var O;var P;var T;var I;if(E===p){x=s;w=E;E=t.charAt(++A)}if(E!==v){return}A++;w+=E;P="";if(n.options.footnotes&&t.charAt(A)===m){if(x===s){return}w+=m;A++;x=o}I=0;while(A "+h.destination:""}if(!h.stats.total){p+=p?": ":"";if(h.stored){p+=m.yellow.open+"written"+m.yellow.close}else{p+="no issues found"}}if(p){l.push(p)}}else{g=m[h.label==="error"?"red":"yellow"];E=h.reason;A="";C=E.indexOf("\n");if(C!==-1){A=E.slice(C);E=E.slice(0,C)}l.push(["",padLeft(h.location,e.location),padRight(g.open+h.label+g.close,e.label),padRight(E,e.reason),padRight(h.ruleId,e.ruleId),h.source||""].join(" ").replace(c,"")+A)}}if(a.fatal||a.warn){p=[];if(a.fatal){p.push([m.red.open+f.error+m.red.close,a.fatal,plural(D.true,a.fatal)].join(" "))}if(a.warn){p.push([m.yellow.open+f.warning+m.yellow.close,a.warn,plural(D.false,a.warn)].join(" "))}p=p.join(", ");if(a.total!==a.fatal&&a.total!==a.warn){p=a.total+" messages ("+p+")"}l.push("",p)}return l.join("\n")}function applicable(e,t){var r=e.messages;var i=r.length;var n=-1;var a=[];if(t.silent){while(++n64)continue;if(t<0)return false;i+=6}return i%8===0}function constructYamlBinary(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,u=s,o=0,l=[];for(t=0;t>16&255);l.push(o>>8&255);l.push(o&255)}o=o<<6|u.indexOf(i.charAt(t))}r=a%4*6;if(r===0){l.push(o>>16&255);l.push(o>>8&255);l.push(o&255)}else if(r===18){l.push(o>>10&255);l.push(o>>2&255)}else if(r===12){l.push(o>>4&255)}if(n){return n.from?n.from(l):new n(l)}return l}function representYamlBinary(e){var t="",r=0,i,n,a=e.length,u=s;for(i=0;i>18&63];t+=u[r>>12&63];t+=u[r>>6&63];t+=u[r&63]}r=(r<<8)+e[i]}n=a%3;if(n===0){t+=u[r>>18&63];t+=u[r>>12&63];t+=u[r>>6&63];t+=u[r&63]}else if(n===2){t+=u[r>>10&63];t+=u[r>>4&63];t+=u[r<<2&63];t+=u[64]}else if(n===1){t+=u[r>>2&63];t+=u[r<<4&63];t+=u[64];t+=u[64]}return t}function isBinary(e){return n&&n.isBuffer(e)}e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},function(e){"use strict";var t=[].slice;e.exports=wrap;function wrap(e,r){var i;return wrapped;function wrapped(){var r=t.call(arguments,0);var n=e.length>r.length;var a;if(n){r.push(done)}try{a=e.apply(null,r)}catch(e){if(n&&i){throw e}return done(e)}if(!n){if(a&&typeof a.then==="function"){a.then(then,done)}else if(a instanceof Error){done(a)}else{then(a)}}}function done(){if(!i){i=true;r.apply(null,arguments)}}function then(e){done(null,e)}}},function(e){e.exports=extend;var t=Object.prototype.hasOwnProperty;function extend(){var e={};for(var r=0;ri){t.message("Move definitions to the end of the file (after the node at line `"+r+"`)",e)}}else if(r===null){r=i}}}},function(e){var t=Object.prototype.toString;e.exports=isString;function isString(e){return t.call(e)==="[object String]"}},function(e,t,r){"use strict";var i=r(874);e.exports=configure;function configure(e,t){e.configuration=new i(t)}},,,,function(e,t,r){"use strict";var i=r(323);var n=create(Error);e.exports=n;n.eval=create(EvalError);n.range=create(RangeError);n.reference=create(ReferenceError);n.syntax=create(SyntaxError);n.type=create(TypeError);n.uri=create(URIError);n.create=create;function create(e){FormattedError.displayName=e.displayName||e.name;return FormattedError;function FormattedError(t){if(t){t=i.apply(null,arguments)}return new e(t)}}},,function(e,t,r){"use strict";if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(470)}else{e.exports=r(970)}},function(e,t,r){var i=r(20);var n=r(491);e.exports=expandTop;var a="\0SLASH"+Math.random()+"\0";var u="\0OPEN"+Math.random()+"\0";var s="\0CLOSE"+Math.random()+"\0";var o="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(a).split("\\{").join(u).split("\\}").join(s).split("\\,").join(o).split("\\.").join(l)}function unescapeBraces(e){return e.split(a).join("\\").split(u).join("{").split(s).join("}").split(o).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=n("{","}",e);if(!r)return e.split(",");var i=r.pre;var a=r.body;var u=r.post;var s=i.split(",");s[s.length-1]+="{"+a+"}";var o=parseCommaParts(u);if(u.length){s[s.length-1]+=o.shift();s.push.apply(s,o)}t.push.apply(t,s);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var a=n("{","}",e);if(!a||/\$$/.test(a.pre))return[e];var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body);var o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body);var l=u||o;var f=a.body.indexOf(",")>=0;if(!l&&!f){if(a.post.match(/,.*\}/)){e=a.pre+"{"+a.body+s+a.post;return expand(e)}return[e]}var c;if(l){c=a.body.split(/\.\./)}else{c=parseCommaParts(a.body);if(c.length===1){c=expand(c[0],false).map(embrace);if(c.length===1){var h=a.post.length?expand(a.post,false):[""];return h.map(function(e){return a.pre+c[0]+e})}}}var p=a.pre;var h=a.post.length?expand(a.post,false):[""];var v;if(l){var d=numeric(c[0]);var D=numeric(c[1]);var m=Math.max(c[0].length,c[1].length);var g=c.length==3?Math.abs(numeric(c[2])):1;var E=lte;var A=D0){var b=new Array(x+1).join("0");if(y<0)w="-"+b+w.slice(1);else w=b+w}}}v.push(w)}}else{v=i(c,function(e){return expand(e,false)})}for(var F=0;F>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var i=t.length-1;if(i=0){if(n>0)e.lastNeed=n-1;return n}if(--i=0){if(n>0)e.lastNeed=n-2;return n}if(--i=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,i);return e.toString("utf8",t,i)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},,,,function(e,t,r){"use strict";var i=r(186);e.exports=VMessage;function VMessagePrototype(){}VMessagePrototype.prototype=Error.prototype;VMessage.prototype=new VMessagePrototype;var n=VMessage.prototype;n.file="";n.name="";n.reason="";n.message="";n.stack="";n.fatal=null;n.column=null;n.line=null;function VMessage(e,t,r){var n;var a;var u;if(typeof t==="string"){r=t;t=null}n=parseOrigin(r);a=i(t)||"1:1";u={start:{line:null,column:null},end:{line:null,column:null}};if(t&&t.position){t=t.position}if(t){if(t.start){u=t;t=t.start}else{u.start=t}}if(e.stack){this.stack=e.stack;e=e.message}this.message=e;this.name=a;this.reason=e;this.line=t?t.line:null;this.column=t?t.column:null;this.location=u;this.source=n[0];this.ruleId=n[1]}function parseOrigin(e){var t=[null,null];var r;if(typeof e==="string"){r=e.indexOf(":");if(r===-1){t[1]=e}else{t[0]=e.slice(0,r);t[1]=e.slice(r+1)}}return t}},,function(e,t,r){"use strict";var i=r(171);var n=r(902);var a=r(49);e.exports=autoLink;autoLink.locator=a;autoLink.notInLink=true;var u="<";var s=">";var o="@";var l="/";var f="mailto:";var c=f.length;function autoLink(e,t,r){var a=this;var h="";var p=t.length;var v=0;var d="";var D=false;var m="";var g;var E;var A;var C;var y;if(t.charAt(0)!==u){return}v++;h=u;while(v0||H===x&&I.inLink||M&&H===B&&t.charAt(W+1)===B||M&&H===S&&(I.inTable||alignment(t,W))||H===b&&W>0&&W=e.expected){e.emit("done")}}},,function(e,t,r){"use strict";var i=r(897);var n=r(336);var a=r(860);e.exports=parse;parse.Parser=a;function parse(e){var t=this.data("settings");var r=i(a);r.prototype.options=n(r.prototype.options,t,e);this.Parser=r}},,,,,,function(e,t,r){"use strict";var i=r(176);e.exports=imageReference;var n="[";var a="]";var u="!";function imageReference(e){return u+n+(this.encode(e.alt,e)||"")+a+i(e)}},,,,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:no-file-name-consecutive-dashes",noFileNameConsecutiveDashes);var n="Do not use consecutive dashes in a file name";function noFileNameConsecutiveDashes(e,t){if(t.stem&&/-{2,}/.test(t.stem)){t.message(n)}}},,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:fenced-code-marker",fencedCodeMarker);var s={"`":true,"~":true,null:true};function fencedCodeMarker(e,t,r){var i=String(t);r=typeof r==="string"&&r!=="consistent"?r:null;if(s[r]!==true){t.fail("Invalid fenced code marker `"+r+"`: use either `'consistent'`, `` '`' ``, or `'~'`")}n(e,"code",visitor);function visitor(e){var n;if(!u(e)){n=i.substr(a.start(e).offset,4).trimLeft().charAt(0);if(s[n]===true){if(r){if(n!==r){t.message("Fenced code should use "+r+" as a marker",e)}}else{r=n}}}}}},,function(e,t,r){"use strict";var i=r(727);e.exports=new i({include:[r(95)],implicit:[r(788),r(900)],explicit:[r(334),r(157),r(697),r(713)]})},,,function(e){"use strict";e.exports=thematicBreak;var t="\t";var r="\n";var i=" ";var n="*";var a="-";var u="_";var s=3;function thematicBreak(e,o,l){var f=-1;var c=o.length+1;var h="";var p;var v;var d;var D;while(++f=s&&(!p||p===r)){h+=D;if(l){return true}return e(h)({type:"thematicBreak"})}else{return}}}},,function(e){e.exports=require("assert")},,,,,,,function(e,t,r){"use strict";var i=r(774);var n=r(176);e.exports=linkReference;var a="[";var u="]";var s="shortcut";var o="collapsed";function linkReference(e){var t=this;var r=e.referenceType;var l=t.enterLinkReference(t,e);var f=t.all(e).join("");l();if(r===s||r===o){f=i(f,e.label||e.identifier)}return a+f+u+n(e)}},function(e){"use strict";e.exports=lineBreak;var t="\\";var r="\n";var i=" ";var n=t+r;var a=i+i+r;function lineBreak(){return this.options.commonmark?n:a}},function(e,t,r){"use strict";function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var i=r(945).Buffer;var n=r(64);function copyBuffer(e,t,r){e.copy(t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r};BufferList.prototype.concat=function concat(e){if(this.length===0)return i.alloc(0);if(this.length===1)return this.head.data;var t=i.allocUnsafe(e>>>0);var r=this.head;var n=0;while(r){copyBuffer(r.data,t,n);n+=r.data.length;r=r.next}return t};return BufferList}();if(n&&n.inspect&&n.inspect.custom){e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e}}},function(e,t,r){"use strict";var i=r(336);var n=r(109);var a=r(694);e.exports=setOptions;function setOptions(e){var t=this;var r=t.options;var u;var s;if(e==null){e={}}else if(typeof e==="object"){e=i(e)}else{throw new Error("Invalid value `"+e+"` for setting `options`")}for(u in a){s=e[u];if(s==null){s=r[u]}if(u!=="blocks"&&typeof s!=="boolean"||u==="blocks"&&typeof s!=="object"){throw new Error("Invalid value `"+s+"` for setting `options."+u+"`")}e[u]=s}t.options=e;t.escape=n(e);return t}},,function(e){var t=Array.prototype.slice;e.exports=co;function co(e){var r=isGeneratorFunction(e);return function(i){var n=this;var a=e;if(r){var u=t.call(arguments),s=u.length;var o=s&&"function"==typeof u[s-1];i=o?u.pop():error;a=e.apply(this,u)}else{i=i||error}next();function exit(e,t){setImmediate(function(){i.call(n,e,t)})}function next(e,r){var i;if(arguments.length>2)r=t.call(arguments,1);if(e){try{i=a.throw(e)}catch(e){return exit(e)}}if(!e){try{i=a.next(r)}catch(e){return exit(e)}}if(i.done)return exit(null,i.value);i.value=toThunk(i.value,n);if("function"==typeof i.value){var u=false;try{i.value.call(n,function(){if(u)return;u=true;next.apply(n,arguments)})}catch(e){setImmediate(function(){if(u)return;u=true;next(e)})}return}next(new TypeError("You may only yield a function, promise, generator, array, or object, "+'but the following was passed: "'+String(i.value)+'"'))}}}function toThunk(e,t){if(isGeneratorFunction(e)){return co(e.call(t))}if(isGenerator(e)){return co(e)}if(isPromise(e)){return promiseToThunk(e)}if("function"==typeof e){return e}if(isObject(e)||Array.isArray(e)){return objectToThunk.call(t,e)}return e}function objectToThunk(e){var t=this;var r=Array.isArray(e);return function(i){var n=Object.keys(e);var a=n.length;var u=r?new Array(a):new e.constructor;var s;if(!a){setImmediate(function(){i(null,u)});return}if(!r){for(var o=0;or){t.splice(0,r);process.nextTick(function(){RES.apply(null,i)})}else{delete n[e]}}})}function slice(e){var t=e.length;var r=[];for(var i=0;ii){o+=" with 1 space, not "+u;if(size(a)=48&&t<=57}},function(e,t,r){"use strict";var i=r(308);var n=r(197);var a=r(25);var u=r(908);var s=r(617);e.exports=encode;encode.escape=escape;var o={}.hasOwnProperty;var l=['"',"'","<",">","&","`"];var f=construct();var c=toExpression(l);var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var p=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;function encode(e,t){var r=t||{};var i=r.subset;var n=i?toExpression(i):c;var a=r.escapeOnly;var u=r.omitOptionalSemicolons;e=e.replace(n,function(e,t,i){return one(e,i.charAt(t+1),r)});if(i||a){return e}return e.replace(h,replaceSurrogatePair).replace(p,replaceBmp);function replaceSurrogatePair(e,t,r){return toHexReference((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charAt(t+2),u)}function replaceBmp(e,t,i){return one(e,i.charAt(t+1),r)}}function escape(e){return encode(e,{escapeOnly:true,useNamedReferences:true})}function one(e,t,r){var i=r.useShortestReferences;var n=r.omitOptionalSemicolons;var a;var u;if((i||r.useNamedReferences)&&o.call(f,e)){a=toNamed(f[e],t,n,r.attribute)}if(i||!a){u=toHexReference(e.charCodeAt(0),t,n)}if(a&&(!i||a.length/i;function inlineHTML(e,t,r){var n=this;var h=t.length;var p;var v;if(t.charAt(0)!==u||h<3){return}p=t.charAt(1);if(!i(p)&&p!==s&&p!==o&&p!==l){return}v=t.match(a);if(!v){return}if(r){return true}v=v[0];if(!n.inLink&&f.test(v)){n.inLink=true}else if(n.inLink&&c.test(v)){n.inLink=false}return e(v)({type:"html",value:v})}},function(e){e.exports=["md","markdown","mdown","mkdn","mkd","mdwn","mkdown","ron"]},,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:file-extension",fileExtension);function fileExtension(e,t,r){var i=t.extname;r=typeof r==="string"?r:"md";if(i&&i.slice(1)!==r){t.message("Invalid extension: use `"+r+"`")}}},function(e){"use strict";e.exports=factory;var t="\\";function factory(e,r){return unescape;function unescape(i){var n=0;var a=i.indexOf(t);var u=e[r];var s=[];var o;while(a!==-1){s.push(i.slice(n,a));n=a+1;o=i.charAt(n);if(!o||u.indexOf(o)===-1){s.push(t)}a=i.indexOf(t,n+1)}s.push(i.slice(n));return s.join("")}}},,,function(e,t,r){"use strict";const i=r(495);const n=r(682);e.exports=i("remark-lint:prohibited-strings",prohibitedStrings);function testProhibited(e,t){const r=new RegExp(`(\\.|@[a-z0-9/-]*)?(${e.no})(\\.\\w)?`,"g");let i=null;while(i=r.exec(t)){if(!i[1]&&!i[3]){return i[2]}}return false}function prohibitedStrings(e,t,r){n(e,"text",checkText);function checkText(e){const i=e.value;r.forEach(r=>{const n=testProhibited(r,i);if(n){t.message(`Use "${r.yes}" instead of "${n}"`,e)}})}}},,,,,function(e){"use strict";e.exports=hidden;function hidden(e){if(typeof e!=="string"){throw new Error("Expected string")}return e.charAt(0)==="."}},,,,,function(e,t,r){"use strict";var i=r(171);var n=r(426);e.exports=footnoteDefinition;footnoteDefinition.notInList=true;footnoteDefinition.notInBlock=true;var a="\\";var u="\n";var s="\t";var o=" ";var l="[";var f="]";var c="^";var h=":";var p=/^( {4}|\t)?/gm;function footnoteDefinition(e,t,r){var v=this;var d=v.offset;var D;var m;var g;var E;var A;var C;var y;var w;var x;var b;var F;var S;if(!v.options.footnotes){return}D=0;m=t.length;g="";E=e.now();A=E.line;while(D=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0;var n=0;t[0].replace(/%[a-zA-Z%]/g,function(e){if(e==="%%"){return}i++;if(e==="%c"){n=i}});t.splice(n,0,r)}function log(){var e;return(typeof console==="undefined"?"undefined":_typeof(console))==="object"&&console.log&&(e=console).log.apply(e,arguments)}function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){var e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(772)(t);var i=e.exports.formatters;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},,,,function(e,t,r){var i=r(159);var n=r(589).join;var a=r(281);var u="/etc";var s=process.platform==="win32";var o=s?process.env.USERPROFILE:process.env.HOME;e.exports=function(e,t,l,f){if("string"!==typeof e)throw new Error("rc(name): name *must* be string");if(!l)l=r(359)(process.argv.slice(2));t=("string"===typeof t?i.json(t):t)||{};f=f||i.parse;var c=i.env(e+"_");var h=[t];var p=[];function addConfigFile(e){if(p.indexOf(e)>=0)return;var t=i.file(e);if(t){h.push(f(t));p.push(e)}}if(!s)[n(u,e,"config"),n(u,e+"rc")].forEach(addConfigFile);if(o)[n(o,".config",e,"config"),n(o,".config",e),n(o,"."+e,"config"),n(o,"."+e+"rc")].forEach(addConfigFile);addConfigFile(i.find("."+e+"rc"));if(c.config)addConfigFile(c.config);if(l.config)addConfigFile(l.config);return a.apply(null,h.concat([c,l,p.length?{configs:p,config:p[p.length-1]}:undefined]))}},,,,,,,,,,function(e){e.exports={name:"remark",version:"10.0.1",description:"Markdown processor powered by plugins",license:"MIT",keywords:["markdown","abstract","syntax","tree","ast","parse","stringify","process"],homepage:"https://remark.js.org",repository:"https://github.com/remarkjs/remark/tree/master/packages/remark",bugs:"https://github.com/remarkjs/remark/issues",author:"Titus Wormer (https://wooorm.com)",contributors:["Titus Wormer (https://wooorm.com)"],files:["index.js"],dependencies:{"remark-parse":"^6.0.0","remark-stringify":"^6.0.0",unified:"^7.0.0"},devDependencies:{tape:"^4.9.1"},scripts:{test:"tape test.js"},xo:false,_resolved:"https://registry.npmjs.org/remark/-/remark-10.0.1.tgz",_integrity:"sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==",_from:"remark@10.0.1"}},function(e){e.exports=require("events")},,function(e,t,r){e.exports=globSync;globSync.GlobSync=GlobSync;var i=r(66);var n=r(129);var a=r(620);var u=a.Minimatch;var s=r(327).Glob;var o=r(64);var l=r(589);var f=r(393);var c=r(969);var h=r(922);var p=h.alphasort;var v=h.alphasorti;var d=h.setopts;var D=h.ownProp;var m=h.childrenIgnored;var g=h.isIgnored;function globSync(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(e,t).found}function GlobSync(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(e,t);d(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;ithis.maxLength)return false;if(!this.stat&&D(this.cache,t)){var n=this.cache[t];if(Array.isArray(n))n="DIR";if(!r||n==="DIR")return n;if(r&&n==="FILE")return false}var a;var u=this.statCache[t];if(!u){var s;try{s=i.lstatSync(t)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{u=i.statSync(t)}catch(e){u=s}}else{u=s}}this.statCache[t]=u;var n=true;if(u)n=u.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||n;if(r&&n==="FILE")return false;return n};GlobSync.prototype._mark=function(e){return h.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return h.makeAbs(this,e)}},,,,function(e){"use strict";e.exports=balanced;function balanced(e,t,r){if(e instanceof RegExp)e=maybeMatch(e,r);if(t instanceof RegExp)t=maybeMatch(t,r);var i=range(e,t,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+e.length,i[1]),post:r.slice(i[1]+t.length)}}function maybeMatch(e,t){var r=t.match(e);return r?r[0]:null}balanced.range=range;function range(e,t,r){var i,n,a,u,s;var o=r.indexOf(e);var l=r.indexOf(t,o+1);var f=o;if(o>=0&&l>0){i=[];a=r.length;while(f>=0&&!s){if(f==o){i.push(f);o=r.indexOf(e,f+1)}else if(i.length==1){s=[i.pop(),l]}else{n=i.pop();if(n=0?o:l}if(i.length){s=[a,u]}}return s}},,,,function(e,t,r){"use strict";var i=r(659);e.exports=factory;function factory(e,t){var r=e.split(":");var n=r[0];var a=r[1];var u=i(t);if(!a){a=n;n=null}attacher.displayName=e;return attacher;function attacher(e){var t=coerce(a,e);var r=t[0];var i=t[1];var s=r===2;return r?transformer:undefined;function transformer(e,t,r){var o=t.messages.length;u(e,t,i,done);function done(e){var i=t.messages;var u;if(e&&i.indexOf(e)===-1){try{t.fail(e)}catch(e){}}while(o2){throw new Error("Invalid severity `"+n+"` for `"+e+"`, "+"expected 0, 1, or 2")}i[0]=n;return i}},,,,,,,function(e,t,r){"use strict";e.exports=PassThrough;var i=r(955);var n=r(683);n.inherits=r(780);n.inherits(PassThrough,i);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);i.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";var i=r(353);var n=r(320);e.exports=n;var a=n.prototype;a.message=message;a.info=info;a.fail=fail;a.warn=message;function message(e,t,r){var n=this.path;var a=new i(e,t,r);if(n){a.name=n+":"+a.name;a.file=n}a.fatal=false;this.messages.push(a);return a}function fail(){var e=this.message.apply(this,arguments);e.fatal=true;throw e}function info(){var e=this.message.apply(this,arguments);e.fatal=null;return e}},,,,function(e,t,r){e.exports=r(64).deprecate},,,,function(e){"use strict";e.exports=locate;function locate(e,t){var r=e.indexOf("**",t);var i=e.indexOf("__",t);if(i===-1){return r}if(r===-1){return i}return ii&&e[c+1]!==" ";c=a}}else if(!isPrintable(u)){return j}h=h&&isPlainSafe(u)}o=o||l&&(a-c-1>i&&e[c+1]!==" ")}if(!s&&!o){return h&&!n(e)?I:M}if(r>9&&needIndentIndicator(e)){return j}return o?R:L}function writeScalar(e,t,r,i){e.dump=function(){if(t.length===0){return"''"}if(!e.noCompatMode&&T.indexOf(t)!==-1){return"'"+t+"'"}var a=e.indent*Math.max(1,r);var u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a);var s=i||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,s,e.indent,u,testAmbiguity)){case I:return t;case M:return"'"+t.replace(/'/g,"''")+"'";case L:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,a));case R:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,u),a));case j:return'"'+escapeString(t,u)+'"';default:throw new n("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var i=e[e.length-1]==="\n";var n=i&&(e[e.length-2]==="\n"||e==="\n");var a=n?"+":i?"":"-";return r+a+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var i=function(){var i=e.indexOf("\n");i=i!==-1?i:e.length;r.lastIndex=i;return foldLine(e.slice(0,i),t)}();var n=e[0]==="\n"||e[0]===" ";var a;var u;while(u=r.exec(e)){var s=u[1],o=u[2];a=o[0]===" ";i+=s+(!n&&!a&&o!==""?"\n":"")+foldLine(o,t);n=a}return i}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var i;var n=0,a,u=0,s=0;var o="";while(i=r.exec(e)){s=i.index;if(s-n>t){a=u>n?u:s;o+="\n"+e.slice(n,a);n=a+1}u=s}o+="\n";if(e.length-n>t&&u>n){o+=e.slice(n,u)+"\n"+e.slice(u+1)}else{o+=e.slice(n)}return o.slice(1)}function escapeString(e){var t="";var r,i;var n;for(var a=0;a=55296&&r<=56319){i=e.charCodeAt(a+1);if(i>=56320&&i<=57343){t+=encodeHex((r-55296)*1024+i-56320+65536);a++;continue}}n=P[r];t+=!n&&isPrintable(r)?e[a]:n||encodeHex(r)}return t}function writeFlowSequence(e,t,r){var i="",n=e.tag,a,u;for(a=0,u=r.length;a1024)f+="? ";f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,l,false,false)){continue}f+=e.dump;i+=f}e.tag=n;e.dump="{"+i+"}"}function writeBlockMapping(e,t,r,i){var a="",u=e.tag,s=Object.keys(r),o,l,c,h,p,v;if(e.sortKeys===true){s.sort()}else if(typeof e.sortKeys==="function"){s.sort(e.sortKeys)}else if(e.sortKeys){throw new n("sortKeys must be a boolean or a function")}for(o=0,l=s.length;o1024;if(p){if(e.dump&&f===e.dump.charCodeAt(0)){v+="?"}else{v+="? "}}v+=e.dump;if(p){v+=generateNextLine(e,t)}if(!writeNode(e,t+1,h,true,p)){continue}if(e.dump&&f===e.dump.charCodeAt(0)){v+=":"}else{v+=": "}v+=e.dump;a+=v}e.tag=u;e.dump=a||"{}"}function detectType(e,t,r){var i,a,u,l,f,c;a=r?e.explicitTypes:e.implicitTypes;for(u=0,l=a.length;u tag resolver accepts not "'+c+'" style')}e.dump=i}return true}}return false}function writeNode(e,t,r,i,a,u){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var o=s.call(e.dump);if(i){i=e.flowLevel<0||e.flowLevel>t}var l=o==="[object Object]"||o==="[object Array]",f,c;if(l){f=e.duplicates.indexOf(r);c=f!==-1}if(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0){a=false}if(c&&e.usedDuplicates[f]){e.dump="*ref_"+f}else{if(l&&c&&!e.usedDuplicates[f]){e.usedDuplicates[f]=true}if(o==="[object Object]"){if(i&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,a);if(c){e.dump="&ref_"+f+e.dump}}else{writeFlowMapping(e,t,e.dump);if(c){e.dump="&ref_"+f+" "+e.dump}}}else if(o==="[object Array]"){var h=e.noArrayIndent&&t>0?t-1:t;if(i&&e.dump.length!==0){writeBlockSequence(e,h,e.dump,a);if(c){e.dump="&ref_"+f+e.dump}}else{writeFlowSequence(e,h,e.dump);if(c){e.dump="&ref_"+f+" "+e.dump}}}else if(o==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,u)}}else{if(e.skipInvalid)return false;throw new n("unacceptable kind of an object to dump "+o)}if(e.tag!==null&&e.tag!=="?"){e.dump="!<"+e.tag+"> "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],i=[],n,a;inspectNode(e,r,i);for(n=0,a=i.length;n=e.length){if(t)t[u]=e;return r(null,e)}o.lastIndex=c;var i=o.exec(e);v=h;h+=i[0];p=v+i[1];c=o.lastIndex;if(f[p]||t&&t[p]===p){return process.nextTick(LOOP)}if(t&&Object.prototype.hasOwnProperty.call(t,p)){return gotResolvedLink(t[p])}return a.lstat(p,gotStat)}function gotStat(e,i){if(e)return r(e);if(!i.isSymbolicLink()){f[p]=true;if(t)t[p]=p;return process.nextTick(LOOP)}if(!n){var u=i.dev.toString(32)+":"+i.ino.toString(32);if(s.hasOwnProperty(u)){return gotTarget(null,s[u],p)}}a.stat(p,function(e){if(e)return r(e);a.readlink(p,function(e,t){if(!n)s[u]=t;gotTarget(e,t)})})}function gotTarget(e,n,a){if(e)return r(e);var u=i.resolve(v,n);if(t)t[a]=u;gotResolvedLink(u)}function gotResolvedLink(t){e=i.resolve(t,e.slice(c));start()}}},,function(e){e.exports=[{long:"help",description:"output usage information",short:"h",type:"boolean",default:false},{long:"version",description:"output version number",short:"v",type:"boolean",default:false},{long:"output",description:"specify output location",short:"o",value:"[path]"},{long:"rc-path",description:"specify configuration file",short:"r",type:"string",value:""},{long:"ignore-path",description:"specify ignore file",short:"i",type:"string",value:""},{long:"setting",description:"specify settings",short:"s",type:"string",value:""},{long:"ext",description:"specify extensions",short:"e",type:"string",value:""},{long:"use",description:"use plugins",short:"u",type:"string",value:""},{long:"watch",description:"watch for changes and reprocess",short:"w",type:"boolean",default:false},{long:"quiet",description:"output only warnings and errors",short:"q",type:"boolean",default:false},{long:"silent",description:"output only errors",short:"S",type:"boolean",default:false},{long:"frail",description:"exit with 1 on warnings",short:"f",type:"boolean",default:false},{long:"tree",description:"specify input and output as syntax tree",short:"t",type:"boolean",default:false},{long:"report",description:"specify reporter",type:"string",value:""},{long:"file-path",description:"specify path to process as",type:"string",value:""},{long:"tree-in",description:"specify input as syntax tree",type:"boolean"},{long:"tree-out",description:"output syntax tree",type:"boolean"},{long:"inspect",description:"output formatted syntax tree",type:"boolean"},{long:"stdout",description:"specify writing to stdout",type:"boolean",truelike:true},{long:"color",description:"specify color in report",type:"boolean",default:true},{long:"config",description:"search for configuration files",type:"boolean",default:true},{long:"ignore",description:"search for ignore files",type:"boolean",default:true}]},,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:hard-break-spaces",hardBreakSpaces);var s="Use two spaces for hard line breaks";function hardBreakSpaces(e,t){var r=String(t);n(e,"break",visitor);function visitor(e){var i;if(!u(e)){i=r.slice(a.start(e).offset,a.end(e).offset).split("\n",1)[0].replace(/\r$/,"");if(i.length>2){t.message(s,e)}}}}},,,,function(e,t,r){"use strict";var i=r(171);e.exports=table;var n="\t";var a="\n";var u=" ";var s="-";var o=":";var l="\\";var f="`";var c="|";var h=1;var p=2;var v="left";var d="center";var D="right";function table(e,t,r){var m=this;var g;var E;var A;var C;var y;var w;var x;var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var R;var j;var U;var N;var J;var z;if(!m.options.gfm){return}g=0;L=0;w=t.length+1;x=[];while(gN){if(L1){if(F){C+=b.slice(0,b.length-1);b=b.charAt(b.length-1)}else{C+=b;b=""}}I=e.now();e(C)({type:"tableCell",children:m.tokenizeInline(k,I)},y)}e(b+F);b="";k=""}}else{if(b){k+=b;b=""}k+=F;if(F===l&&g!==w-2){k+=R.charAt(g+1);g++}if(F===f){P=1;while(R.charAt(g+1)===F){k+=F;g++;P++}if(!T){T=P}else if(P>=T){T=0}}}O=false;g++}if(!M){e(a+E)}}return U}},function(e,t,r){"use strict";var i=r(211);function resolveJavascriptRegExp(e){if(e===null)return false;if(e.length===0)return false;var t=e,r=/\/([gim]*)$/.exec(e),i="";if(t[0]==="/"){if(r)i=r[1];if(i.length>3)return false;if(t[t.length-i.length-1]!=="/")return false}return true}function constructJavascriptRegExp(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";if(t[0]==="/"){if(r)i=r[1];t=t.slice(1,t.length-i.length-1)}return new RegExp(t,i)}function representJavascriptRegExp(e){var t="/"+e.source+"/";if(e.global)t+="g";if(e.multiline)t+="m";if(e.ignoreCase)t+="i";return t}function isRegExp(e){return Object.prototype.toString.call(e)==="[object RegExp]"}e.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},,,,,,,,,function(e){"use strict";e.exports=markdownTable;var t=/\./;var r=/\.[^.]*$/;var i="l";var n="r";var a="c";var u=".";var s="";var o=[i,n,a,u,s];var l=3;var f=":";var c="-";var h="|";var p=" ";var v="\n";function markdownTable(e,r){var d=r||{};var D=d.delimiter;var m=d.start;var g=d.end;var E=d.align;var A=d.stringLength||lengthNoop;var C=0;var y=-1;var w=e.length;var x=[];var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var R;E=E?E.concat():[];if(D===null||D===undefined){D=p+h+p}if(m===null||m===undefined){m=h+p}if(g===null||g===undefined){g=p+h}while(++yC){C=B.length}while(++Ox[O]){x[O]=P}}}if(typeof E==="string"){E=pad(C,E).split("")}O=-1;while(++Ox[O]){x[O]=T}}}y=-1;while(++yl?M:l}else{M=x[O]}b=E[O];I=b===n||b===s?c:f;I+=pad(M-2,c);I+=b!==i&&b!==s?f:c;F[O]=I}S.splice(1,0,F.join(D))}return m+S.join(g+v+m)+g}function stringify(e){return e===null||e===undefined?"":String(e)}function lengthNoop(e){return String(e).length}function pad(e,t){return new Array(e+1).join(t||p)}function dotindex(e){var t=r.exec(e);return t?t.index+1:e.length}},,,,,function(e,t,r){e.exports=r(688)},,,,,function(e,t,r){"use strict";var i=r(12);e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:i.nextTick;var a;Writable.WritableState=WritableState;var u=r(683);u.inherits=r(780);var s={deprecate:r(507)};var o=r(569);var l=r(945).Buffer;var f=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return l.from(e)}function _isUint8Array(e){return l.isBuffer(e)||e instanceof f}var c=r(972);u.inherits(Writable,o);function nop(){}function WritableState(e,t){a=a||r(98);e=e||{};var i=t instanceof a;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.writableObjectMode;var n=e.highWaterMark;var u=e.writableHighWaterMark;var s=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(i&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=s;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var o=e.decodeStrings===false;this.decodeStrings=!o;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var h;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){h=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(h.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{h=function(e){return e instanceof this}}function Writable(e){a=a||r(98);if(!h.call(Writable,this)&&!(this instanceof a)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}o.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r);i.nextTick(t,r)}function validChunk(e,t,r,n){var a=true;var u=false;if(r===null){u=new TypeError("May not write null values to stream")}else if(typeof r!=="string"&&r!==undefined&&!t.objectMode){u=new TypeError("Invalid non-string/buffer chunk")}if(u){e.emit("error",u);i.nextTick(n,u);a=false}return a}Writable.prototype.write=function(e,t,r){var i=this._writableState;var n=false;var a=!i.objectMode&&_isUint8Array(e);if(a&&!l.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(a)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=nop;if(i.ended)writeAfterEnd(this,r);else if(a||validChunk(this,i,e,r)){i.pendingcb++;n=writeOrBuffer(this,i,a,e,t,r)}return n};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=l.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,i,n,a){if(!r){var u=decodeChunk(t,i,n);if(i!==u){r=true;n="buffer";i=u}}var s=t.objectMode?1:i.length;t.length+=s;var o=t.length=b){b=0}}else if(E===v){g++;B+=t.charAt(g)}else if((!b||y)&&E===p){L++}else if((!b||y)&&E===d){if(L){L--}else{if(!A){while(gn){return false}}return check(e,i,r)&&check(e,m)}function isKnown(e,t,r){var i=o?o.indexOf(e)!==-1:true;if(!i){h.warn("Unknown rule: cannot "+t+" `'"+e+"'`",r)}return i}function getState(e){var t=e?D[e]:m;if(t&&t.length!==0){return t[t.length-1].state}if(!e){return!l}if(l){return f.indexOf(e)!==-1}return c.indexOf(e)===-1}function toggle(e,t,r){var i=r?D[r]:m;var n;var a;if(!i){i=[];D[r]=i}a=getState(r);n=t;if(n!==a){i.push({state:n,position:e})}if(!r){for(r in D){toggle(e,t,r)}}}function check(e,t,r){var i=t&&t.length;var n=-1;var a;while(--i>n){a=t[i];if(!a.position||!a.position.line||!a.position.column){continue}if(a.position.line=e){return}if(u){s.push({start:n,end:e});u=false}n=e}}},,function(e){"use strict";e.exports=orderedItems;var t="\n";var r=".";var i=t+t;function orderedItems(e){var n=this;var a=n.visitors.listItem;var u=n.options.incrementListMarker;var s=[];var o=e.start;var l=e.children;var f=l.length;var c=-1;var h;o=o==null?1:o;while(++c1;var p=c;var v=t.path;if(!u(p)){a("Not copying");return i()}p=l(e.cwd,p);a("Copying `%s`",v);s(p,onstatfile);function onstatfile(e,t){if(e){if(e.code!=="ENOENT"||c.charAt(c.length-1)===n.sep){return i(new Error("Cannot read output directory. Error:\n"+e.message))}s(o(p),onstatparent)}else{done(t.isDirectory())}}function onstatparent(e){if(e){i(new Error("Cannot read parent directory. Error:\n"+e.message))}else{done(false)}}function done(e){if(!e&&h){return i(new Error("Cannot write multiple files to single output: "+p))}t[e?"dirname":"path"]=f(t.cwd,p);a("Copying document from %s to %s",v,t.path);i()}}},function(e,t){"use strict";var r="[a-zA-Z_:][a-zA-Z0-9:._-]*";var i="[^\"'=<>`\\u0000-\\u0020]+";var n="'[^']*'";var a='"[^"]*"';var u="(?:"+i+"|"+n+"|"+a+")";var s="(?:\\s+"+r+"(?:\\s*=\\s*"+u+")?)";var o="<[A-Za-z][A-Za-z0-9\\-]*"+s+"*\\s*\\/?>";var l="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";var f="\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e";var c="<[?].*?[?]>";var h="]*>";var p="";t.openCloseTag=new RegExp("^(?:"+o+"|"+l+")");t.tag=new RegExp("^(?:"+o+"|"+l+"|"+f+"|"+c+"|"+h+"|"+p+")")},,function(e){e.exports=require("path")},,,,function(e,t,r){"use strict";var i=r(36);var n=r(171);var a=r(511);e.exports=strong;strong.locator=a;var u="\\";var s="*";var o="_";function strong(e,t,r){var a=this;var l=0;var f=t.charAt(l);var c;var h;var p;var v;var d;var D;var m;if(f!==s&&f!==o||t.charAt(++l)!==f){return}h=a.options.pedantic;p=f;d=p+p;D=t.length;l++;v="";f="";if(h&&n(t.charAt(l))){return}while(l0){return parse(e)}else if(r==="number"&&isNaN(e)===false){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var s=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s){return}var o=parseFloat(s[1]);var l=(s[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return o*u;case"weeks":case"week":case"w":return o*a;case"days":case"day":case"d":return o*n;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return undefined}}function fmtShort(e){var a=Math.abs(e);if(a>=n){return Math.round(e/n)+"d"}if(a>=i){return Math.round(e/i)+"h"}if(a>=r){return Math.round(e/r)+"m"}if(a>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var a=Math.abs(e);if(a>=n){return plural(e,a,n,"day")}if(a>=i){return plural(e,a,i,"hour")}if(a>=r){return plural(e,a,r,"minute")}if(a>=t){return plural(e,a,t,"second")}return e+" ms"}function plural(e,t,r,i){var n=t>=r*1.5;return Math.round(e/r)+" "+i+(n?"s":"")}},function(e,t){t.parse=t.decode=decode;t.stringify=t.encode=encode;t.safe=safe;t.unsafe=unsafe;var r=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(e,t){var i=[];var n="";if(typeof t==="string"){t={section:t,whitespace:false}}else{t=t||{};t.whitespace=t.whitespace===true}var a=t.whitespace?" = ":"=";Object.keys(e).forEach(function(t,u,s){var o=e[t];if(o&&Array.isArray(o)){o.forEach(function(e){n+=safe(t+"[]")+a+safe(e)+"\n"})}else if(o&&typeof o==="object"){i.push(t)}else{n+=safe(t)+a+safe(o)+r}});if(t.section&&n.length){n="["+safe(t.section)+"]"+r+n}i.forEach(function(i,a,u){var s=dotSplit(i).join("\\.");var o=(t.section?t.section+".":"")+s;var l=encode(e[i],{section:o,whitespace:t.whitespace});if(n.length&&l.length){n+=r}n+=l});return n}function dotSplit(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function decode(e){var t={};var r=t;var i=null;var n=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var a=e.split(/[\r\n]+/g);a.forEach(function(e,a,u){if(!e||e.match(/^\s*[;#]/))return;var s=e.match(n);if(!s)return;if(s[1]!==undefined){i=unsafe(s[1]);r=t[i]=t[i]||{};return}var o=unsafe(s[2]);var l=s[3]?unsafe(s[4]):true;switch(l){case"true":case"false":case"null":l=JSON.parse(l)}if(o.length>2&&o.slice(-2)==="[]"){o=o.substring(0,o.length-2);if(!r[o]){r[o]=[]}else if(!Array.isArray(r[o])){r[o]=[r[o]]}}if(Array.isArray(r[o])){r[o].push(l)}else{r[o]=l}});Object.keys(t).filter(function(e,r,i){if(!t[e]||typeof t[e]!=="object"||Array.isArray(t[e])){return false}var n=dotSplit(e);var a=t;var u=n.pop();var s=u.replace(/\\\./g,".");n.forEach(function(e,t,r){if(!a[e]||typeof a[e]!=="object")a[e]={};a=a[e]});if(a===t&&s===u){return false}a[s]=t[e];return true}).forEach(function(e,r,i){delete t[e]});return t}function isQuoted(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function safe(e){return typeof e!=="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&isQuoted(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(e,t){e=(e||"").trim();if(isQuoted(e)){if(e.charAt(0)==="'"){e=e.substr(1,e.length-2)}try{e=JSON.parse(e)}catch(e){}}else{var r=false;var i="";for(var n=0,a=e.length;n="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||i.ID_Start.test(e)},isIdContinueChar(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||i.ID_Continue.test(e)},isDigit(e){return/[0-9]/.test(e)},isHexDigit(e){return/[0-9A-Fa-f]/.test(e)}}},,function(e){"use strict";e.exports=(e=>{if(Number.isNaN(e)){return false}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false})},,,,,,,,,function(e,t,r){"use strict";e.exports.plugins=[r(889),r(424),r(725),r(137),r(339),r(767),r(550),r(550),[r(890),"space"],r(164),r(223),r(127),r(816),r(667),r(380),r(911),r(33),r(758),r(9),r(273),r(926),r(121),r(55),r(72),r(522),r(842),r(467),r(314),[r(166),2],[r(112),{checked:"x",unchecked:" "}],[r(301),"fenced"],[r(386),"`"],[r(451),"md"],[r(284),1],[r(675),"atx"],[r(455),[{no:"End-Of-Life",yes:"End-of-Life"},{no:"End-of-life",yes:"End-of-Life"},{no:"Github",yes:"GitHub"},{no:"Javascript",yes:"JavaScript"},{no:"Node.JS",yes:"Node.js"},{no:"Note that",yes:""},{no:"note that",yes:""},{no:"Rfc",yes:"RFC"},{no:"[Rr][Ff][Cc]\\d+",yes:"RFC "},{no:"rfc",yes:"RFC"},{no:"v8",yes:"V8"}]],[r(108),"*"],[r(435),"padded"]]},,function(e){e.exports=["cent","copy","divide","gt","lt","not","para","times"]},,function(e,t,r){"use strict";e.exports=r(447)},function(e,t,r){e.exports=minimatch;minimatch.Minimatch=Minimatch;var i={sep:"/"};try{i=r(589)}catch(e){}var n=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var a=r(348);var u={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var s="[^/]";var o=s+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var f="(?:(?!(?:\\/|^)\\.).)*?";var c=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce(function(e,t){e[t]=true;return e},{})}var h=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,i,n){return minimatch(r,e,t)}}function ext(e,t){e=e||{};t=t||{};var r={};Object.keys(t).forEach(function(e){r[e]=t[e]});Object.keys(e).forEach(function(t){r[t]=e[t]});return r}minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return minimatch;var t=minimatch;var r=function minimatch(r,i,n){return t.minimatch(r,i,ext(e,n))};r.Minimatch=function Minimatch(r,i){return new t.Minimatch(r,ext(e,i))};return r};Minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return Minimatch;return minimatch.defaults(e).Minimatch};function minimatch(e,t,r){if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}if(t.trim()==="")return e==="";return new Minimatch(t,r).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}if(typeof e!=="string"){throw new TypeError("glob pattern string required")}if(!t)t={};e=e.trim();if(i.sep!=="/"){e=e.split(i.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=console.error;this.debug(this.pattern,r);r=this.globParts=r.map(function(e){return e.split(h)});this.debug(this.pattern,r);r=r.map(function(e,t,r){return e.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(e){return e.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var r=this.options;var i=0;if(r.nonegate)return;for(var n=0,a=e.length;n1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&e==="**")return n;if(e==="")return"";var i="";var a=!!r.nocase;var l=false;var f=[];var h=[];var v;var d=false;var D=-1;var m=-1;var g=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var E=this;function clearStateChar(){if(v){switch(v){case"*":i+=o;a=true;break;case"?":i+=s;a=true;break;default:i+="\\"+v;break}E.debug("clearStateChar %j %j",v,i);v=false}}for(var A=0,C=e.length,y;A-1;k--){var O=h[k];var P=i.slice(0,O.reStart);var T=i.slice(O.reStart,O.reEnd-8);var I=i.slice(O.reEnd-8,O.reEnd);var M=i.slice(O.reEnd);I+=M;var L=P.split("(").length-1;var R=M;for(A=0;A=0;u--){a=e[u];if(a)break}for(u=0;u>> no match, partial?",e,c,t,h);if(c===s)return true}return false}var v;if(typeof l==="string"){if(i.nocase){v=f.toLowerCase()===l.toLowerCase()}else{v=f===l}this.debug("string match",l,f,v)}else{v=f.match(l);this.debug("pattern match",l,f,v)}if(!v)return false}if(a===s&&u===o){return true}else if(a===s){return r}else if(u===o){var d=a===s-1&&e[a]==="";return d}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},,,function(e){"use strict";e.exports=function(e){if(typeof e!=="function"){throw new TypeError("Expected a function")}return e.displayName||e.name||(/function ([^\(]+)?\(/.exec(e.toString())||[])[1]||null}},function(e){"use strict";e.exports=(()=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(e,"g")})},,,function(e,t,r){"use strict";var i=r(304);var n=r(948);e.exports=fileSystem;function fileSystem(e,t,r){var a=e.files;if(a.length===0){r()}else{n(a,{cwd:t.cwd,extensions:t.extensions,silentlyIgnore:t.silentlyIgnore,ignore:new i({cwd:t.cwd,detectIgnore:t.detectIgnore,ignoreName:t.ignoreName,ignorePath:t.ignorePath})},onfound)}function onfound(i,n){var a=n.files;a.sort(sortAlphabetically);a.forEach(markAsGiven);e.files=a;if(t.out===null||t.out===undefined){t.out=n.oneFileMode}r(i)}function markAsGiven(e){e.data.unifiedEngineGiven=true}function sortAlphabetically(e,t){return e.pathi){i=r}}else{r=1}n=a+1;a=e.indexOf(t,n)}return i}},function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:stdout");var n=r(928);e.exports=stdout;function stdout(e,t,r,a){if(!t.data.unifiedEngineGiven){i("Ignoring programmatically added file");a()}else if(n(t).fatal||e.output||!e.out){i("Ignoring writing to `streamOut`");a()}else{i("Writing document to `streamOut`");e.streamOut.write(t.toString(),a)}}},,,function(e,t,r){"use strict";var i=r(56);var n=r(503);e.exports=toVFile;function toVFile(e){if(typeof e==="string"||i(e)){e={path:String(e)}}return n(e)}},,,,function(e){(function webpackUniversalModuleDefinition(t,r){if(true)e.exports=r();else{}})(this,function(){return function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:false};e[r].call(i.exports,i,i.exports,__webpack_require__);i.loaded=true;return i.exports}__webpack_require__.m=e;__webpack_require__.c=t;__webpack_require__.p="";return __webpack_require__(0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(1);var n=r(3);var a=r(8);var u=r(15);function parse(e,t,r){var u=null;var s=function(e,t){if(r){r(e,t)}if(u){u.visit(e,t)}};var o=typeof r==="function"?s:null;var l=false;if(t){l=typeof t.comment==="boolean"&&t.comment;var f=typeof t.attachComment==="boolean"&&t.attachComment;if(l||f){u=new i.CommentHandler;u.attach=f;t.comment=true;o=s}}var c=false;if(t&&typeof t.sourceType==="string"){c=t.sourceType==="module"}var h;if(t&&typeof t.jsx==="boolean"&&t.jsx){h=new n.JSXParser(e,t,o)}else{h=new a.Parser(e,t,o)}var p=c?h.parseModule():h.parseScript();var v=p;if(l&&u){v.comments=u.comments}if(h.config.tokens){v.tokens=h.tokens}if(h.config.tolerant){v.errors=h.errorHandler.errors}return v}t.parse=parse;function parseModule(e,t,r){var i=t||{};i.sourceType="module";return parse(e,i,r)}t.parseModule=parseModule;function parseScript(e,t,r){var i=t||{};i.sourceType="script";return parse(e,i,r)}t.parseScript=parseScript;function tokenize(e,t,r){var i=new u.Tokenizer(e,t);var n;n=[];try{while(true){var a=i.getNextToken();if(!a){break}if(r){a=r(a)}n.push(a)}}catch(e){i.errorHandler.tolerate(e)}if(i.errorHandler.tolerant){n.errors=i.errors()}return n}t.tokenize=tokenize;var s=r(2);t.Syntax=s.Syntax;t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function CommentHandler(){this.attach=false;this.comments=[];this.stack=[];this.leading=[];this.trailing=[]}CommentHandler.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&e.body.length===0){var r=[];for(var n=this.leading.length-1;n>=0;--n){var a=this.leading[n];if(t.end.offset>=a.start){r.unshift(a.comment);this.leading.splice(n,1);this.trailing.splice(n,1)}}if(r.length){e.innerComments=r}}};CommentHandler.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];if(i.start>=e.end.offset){t.unshift(i.comment)}}this.trailing.length=0;return t}var n=this.stack[this.stack.length-1];if(n&&n.node.trailingComments){var a=n.node.trailingComments[0];if(a&&a.range[0]>=e.end.offset){t=n.node.trailingComments;delete n.node.trailingComments}}return t};CommentHandler.prototype.findLeadingComments=function(e){var t=[];var r;while(this.stack.length>0){var i=this.stack[this.stack.length-1];if(i&&i.start>=e.start.offset){r=i.node;this.stack.pop()}else{break}}if(r){var n=r.leadingComments?r.leadingComments.length:0;for(var a=n-1;a>=0;--a){var u=r.leadingComments[a];if(u.range[1]<=e.start.offset){t.unshift(u);r.leadingComments.splice(a,1)}}if(r.leadingComments&&r.leadingComments.length===0){delete r.leadingComments}return t}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];if(i.start<=e.start.offset){t.unshift(i.comment);this.leading.splice(a,1)}}return t};CommentHandler.prototype.visitNode=function(e,t){if(e.type===i.Syntax.Program&&e.body.length>0){return}this.insertInnerComments(e,t);var r=this.findTrailingComments(t);var n=this.findLeadingComments(t);if(n.length>0){e.leadingComments=n}if(r.length>0){e.trailingComments=r}this.stack.push({node:e,start:t.start.offset})};CommentHandler.prototype.visitComment=function(e,t){var r=e.type[0]==="L"?"Line":"Block";var i={type:r,value:e.value};if(e.range){i.range=e.range}if(e.loc){i.loc=e.loc}this.comments.push(i);if(this.attach){var n={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};if(e.loc){n.comment.loc=e.loc}e.type=r;this.leading.push(n);this.trailing.push(n)}};CommentHandler.prototype.visit=function(e,t){if(e.type==="LineComment"){this.visitComment(e,t)}else if(e.type==="BlockComment"){this.visitComment(e,t)}else if(this.attach){this.visitNode(e,t)}};return CommentHandler}();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return function(t,r){e(t,r);function __(){this.constructor=t}t.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});var n=r(4);var a=r(5);var u=r(6);var s=r(7);var o=r(8);var l=r(13);var f=r(14);l.TokenName[100]="JSXIdentifier";l.TokenName[101]="JSXText";function getQualifiedElementName(e){var t;switch(e.type){case u.JSXSyntax.JSXIdentifier:var r=e;t=r.name;break;case u.JSXSyntax.JSXNamespacedName:var i=e;t=getQualifiedElementName(i.namespace)+":"+getQualifiedElementName(i.name);break;case u.JSXSyntax.JSXMemberExpression:var n=e;t=getQualifiedElementName(n.object)+"."+getQualifiedElementName(n.property);break;default:break}return t}var c=function(e){i(JSXParser,e);function JSXParser(t,r,i){return e.call(this,t,r,i)||this}JSXParser.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)};JSXParser.prototype.startJSX=function(){this.scanner.index=this.startMarker.index;this.scanner.lineNumber=this.startMarker.line;this.scanner.lineStart=this.startMarker.index-this.startMarker.column};JSXParser.prototype.finishJSX=function(){this.nextToken()};JSXParser.prototype.reenterJSX=function(){this.startJSX();this.expectJSX("}");if(this.config.tokens){this.tokens.pop()}};JSXParser.prototype.createJSXNode=function(){this.collectComments();return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.scanXHTMLEntity=function(e){var t="&";var r=true;var i=false;var a=false;var u=false;while(!this.scanner.eof()&&r&&!i){var s=this.scanner.source[this.scanner.index];if(s===e){break}i=s===";";t+=s;++this.scanner.index;if(!i){switch(t.length){case 2:a=s==="#";break;case 3:if(a){u=s==="x";r=u||n.Character.isDecimalDigit(s.charCodeAt(0));a=a&&!u}break;default:r=r&&!(a&&!n.Character.isDecimalDigit(s.charCodeAt(0)));r=r&&!(u&&!n.Character.isHexDigit(s.charCodeAt(0)));break}}}if(r&&i&&t.length>2){var o=t.substr(1,t.length-2);if(a&&o.length>1){t=String.fromCharCode(parseInt(o.substr(1),10))}else if(u&&o.length>2){t=String.fromCharCode(parseInt("0"+o.substr(1),16))}else if(!a&&!u&&f.XHTMLEntities[o]){t=f.XHTMLEntities[o]}}return t};JSXParser.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(e===60||e===62||e===47||e===58||e===61||e===123||e===125){var t=this.scanner.source[this.scanner.index++];return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(e===34||e===39){var r=this.scanner.index;var i=this.scanner.source[this.scanner.index++];var a="";while(!this.scanner.eof()){var u=this.scanner.source[this.scanner.index++];if(u===i){break}else if(u==="&"){a+=this.scanXHTMLEntity(i)}else{a+=u}}return{type:8,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===46){var s=this.scanner.source.charCodeAt(this.scanner.index+1);var o=this.scanner.source.charCodeAt(this.scanner.index+2);var t=s===46&&o===46?"...":".";var r=this.scanner.index;this.scanner.index+=t.length;return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===96){return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index}}if(n.Character.isIdentifierStart(e)&&e!==92){var r=this.scanner.index;++this.scanner.index;while(!this.scanner.eof()){var u=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(u)&&u!==92){++this.scanner.index}else if(u===45){++this.scanner.index}else{break}}var l=this.scanner.source.slice(r,this.scanner.index);return{type:100,value:l,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}return this.scanner.lex()};JSXParser.prototype.nextJSXToken=function(){this.collectComments();this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;if(this.config.tokens){this.tokens.push(this.convertToken(e))}return e};JSXParser.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.scanner.index;var t="";while(!this.scanner.eof()){var r=this.scanner.source[this.scanner.index];if(r==="{"||r==="<"){break}++this.scanner.index;t+=r;if(n.Character.isLineTerminator(r.charCodeAt(0))){++this.scanner.lineNumber;if(r==="\r"&&this.scanner.source[this.scanner.index]==="\n"){++this.scanner.index}this.scanner.lineStart=this.scanner.index}}this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};if(t.length>0&&this.config.tokens){this.tokens.push(this.convertToken(i))}return i};JSXParser.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();this.scanner.restoreState(e);return t};JSXParser.prototype.expectJSX=function(e){var t=this.nextJSXToken();if(t.type!==7||t.value!==e){this.throwUnexpectedToken(t)}};JSXParser.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===7&&t.value===e};JSXParser.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==100){this.throwUnexpectedToken(t)}return this.finalize(e,new a.JSXIdentifier(t.value))};JSXParser.prototype.parseJSXElementName=function(){var e=this.createJSXNode();var t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(r,i))}else if(this.matchJSX(".")){while(this.matchJSX(".")){var n=t;this.expectJSX(".");var u=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(n,u))}}return t};JSXParser.prototype.parseJSXAttributeName=function(){var e=this.createJSXNode();var t;var r=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=r;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(i,n))}else{t=r}return t};JSXParser.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==8){this.throwUnexpectedToken(t)}var r=this.getTokenRaw(t);return this.finalize(e,new s.Literal(t.value,r))};JSXParser.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.finishJSX();if(this.match("}")){this.tolerateError("JSX attributes must only be assigned a non-empty expression")}var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()};JSXParser.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode();var t=this.parseJSXAttributeName();var r=null;if(this.matchJSX("=")){this.expectJSX("=");r=this.parseJSXAttributeValue()}return this.finalize(e,new a.JSXAttribute(t,r))};JSXParser.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.expectJSX("...");this.finishJSX();var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXSpreadAttribute(t))};JSXParser.prototype.parseJSXAttributes=function(){var e=[];while(!this.matchJSX("/")&&!this.matchJSX(">")){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e};JSXParser.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName();var r=this.parseJSXAttributes();var i=this.matchJSX("/");if(i){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(t,i,r))};JSXParser.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();this.expectJSX("<");if(this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();this.expectJSX(">");return this.finalize(e,new a.JSXClosingElement(t))}var r=this.parseJSXElementName();var i=this.parseJSXAttributes();var n=this.matchJSX("/");if(n){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(r,n,i))};JSXParser.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();this.collectComments();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;return this.finalize(e,new a.JSXEmptyExpression)};JSXParser.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;if(this.matchJSX("}")){t=this.parseJSXEmptyExpression();this.expectJSX("}")}else{this.finishJSX();t=this.parseAssignmentExpression();this.reenterJSX()}return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXChildren=function(){var e=[];while(!this.scanner.eof()){var t=this.createJSXChildNode();var r=this.nextJSXText();if(r.start0){var s=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing));e=t[t.length-1];e.children.push(s);t.pop()}else{break}}}return e};JSXParser.prototype.parseJSXElement=function(){var e=this.createJSXNode();var t=this.parseJSXOpeningElement();var r=[];var i=null;if(!t.selfClosing){var n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:r});r=n.children;i=n.closing}return this.finalize(e,new a.JSXElement(t,r,i))};JSXParser.prototype.parseJSXRoot=function(){if(this.config.tokens){this.tokens.pop()}this.startJSX();var e=this.parseJSXElement();this.finishJSX();return e};JSXParser.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")};return JSXParser}(o.Parser);t.JSXParser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return e===10||e===13||e===8232||e===8233},isIdentifierStart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(6);var n=function(){function JSXClosingElement(e){this.type=i.JSXSyntax.JSXClosingElement;this.name=e}return JSXClosingElement}();t.JSXClosingElement=n;var a=function(){function JSXElement(e,t,r){this.type=i.JSXSyntax.JSXElement;this.openingElement=e;this.children=t;this.closingElement=r}return JSXElement}();t.JSXElement=a;var u=function(){function JSXEmptyExpression(){this.type=i.JSXSyntax.JSXEmptyExpression}return JSXEmptyExpression}();t.JSXEmptyExpression=u;var s=function(){function JSXExpressionContainer(e){this.type=i.JSXSyntax.JSXExpressionContainer;this.expression=e}return JSXExpressionContainer}();t.JSXExpressionContainer=s;var o=function(){function JSXIdentifier(e){this.type=i.JSXSyntax.JSXIdentifier;this.name=e}return JSXIdentifier}();t.JSXIdentifier=o;var l=function(){function JSXMemberExpression(e,t){this.type=i.JSXSyntax.JSXMemberExpression;this.object=e;this.property=t}return JSXMemberExpression}();t.JSXMemberExpression=l;var f=function(){function JSXAttribute(e,t){this.type=i.JSXSyntax.JSXAttribute;this.name=e;this.value=t}return JSXAttribute}();t.JSXAttribute=f;var c=function(){function JSXNamespacedName(e,t){this.type=i.JSXSyntax.JSXNamespacedName;this.namespace=e;this.name=t}return JSXNamespacedName}();t.JSXNamespacedName=c;var h=function(){function JSXOpeningElement(e,t,r){this.type=i.JSXSyntax.JSXOpeningElement;this.name=e;this.selfClosing=t;this.attributes=r}return JSXOpeningElement}();t.JSXOpeningElement=h;var p=function(){function JSXSpreadAttribute(e){this.type=i.JSXSyntax.JSXSpreadAttribute;this.argument=e}return JSXSpreadAttribute}();t.JSXSpreadAttribute=p;var v=function(){function JSXText(e,t){this.type=i.JSXSyntax.JSXText;this.value=e;this.raw=t}return JSXText}();t.JSXText=v},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function ArrayExpression(e){this.type=i.Syntax.ArrayExpression;this.elements=e}return ArrayExpression}();t.ArrayExpression=n;var a=function(){function ArrayPattern(e){this.type=i.Syntax.ArrayPattern;this.elements=e}return ArrayPattern}();t.ArrayPattern=a;var u=function(){function ArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=false}return ArrowFunctionExpression}();t.ArrowFunctionExpression=u;var s=function(){function AssignmentExpression(e,t,r){this.type=i.Syntax.AssignmentExpression;this.operator=e;this.left=t;this.right=r}return AssignmentExpression}();t.AssignmentExpression=s;var o=function(){function AssignmentPattern(e,t){this.type=i.Syntax.AssignmentPattern;this.left=e;this.right=t}return AssignmentPattern}();t.AssignmentPattern=o;var l=function(){function AsyncArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=true}return AsyncArrowFunctionExpression}();t.AsyncArrowFunctionExpression=l;var f=function(){function AsyncFunctionDeclaration(e,t,r){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionDeclaration}();t.AsyncFunctionDeclaration=f;var c=function(){function AsyncFunctionExpression(e,t,r){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionExpression}();t.AsyncFunctionExpression=c;var h=function(){function AwaitExpression(e){this.type=i.Syntax.AwaitExpression;this.argument=e}return AwaitExpression}();t.AwaitExpression=h;var p=function(){function BinaryExpression(e,t,r){var n=e==="||"||e==="&&";this.type=n?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression;this.operator=e;this.left=t;this.right=r}return BinaryExpression}();t.BinaryExpression=p;var v=function(){function BlockStatement(e){this.type=i.Syntax.BlockStatement;this.body=e}return BlockStatement}();t.BlockStatement=v;var d=function(){function BreakStatement(e){this.type=i.Syntax.BreakStatement;this.label=e}return BreakStatement}();t.BreakStatement=d;var D=function(){function CallExpression(e,t){this.type=i.Syntax.CallExpression;this.callee=e;this.arguments=t}return CallExpression}();t.CallExpression=D;var m=function(){function CatchClause(e,t){this.type=i.Syntax.CatchClause;this.param=e;this.body=t}return CatchClause}();t.CatchClause=m;var g=function(){function ClassBody(e){this.type=i.Syntax.ClassBody;this.body=e}return ClassBody}();t.ClassBody=g;var E=function(){function ClassDeclaration(e,t,r){this.type=i.Syntax.ClassDeclaration;this.id=e;this.superClass=t;this.body=r}return ClassDeclaration}();t.ClassDeclaration=E;var A=function(){function ClassExpression(e,t,r){this.type=i.Syntax.ClassExpression;this.id=e;this.superClass=t;this.body=r}return ClassExpression}();t.ClassExpression=A;var C=function(){function ComputedMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=true;this.object=e;this.property=t}return ComputedMemberExpression}();t.ComputedMemberExpression=C;var y=function(){function ConditionalExpression(e,t,r){this.type=i.Syntax.ConditionalExpression;this.test=e;this.consequent=t;this.alternate=r}return ConditionalExpression}();t.ConditionalExpression=y;var w=function(){function ContinueStatement(e){this.type=i.Syntax.ContinueStatement;this.label=e}return ContinueStatement}();t.ContinueStatement=w;var x=function(){function DebuggerStatement(){this.type=i.Syntax.DebuggerStatement}return DebuggerStatement}();t.DebuggerStatement=x;var b=function(){function Directive(e,t){this.type=i.Syntax.ExpressionStatement;this.expression=e;this.directive=t}return Directive}();t.Directive=b;var F=function(){function DoWhileStatement(e,t){this.type=i.Syntax.DoWhileStatement;this.body=e;this.test=t}return DoWhileStatement}();t.DoWhileStatement=F;var S=function(){function EmptyStatement(){this.type=i.Syntax.EmptyStatement}return EmptyStatement}();t.EmptyStatement=S;var B=function(){function ExportAllDeclaration(e){this.type=i.Syntax.ExportAllDeclaration;this.source=e}return ExportAllDeclaration}();t.ExportAllDeclaration=B;var k=function(){function ExportDefaultDeclaration(e){this.type=i.Syntax.ExportDefaultDeclaration;this.declaration=e}return ExportDefaultDeclaration}();t.ExportDefaultDeclaration=k;var O=function(){function ExportNamedDeclaration(e,t,r){this.type=i.Syntax.ExportNamedDeclaration;this.declaration=e;this.specifiers=t;this.source=r}return ExportNamedDeclaration}();t.ExportNamedDeclaration=O;var P=function(){function ExportSpecifier(e,t){this.type=i.Syntax.ExportSpecifier;this.exported=t;this.local=e}return ExportSpecifier}();t.ExportSpecifier=P;var T=function(){function ExpressionStatement(e){this.type=i.Syntax.ExpressionStatement;this.expression=e}return ExpressionStatement}();t.ExpressionStatement=T;var I=function(){function ForInStatement(e,t,r){this.type=i.Syntax.ForInStatement;this.left=e;this.right=t;this.body=r;this.each=false}return ForInStatement}();t.ForInStatement=I;var M=function(){function ForOfStatement(e,t,r){this.type=i.Syntax.ForOfStatement;this.left=e;this.right=t;this.body=r}return ForOfStatement}();t.ForOfStatement=M;var L=function(){function ForStatement(e,t,r,n){this.type=i.Syntax.ForStatement;this.init=e;this.test=t;this.update=r;this.body=n}return ForStatement}();t.ForStatement=L;var R=function(){function FunctionDeclaration(e,t,r,n){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionDeclaration}();t.FunctionDeclaration=R;var j=function(){function FunctionExpression(e,t,r,n){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionExpression}();t.FunctionExpression=j;var U=function(){function Identifier(e){this.type=i.Syntax.Identifier;this.name=e}return Identifier}();t.Identifier=U;var N=function(){function IfStatement(e,t,r){this.type=i.Syntax.IfStatement;this.test=e;this.consequent=t;this.alternate=r}return IfStatement}();t.IfStatement=N;var J=function(){function ImportDeclaration(e,t){this.type=i.Syntax.ImportDeclaration;this.specifiers=e;this.source=t}return ImportDeclaration}();t.ImportDeclaration=J;var z=function(){function ImportDefaultSpecifier(e){this.type=i.Syntax.ImportDefaultSpecifier;this.local=e}return ImportDefaultSpecifier}();t.ImportDefaultSpecifier=z;var X=function(){function ImportNamespaceSpecifier(e){this.type=i.Syntax.ImportNamespaceSpecifier;this.local=e}return ImportNamespaceSpecifier}();t.ImportNamespaceSpecifier=X;var G=function(){function ImportSpecifier(e,t){this.type=i.Syntax.ImportSpecifier;this.local=e;this.imported=t}return ImportSpecifier}();t.ImportSpecifier=G;var q=function(){function LabeledStatement(e,t){this.type=i.Syntax.LabeledStatement;this.label=e;this.body=t}return LabeledStatement}();t.LabeledStatement=q;var W=function(){function Literal(e,t){this.type=i.Syntax.Literal;this.value=e;this.raw=t}return Literal}();t.Literal=W;var _=function(){function MetaProperty(e,t){this.type=i.Syntax.MetaProperty;this.meta=e;this.property=t}return MetaProperty}();t.MetaProperty=_;var V=function(){function MethodDefinition(e,t,r,n,a){this.type=i.Syntax.MethodDefinition;this.key=e;this.computed=t;this.value=r;this.kind=n;this.static=a}return MethodDefinition}();t.MethodDefinition=V;var Y=function(){function Module(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="module"}return Module}();t.Module=Y;var H=function(){function NewExpression(e,t){this.type=i.Syntax.NewExpression;this.callee=e;this.arguments=t}return NewExpression}();t.NewExpression=H;var $=function(){function ObjectExpression(e){this.type=i.Syntax.ObjectExpression;this.properties=e}return ObjectExpression}();t.ObjectExpression=$;var Z=function(){function ObjectPattern(e){this.type=i.Syntax.ObjectPattern;this.properties=e}return ObjectPattern}();t.ObjectPattern=Z;var Q=function(){function Property(e,t,r,n,a,u){this.type=i.Syntax.Property;this.key=t;this.computed=r;this.value=n;this.kind=e;this.method=a;this.shorthand=u}return Property}();t.Property=Q;var K=function(){function RegexLiteral(e,t,r,n){this.type=i.Syntax.Literal;this.value=e;this.raw=t;this.regex={pattern:r,flags:n}}return RegexLiteral}();t.RegexLiteral=K;var ee=function(){function RestElement(e){this.type=i.Syntax.RestElement;this.argument=e}return RestElement}();t.RestElement=ee;var te=function(){function ReturnStatement(e){this.type=i.Syntax.ReturnStatement;this.argument=e}return ReturnStatement}();t.ReturnStatement=te;var re=function(){function Script(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="script"}return Script}();t.Script=re;var ie=function(){function SequenceExpression(e){this.type=i.Syntax.SequenceExpression;this.expressions=e}return SequenceExpression}();t.SequenceExpression=ie;var ne=function(){function SpreadElement(e){this.type=i.Syntax.SpreadElement;this.argument=e}return SpreadElement}();t.SpreadElement=ne;var ae=function(){function StaticMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=false;this.object=e;this.property=t}return StaticMemberExpression}();t.StaticMemberExpression=ae;var ue=function(){function Super(){this.type=i.Syntax.Super}return Super}();t.Super=ue;var se=function(){function SwitchCase(e,t){this.type=i.Syntax.SwitchCase;this.test=e;this.consequent=t}return SwitchCase}();t.SwitchCase=se;var oe=function(){function SwitchStatement(e,t){this.type=i.Syntax.SwitchStatement;this.discriminant=e;this.cases=t}return SwitchStatement}();t.SwitchStatement=oe;var le=function(){function TaggedTemplateExpression(e,t){this.type=i.Syntax.TaggedTemplateExpression;this.tag=e;this.quasi=t}return TaggedTemplateExpression}();t.TaggedTemplateExpression=le;var fe=function(){function TemplateElement(e,t){this.type=i.Syntax.TemplateElement;this.value=e;this.tail=t}return TemplateElement}();t.TemplateElement=fe;var ce=function(){function TemplateLiteral(e,t){this.type=i.Syntax.TemplateLiteral;this.quasis=e;this.expressions=t}return TemplateLiteral}();t.TemplateLiteral=ce;var he=function(){function ThisExpression(){this.type=i.Syntax.ThisExpression}return ThisExpression}();t.ThisExpression=he;var pe=function(){function ThrowStatement(e){this.type=i.Syntax.ThrowStatement;this.argument=e}return ThrowStatement}();t.ThrowStatement=pe;var ve=function(){function TryStatement(e,t,r){this.type=i.Syntax.TryStatement;this.block=e;this.handler=t;this.finalizer=r}return TryStatement}();t.TryStatement=ve;var de=function(){function UnaryExpression(e,t){this.type=i.Syntax.UnaryExpression;this.operator=e;this.argument=t;this.prefix=true}return UnaryExpression}();t.UnaryExpression=de;var De=function(){function UpdateExpression(e,t,r){this.type=i.Syntax.UpdateExpression;this.operator=e;this.argument=t;this.prefix=r}return UpdateExpression}();t.UpdateExpression=De;var me=function(){function VariableDeclaration(e,t){this.type=i.Syntax.VariableDeclaration;this.declarations=e;this.kind=t}return VariableDeclaration}();t.VariableDeclaration=me;var ge=function(){function VariableDeclarator(e,t){this.type=i.Syntax.VariableDeclarator;this.id=e;this.init=t}return VariableDeclarator}();t.VariableDeclarator=ge;var Ee=function(){function WhileStatement(e,t){this.type=i.Syntax.WhileStatement;this.test=e;this.body=t}return WhileStatement}();t.WhileStatement=Ee;var Ae=function(){function WithStatement(e,t){this.type=i.Syntax.WithStatement;this.object=e;this.body=t}return WithStatement}();t.WithStatement=Ae;var Ce=function(){function YieldExpression(e,t){this.type=i.Syntax.YieldExpression;this.argument=e;this.delegate=t}return YieldExpression}();t.YieldExpression=Ce},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(10);var a=r(11);var u=r(7);var s=r(12);var o=r(2);var l=r(13);var f="ArrowParameterPlaceHolder";var c=function(){function Parser(e,t,r){if(t===void 0){t={}}this.config={range:typeof t.range==="boolean"&&t.range,loc:typeof t.loc==="boolean"&&t.loc,source:null,tokens:typeof t.tokens==="boolean"&&t.tokens,comment:typeof t.comment==="boolean"&&t.comment,tolerant:typeof t.tolerant==="boolean"&&t.tolerant};if(this.config.loc&&t.source&&t.source!==null){this.config.source=String(t.source)}this.delegate=r;this.errorHandler=new n.ErrorHandler;this.errorHandler.tolerant=this.config.tolerant;this.scanner=new s.Scanner(e,this.errorHandler);this.scanner.trackComment=this.config.comment;this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11};this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0};this.hasLineTerminator=false;this.context={isModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,firstCoverInitializedNameError:null,isAssignmentTarget:false,isBindingElement:false,inFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},strict:false};this.tokens=[];this.startMarker={index:0,line:this.scanner.lineNumber,column:0};this.lastMarker={index:0,line:this.scanner.lineNumber,column:0};this.nextToken();this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}Parser.prototype.throwError=function(e){var t=[];for(var r=1;r0&&this.delegate){for(var t=0;t>="||e===">>>="||e==="&="||e==="^="||e==="|="};Parser.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);if(this.context.firstCoverInitializedNameError!==null){this.throwUnexpectedToken(this.context.firstCoverInitializedNameError)}this.context.isBindingElement=t;this.context.isAssignmentTarget=r;this.context.firstCoverInitializedNameError=i;return n};Parser.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);this.context.isBindingElement=this.context.isBindingElement&&t;this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r;this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError;return n};Parser.prototype.consumeSemicolon=function(){if(this.match(";")){this.nextToken()}else if(!this.hasLineTerminator){if(this.lookahead.type!==2&&!this.match("}")){this.throwUnexpectedToken(this.lookahead)}this.lastMarker.index=this.startMarker.index;this.lastMarker.line=this.startMarker.line;this.lastMarker.column=this.startMarker.column}};Parser.prototype.parsePrimaryExpression=function(){var e=this.createNode();var t;var r,i;switch(this.lookahead.type){case 3:if((this.context.isModule||this.context.await)&&this.lookahead.value==="await"){this.tolerateUnexpectedToken(this.lookahead)}t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new u.Identifier(this.nextToken().value));break;case 6:case 8:if(this.context.strict&&this.lookahead.octal){this.tolerateUnexpectedToken(this.lookahead,a.Messages.StrictOctalLiteral)}this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(r.value,i));break;case 1:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(r.value==="true",i));break;case 5:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(null,i));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=false;t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.scanner.index=this.startMarker.index;r=this.nextRegexToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.RegexLiteral(r.regex,i,r.pattern,r.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:if(!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")){t=this.parseIdentifierName()}else if(!this.context.strict&&this.matchKeyword("let")){t=this.finalize(e,new u.Identifier(this.nextToken().value))}else{this.context.isAssignmentTarget=false;this.context.isBindingElement=false;if(this.matchKeyword("function")){t=this.parseFunctionExpression()}else if(this.matchKeyword("this")){this.nextToken();t=this.finalize(e,new u.ThisExpression)}else if(this.matchKeyword("class")){t=this.parseClassExpression()}else{t=this.throwUnexpectedToken(this.nextToken())}}break;default:t=this.throwUnexpectedToken(this.nextToken())}return t};Parser.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new u.SpreadElement(t))};Parser.prototype.parseArrayInitializer=function(){var e=this.createNode();var t=[];this.expect("[");while(!this.match("]")){if(this.match(",")){this.nextToken();t.push(null)}else if(this.match("...")){var r=this.parseSpreadElement();if(!this.match("]")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.expect(",")}t.push(r)}else{t.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(e,new u.ArrayExpression(t))};Parser.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var t=this.context.strict;var r=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);if(this.context.strict&&e.firstRestricted){this.tolerateUnexpectedToken(e.firstRestricted,e.message)}if(this.context.strict&&e.stricted){this.tolerateUnexpectedToken(e.stricted,e.message)}this.context.strict=t;this.context.allowStrictDirective=r;return i};Parser.prototype.parsePropertyMethodFunction=function(){var e=false;var t=this.createNode();var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(t,new u.FunctionExpression(null,i.params,n,e))};Parser.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode();var t=this.context.allowYield;var r=this.context.await;this.context.allowYield=false;this.context.await=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=t;this.context.await=r;return this.finalize(e,new u.AsyncFunctionExpression(null,i.params,n))};Parser.prototype.parseObjectPropertyKey=function(){var e=this.createNode();var t=this.nextToken();var r;switch(t.type){case 8:case 6:if(this.context.strict&&t.octal){this.tolerateUnexpectedToken(t,a.Messages.StrictOctalLiteral)}var i=this.getTokenRaw(t);r=this.finalize(e,new u.Literal(t.value,i));break;case 3:case 1:case 5:case 4:r=this.finalize(e,new u.Identifier(t.value));break;case 7:if(t.value==="["){r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.expect("]")}else{r=this.throwUnexpectedToken(t)}break;default:r=this.throwUnexpectedToken(t)}return r};Parser.prototype.isPropertyKey=function(e,t){return e.type===o.Syntax.Identifier&&e.name===t||e.type===o.Syntax.Literal&&e.value===t};Parser.prototype.parseObjectProperty=function(e){var t=this.createNode();var r=this.lookahead;var i;var n=null;var s=null;var o=false;var l=false;var f=false;var c=false;if(r.type===3){var h=r.value;this.nextToken();o=this.match("[");c=!this.hasLineTerminator&&h==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(",");n=c?this.parseObjectPropertyKey():this.finalize(t,new u.Identifier(h))}else if(this.match("*")){this.nextToken()}else{o=this.match("[");n=this.parseObjectPropertyKey()}var p=this.qualifiedPropertyName(this.lookahead);if(r.type===3&&!c&&r.value==="get"&&p){i="get";o=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;s=this.parseGetterMethod()}else if(r.type===3&&!c&&r.value==="set"&&p){i="set";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseSetterMethod()}else if(r.type===7&&r.value==="*"&&p){i="init";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseGeneratorMethod();l=true}else{if(!n){this.throwUnexpectedToken(this.lookahead)}i="init";if(this.match(":")&&!c){if(!o&&this.isPropertyKey(n,"__proto__")){if(e.value){this.tolerateError(a.Messages.DuplicateProtoProperty)}e.value=true}this.nextToken();s=this.inheritCoverGrammar(this.parseAssignmentExpression)}else if(this.match("(")){s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();l=true}else if(r.type===3){var h=this.finalize(t,new u.Identifier(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead;this.nextToken();f=true;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(t,new u.AssignmentPattern(h,v))}else{f=true;s=h}}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(t,new u.Property(i,n,o,s,l,f))};Parser.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");var t=[];var r={value:false};while(!this.match("}")){t.push(this.parseObjectProperty(r));if(!this.match("}")){this.expectCommaSeparator()}}this.expect("}");return this.finalize(e,new u.ObjectExpression(t))};Parser.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode();var t=this.nextToken();var r=t.value;var n=t.cooked;return this.finalize(e,new u.TemplateElement({raw:r,cooked:n},t.tail))};Parser.prototype.parseTemplateElement=function(){if(this.lookahead.type!==10){this.throwUnexpectedToken()}var e=this.createNode();var t=this.nextToken();var r=t.value;var i=t.cooked;return this.finalize(e,new u.TemplateElement({raw:r,cooked:i},t.tail))};Parser.prototype.parseTemplateLiteral=function(){var e=this.createNode();var t=[];var r=[];var i=this.parseTemplateHead();r.push(i);while(!i.tail){t.push(this.parseExpression());i=this.parseTemplateElement();r.push(i)}return this.finalize(e,new u.TemplateLiteral(r,t))};Parser.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case o.Syntax.Identifier:case o.Syntax.MemberExpression:case o.Syntax.RestElement:case o.Syntax.AssignmentPattern:break;case o.Syntax.SpreadElement:e.type=o.Syntax.RestElement;this.reinterpretExpressionAsPattern(e.argument);break;case o.Syntax.ArrayExpression:e.type=o.Syntax.ArrayPattern;for(var t=0;t")){this.expect("=>")}e={type:f,params:[],async:false}}else{var t=this.lookahead;var r=[];if(this.match("...")){e=this.parseRestElement(r);this.expect(")");if(!this.match("=>")){this.expect("=>")}e={type:f,params:[e],async:false}}else{var i=false;this.context.isBindingElement=true;e=this.inheritCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];this.context.isAssignmentTarget=false;n.push(e);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();if(this.match(")")){this.nextToken();for(var a=0;a")){this.expect("=>")}this.context.isBindingElement=false;for(var a=0;a")){if(e.type===o.Syntax.Identifier&&e.name==="yield"){i=true;e={type:f,params:[e],async:false}}if(!i){if(!this.context.isBindingElement){this.throwUnexpectedToken(this.lookahead)}if(e.type===o.Syntax.SequenceExpression){for(var a=0;a")){for(var o=0;o0){this.nextToken();this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=[e,this.lookahead];var a=t;var s=this.isolateCoverGrammar(this.parseExponentiationExpression);var o=[a,r.value,s];var l=[i];while(true){i=this.binaryPrecedence(this.lookahead);if(i<=0){break}while(o.length>2&&i<=l[l.length-1]){s=o.pop();var f=o.pop();l.pop();a=o.pop();n.pop();var c=this.startNode(n[n.length-1]);o.push(this.finalize(c,new u.BinaryExpression(f,a,s)))}o.push(this.nextToken().value);l.push(i);n.push(this.lookahead);o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=o.length-1;t=o[h];var p=n.pop();while(h>1){var v=n.pop();var d=p&&p.lineStart;var c=this.startNode(v,d);var f=o[h-1];t=this.finalize(c,new u.BinaryExpression(f,o[h-2],t));h-=2;p=v}}return t};Parser.prototype.parseConditionalExpression=function(){var e=this.lookahead;var t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=true;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r;this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new u.ConditionalExpression(t,i,n));this.context.isAssignmentTarget=false;this.context.isBindingElement=false}return t};Parser.prototype.checkPatternParam=function(e,t){switch(t.type){case o.Syntax.Identifier:this.validateParam(e,t,t.name);break;case o.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case o.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case o.Syntax.ArrayPattern:for(var r=0;r")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=e.async;var s=this.reinterpretAsCoverFormalsList(e);if(s){if(this.hasLineTerminator){this.tolerateUnexpectedToken(this.lookahead)}this.context.firstCoverInitializedNameError=null;var l=this.context.strict;var c=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var h=this.context.allowYield;var p=this.context.await;this.context.allowYield=true;this.context.await=n;var v=this.startNode(t);this.expect("=>");var d=void 0;if(this.match("{")){var D=this.context.allowIn;this.context.allowIn=true;d=this.parseFunctionSourceElements();this.context.allowIn=D}else{d=this.isolateCoverGrammar(this.parseAssignmentExpression)}var m=d.type!==o.Syntax.BlockStatement;if(this.context.strict&&s.firstRestricted){this.throwUnexpectedToken(s.firstRestricted,s.message)}if(this.context.strict&&s.stricted){this.tolerateUnexpectedToken(s.stricted,s.message)}e=n?this.finalize(v,new u.AsyncArrowFunctionExpression(s.params,d,m)):this.finalize(v,new u.ArrowFunctionExpression(s.params,d,m));this.context.strict=l;this.context.allowStrictDirective=c;this.context.allowYield=h;this.context.await=p}}else{if(this.matchAssign()){if(!this.context.isAssignmentTarget){this.tolerateError(a.Messages.InvalidLHSInAssignment)}if(this.context.strict&&e.type===o.Syntax.Identifier){var g=e;if(this.scanner.isRestrictedWord(g.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictLHSAssignment)}if(this.scanner.isStrictModeReservedWord(g.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}}if(!this.match("=")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false}else{this.reinterpretExpressionAsPattern(e)}r=this.nextToken();var E=r.value;var A=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new u.AssignmentExpression(E,e,A));this.context.firstCoverInitializedNameError=null}}}return e};Parser.prototype.parseExpression=function(){var e=this.lookahead;var t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];r.push(t);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();r.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}t=this.finalize(this.startNode(e),new u.SequenceExpression(r))}return t};Parser.prototype.parseStatementListItem=function(){var e;this.context.isAssignmentTarget=true;this.context.isBindingElement=true;if(this.lookahead.type===4){switch(this.lookahead.value){case"export":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalExportDeclaration)}e=this.parseExportDeclaration();break;case"import":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalImportDeclaration)}e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:false});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:false}):this.parseStatement();break;default:e=this.parseStatement();break}}else{e=this.parseStatement()}return e};Parser.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");var t=[];while(true){if(this.match("}")){break}t.push(this.parseStatementListItem())}this.expect("}");return this.finalize(e,new u.BlockStatement(t))};Parser.prototype.parseLexicalBinding=function(e,t){var r=this.createNode();var i=[];var n=this.parsePattern(i,e);if(this.context.strict&&n.type===o.Syntax.Identifier){if(this.scanner.isRestrictedWord(n.name)){this.tolerateError(a.Messages.StrictVarName)}}var s=null;if(e==="const"){if(!this.matchKeyword("in")&&!this.matchContextualKeyword("of")){if(this.match("=")){this.nextToken();s=this.isolateCoverGrammar(this.parseAssignmentExpression)}else{this.throwError(a.Messages.DeclarationMissingInitializer,"const")}}}else if(!t.inFor&&n.type!==o.Syntax.Identifier||this.match("=")){this.expect("=");s=this.isolateCoverGrammar(this.parseAssignmentExpression)}return this.finalize(r,new u.VariableDeclarator(n,s))};Parser.prototype.parseBindingList=function(e,t){var r=[this.parseLexicalBinding(e,t)];while(this.match(",")){this.nextToken();r.push(this.parseLexicalBinding(e,t))}return r};Parser.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();this.scanner.restoreState(e);return t.type===3||t.type===7&&t.value==="["||t.type===7&&t.value==="{"||t.type===4&&t.value==="let"||t.type===4&&t.value==="yield"};Parser.prototype.parseLexicalDeclaration=function(e){var t=this.createNode();var r=this.nextToken().value;i.assert(r==="let"||r==="const","Lexical declaration must be either let or const");var n=this.parseBindingList(r,e);this.consumeSemicolon();return this.finalize(t,new u.VariableDeclaration(n,r))};Parser.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(r,new u.RestElement(i))};Parser.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");var i=[];while(!this.match("]")){if(this.match(",")){this.nextToken();i.push(null)}else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}else{i.push(this.parsePatternWithDefault(e,t))}if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(r,new u.ArrayPattern(i))};Parser.prototype.parsePropertyPattern=function(e,t){var r=this.createNode();var i=false;var n=false;var a=false;var s;var o;if(this.lookahead.type===3){var l=this.lookahead;s=this.parseVariableIdentifier();var f=this.finalize(r,new u.Identifier(l.value));if(this.match("=")){e.push(l);n=true;this.nextToken();var c=this.parseAssignmentExpression();o=this.finalize(this.startNode(l),new u.AssignmentPattern(f,c))}else if(!this.match(":")){e.push(l);n=true;o=f}else{this.expect(":");o=this.parsePatternWithDefault(e,t)}}else{i=this.match("[");s=this.parseObjectPropertyKey();this.expect(":");o=this.parsePatternWithDefault(e,t)}return this.finalize(r,new u.Property("init",s,i,o,a,n))};Parser.prototype.parseObjectPattern=function(e,t){var r=this.createNode();var i=[];this.expect("{");while(!this.match("}")){i.push(this.parsePropertyPattern(e,t));if(!this.match("}")){this.expect(",")}}this.expect("}");return this.finalize(r,new u.ObjectPattern(i))};Parser.prototype.parsePattern=function(e,t){var r;if(this.match("[")){r=this.parseArrayPattern(e,t)}else if(this.match("{")){r=this.parseObjectPattern(e,t)}else{if(this.matchKeyword("let")&&(t==="const"||t==="let")){this.tolerateUnexpectedToken(this.lookahead,a.Messages.LetInLexicalBinding)}e.push(this.lookahead);r=this.parseVariableIdentifier(t)}return r};Parser.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead;var i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var n=this.context.allowYield;this.context.allowYield=true;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=n;i=this.finalize(this.startNode(r),new u.AssignmentPattern(i,a))}return i};Parser.prototype.parseVariableIdentifier=function(e){var t=this.createNode();var r=this.nextToken();if(r.type===4&&r.value==="yield"){if(this.context.strict){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else if(!this.context.allowYield){this.throwUnexpectedToken(r)}}else if(r.type!==3){if(this.context.strict&&r.type===4&&this.scanner.isStrictModeReservedWord(r.value)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else{if(this.context.strict||r.value!=="let"||e!=="var"){this.throwUnexpectedToken(r)}}}else if((this.context.isModule||this.context.await)&&r.type===3&&r.value==="await"){this.tolerateUnexpectedToken(r)}return this.finalize(t,new u.Identifier(r.value))};Parser.prototype.parseVariableDeclaration=function(e){var t=this.createNode();var r=[];var i=this.parsePattern(r,"var");if(this.context.strict&&i.type===o.Syntax.Identifier){if(this.scanner.isRestrictedWord(i.name)){this.tolerateError(a.Messages.StrictVarName)}}var n=null;if(this.match("=")){this.nextToken();n=this.isolateCoverGrammar(this.parseAssignmentExpression)}else if(i.type!==o.Syntax.Identifier&&!e.inFor){this.expect("=")}return this.finalize(t,new u.VariableDeclarator(i,n))};Parser.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor};var r=[];r.push(this.parseVariableDeclaration(t));while(this.match(",")){this.nextToken();r.push(this.parseVariableDeclaration(t))}return r};Parser.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:false});this.consumeSemicolon();return this.finalize(e,new u.VariableDeclaration(t,"var"))};Parser.prototype.parseEmptyStatement=function(){var e=this.createNode();this.expect(";");return this.finalize(e,new u.EmptyStatement)};Parser.prototype.parseExpressionStatement=function(){var e=this.createNode();var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new u.ExpressionStatement(t))};Parser.prototype.parseIfClause=function(){if(this.context.strict&&this.matchKeyword("function")){this.tolerateError(a.Messages.StrictFunction)}return this.parseStatement()};Parser.prototype.parseIfStatement=function(){var e=this.createNode();var t;var r=null;this.expectKeyword("if");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");t=this.parseIfClause();if(this.matchKeyword("else")){this.nextToken();r=this.parseIfClause()}}return this.finalize(e,new u.IfStatement(i,t,r))};Parser.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=true;var r=this.parseStatement();this.context.inIteration=t;this.expectKeyword("while");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken())}else{this.expect(")");if(this.match(";")){this.nextToken()}}return this.finalize(e,new u.DoWhileStatement(r,i))};Parser.prototype.parseWhileStatement=function(){var e=this.createNode();var t;this.expectKeyword("while");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=true;t=this.parseStatement();this.context.inIteration=i}return this.finalize(e,new u.WhileStatement(r,t))};Parser.prototype.parseForStatement=function(){var e=null;var t=null;var r=null;var i=true;var n,s;var l=this.createNode();this.expectKeyword("for");this.expect("(");if(this.match(";")){this.nextToken()}else{if(this.matchKeyword("var")){e=this.createNode();this.nextToken();var f=this.context.allowIn;this.context.allowIn=false;var c=this.parseVariableDeclarationList({inFor:true});this.context.allowIn=f;if(c.length===1&&this.matchKeyword("in")){var h=c[0];if(h.init&&(h.id.type===o.Syntax.ArrayPattern||h.id.type===o.Syntax.ObjectPattern||this.context.strict)){this.tolerateError(a.Messages.ForInOfLoopInitializer,"for-in")}e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.nextToken();n=e;s=this.parseExpression();e=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.nextToken();n=e;s=this.parseAssignmentExpression();e=null;i=false}else{e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.expect(";")}}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var p=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in"){e=this.finalize(e,new u.Identifier(p));this.nextToken();n=e;s=this.parseExpression();e=null}else{var f=this.context.allowIn;this.context.allowIn=false;var c=this.parseBindingList(p,{inFor:true});this.context.allowIn=f;if(c.length===1&&c[0].init===null&&this.matchKeyword("in")){e=this.finalize(e,new u.VariableDeclaration(c,p));this.nextToken();n=e;s=this.parseExpression();e=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new u.VariableDeclaration(c,p));this.nextToken();n=e;s=this.parseAssignmentExpression();e=null;i=false}else{this.consumeSemicolon();e=this.finalize(e,new u.VariableDeclaration(c,p))}}}else{var v=this.lookahead;var f=this.context.allowIn;this.context.allowIn=false;e=this.inheritCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=f;if(this.matchKeyword("in")){if(!this.context.isAssignmentTarget||e.type===o.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForIn)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;s=this.parseExpression();e=null}else if(this.matchContextualKeyword("of")){if(!this.context.isAssignmentTarget||e.type===o.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForLoop)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;s=this.parseAssignmentExpression();e=null;i=false}else{if(this.match(",")){var d=[e];while(this.match(",")){this.nextToken();d.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}e=this.finalize(this.startNode(v),new u.SequenceExpression(d))}this.expect(";")}}}if(typeof n==="undefined"){if(!this.match(";")){t=this.parseExpression()}this.expect(";");if(!this.match(")")){r=this.parseExpression()}}var D;if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());D=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");var m=this.context.inIteration;this.context.inIteration=true;D=this.isolateCoverGrammar(this.parseStatement);this.context.inIteration=m}return typeof n==="undefined"?this.finalize(l,new u.ForStatement(e,t,r,D)):i?this.finalize(l,new u.ForInStatement(n,s,D)):this.finalize(l,new u.ForOfStatement(n,s,D))};Parser.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();t=r;var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}}this.consumeSemicolon();if(t===null&&!this.context.inIteration){this.throwError(a.Messages.IllegalContinue)}return this.finalize(e,new u.ContinueStatement(t))};Parser.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}t=r}this.consumeSemicolon();if(t===null&&!this.context.inIteration&&!this.context.inSwitch){this.throwError(a.Messages.IllegalBreak)}return this.finalize(e,new u.BreakStatement(t))};Parser.prototype.parseReturnStatement=function(){if(!this.context.inFunctionBody){this.tolerateError(a.Messages.IllegalReturn)}var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10;var r=t?this.parseExpression():null;this.consumeSemicolon();return this.finalize(e,new u.ReturnStatement(r))};Parser.prototype.parseWithStatement=function(){if(this.context.strict){this.tolerateError(a.Messages.StrictModeWith)}var e=this.createNode();var t;this.expectKeyword("with");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");t=this.parseStatement()}return this.finalize(e,new u.WithStatement(r,t))};Parser.prototype.parseSwitchCase=function(){var e=this.createNode();var t;if(this.matchKeyword("default")){this.nextToken();t=null}else{this.expectKeyword("case");t=this.parseExpression()}this.expect(":");var r=[];while(true){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case")){break}r.push(this.parseStatementListItem())}return this.finalize(e,new u.SwitchCase(t,r))};Parser.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch");this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=true;var i=[];var n=false;this.expect("{");while(true){if(this.match("}")){break}var s=this.parseSwitchCase();if(s.test===null){if(n){this.throwError(a.Messages.MultipleDefaultsInSwitch)}n=true}i.push(s)}this.expect("}");this.context.inSwitch=r;return this.finalize(e,new u.SwitchStatement(t,i))};Parser.prototype.parseLabelledStatement=function(){var e=this.createNode();var t=this.parseExpression();var r;if(t.type===o.Syntax.Identifier&&this.match(":")){this.nextToken();var i=t;var n="$"+i.name;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,n)){this.throwError(a.Messages.Redeclaration,"Label",i.name)}this.context.labelSet[n]=true;var s=void 0;if(this.matchKeyword("class")){this.tolerateUnexpectedToken(this.lookahead);s=this.parseClassDeclaration()}else if(this.matchKeyword("function")){var l=this.lookahead;var f=this.parseFunctionDeclaration();if(this.context.strict){this.tolerateUnexpectedToken(l,a.Messages.StrictFunction)}else if(f.generator){this.tolerateUnexpectedToken(l,a.Messages.GeneratorInLegacyContext)}s=f}else{s=this.parseStatement()}delete this.context.labelSet[n];r=new u.LabeledStatement(i,s)}else{this.consumeSemicolon();r=new u.ExpressionStatement(t)}return this.finalize(e,r)};Parser.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw");if(this.hasLineTerminator){this.throwError(a.Messages.NewlineAfterThrow)}var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new u.ThrowStatement(t))};Parser.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch");this.expect("(");if(this.match(")")){this.throwUnexpectedToken(this.lookahead)}var t=[];var r=this.parsePattern(t);var i={};for(var n=0;n0){this.tolerateError(a.Messages.BadGetterArity)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseSetterMethod=function(){var e=this.createNode();var t=false;var r=this.context.allowYield;this.context.allowYield=!t;var i=this.parseFormalParameters();if(i.params.length!==1){this.tolerateError(a.Messages.BadSetterArity)}else if(i.params[0]instanceof u.RestElement){this.tolerateError(a.Messages.BadSetterRestParameter)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseGeneratorMethod=function(){var e=this.createNode();var t=true;var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();this.context.allowYield=false;var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.isStartOfExpression=function(){var e=true;var t=this.lookahead.value;switch(this.lookahead.type){case 7:e=t==="["||t==="("||t==="{"||t==="+"||t==="-"||t==="!"||t==="~"||t==="++"||t==="--"||t==="/"||t==="/=";break;case 4:e=t==="class"||t==="delete"||t==="function"||t==="let"||t==="new"||t==="super"||t==="this"||t==="typeof"||t==="void"||t==="yield";break;default:break}return e};Parser.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null;var r=false;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=false;r=this.match("*");if(r){this.nextToken();t=this.parseAssignmentExpression()}else if(this.isStartOfExpression()){t=this.parseAssignmentExpression()}this.context.allowYield=i}return this.finalize(e,new u.YieldExpression(t,r))};Parser.prototype.parseClassElement=function(e){var t=this.lookahead;var r=this.createNode();var i="";var n=null;var s=null;var o=false;var l=false;var f=false;var c=false;if(this.match("*")){this.nextToken()}else{o=this.match("[");n=this.parseObjectPropertyKey();var h=n;if(h.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))){t=this.lookahead;f=true;o=this.match("[");if(this.match("*")){this.nextToken()}else{n=this.parseObjectPropertyKey()}}if(t.type===3&&!this.hasLineTerminator&&t.value==="async"){var p=this.lookahead.value;if(p!==":"&&p!=="("&&p!=="*"){c=true;t=this.lookahead;n=this.parseObjectPropertyKey();if(t.type===3&&t.value==="constructor"){this.tolerateUnexpectedToken(t,a.Messages.ConstructorIsAsync)}}}}var v=this.qualifiedPropertyName(this.lookahead);if(t.type===3){if(t.value==="get"&&v){i="get";o=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;s=this.parseGetterMethod()}else if(t.value==="set"&&v){i="set";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseSetterMethod()}}else if(t.type===7&&t.value==="*"&&v){i="init";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseGeneratorMethod();l=true}if(!i&&n&&this.match("(")){i="init";s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();l=true}if(!i){this.throwUnexpectedToken(this.lookahead)}if(i==="init"){i="method"}if(!o){if(f&&this.isPropertyKey(n,"prototype")){this.throwUnexpectedToken(t,a.Messages.StaticPrototype)}if(!f&&this.isPropertyKey(n,"constructor")){if(i!=="method"||!l||s&&s.generator){this.throwUnexpectedToken(t,a.Messages.ConstructorSpecialMethod)}if(e.value){this.throwUnexpectedToken(t,a.Messages.DuplicateConstructor)}else{e.value=true}i="constructor"}}return this.finalize(r,new u.MethodDefinition(n,o,s,i,f))};Parser.prototype.parseClassElementList=function(){var e=[];var t={value:false};this.expect("{");while(!this.match("}")){if(this.match(";")){this.nextToken()}else{e.push(this.parseClassElement(t))}}this.expect("}");return e};Parser.prototype.parseClassBody=function(){var e=this.createNode();var t=this.parseClassElementList();return this.finalize(e,new u.ClassBody(t))};Parser.prototype.parseClassDeclaration=function(e){var t=this.createNode();var r=this.context.strict;this.context.strict=true;this.expectKeyword("class");var i=e&&this.lookahead.type!==3?null:this.parseVariableIdentifier();var n=null;if(this.matchKeyword("extends")){this.nextToken();n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var a=this.parseClassBody();this.context.strict=r;return this.finalize(t,new u.ClassDeclaration(i,n,a))};Parser.prototype.parseClassExpression=function(){var e=this.createNode();var t=this.context.strict;this.context.strict=true;this.expectKeyword("class");var r=this.lookahead.type===3?this.parseVariableIdentifier():null;var i=null;if(this.matchKeyword("extends")){this.nextToken();i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var n=this.parseClassBody();this.context.strict=t;return this.finalize(e,new u.ClassExpression(r,i,n))};Parser.prototype.parseModule=function(){this.context.strict=true;this.context.isModule=true;this.scanner.isModule=true;var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new u.Module(t))};Parser.prototype.parseScript=function(){var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new u.Script(t))};Parser.prototype.parseModuleSpecifier=function(){var e=this.createNode();if(this.lookahead.type!==8){this.throwError(a.Messages.InvalidModuleSpecifier)}var t=this.nextToken();var r=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,r))};Parser.prototype.parseImportSpecifier=function(){var e=this.createNode();var t;var r;if(this.lookahead.type===3){t=this.parseVariableIdentifier();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}}else{t=this.parseIdentifierName();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(e,new u.ImportSpecifier(r,t))};Parser.prototype.parseNamedImports=function(){this.expect("{");var e=[];while(!this.match("}")){e.push(this.parseImportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");return e};Parser.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();return this.finalize(e,new u.ImportDefaultSpecifier(t))};Parser.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*");if(!this.matchContextualKeyword("as")){this.throwError(a.Messages.NoAsAfterImportNamespace)}this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new u.ImportNamespaceSpecifier(t))};Parser.prototype.parseImportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalImportDeclaration)}var e=this.createNode();this.expectKeyword("import");var t;var r=[];if(this.lookahead.type===8){t=this.parseModuleSpecifier()}else{if(this.match("{")){r=r.concat(this.parseNamedImports())}else if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")){r.push(this.parseImportDefaultSpecifier());if(this.match(",")){this.nextToken();if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.match("{")){r=r.concat(this.parseNamedImports())}else{this.throwUnexpectedToken(this.lookahead)}}}else{this.throwUnexpectedToken(this.nextToken())}if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();t=this.parseModuleSpecifier()}this.consumeSemicolon();return this.finalize(e,new u.ImportDeclaration(r,t))};Parser.prototype.parseExportSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();var r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseIdentifierName()}return this.finalize(e,new u.ExportSpecifier(t,r))};Parser.prototype.parseExportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalExportDeclaration)}var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default")){this.nextToken();if(this.matchKeyword("function")){var r=this.parseFunctionDeclaration(true);t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else if(this.matchKeyword("class")){var r=this.parseClassDeclaration(true);t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else if(this.matchContextualKeyword("async")){var r=this.matchAsyncFunction()?this.parseFunctionDeclaration(true):this.parseAssignmentExpression();t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else{if(this.matchContextualKeyword("from")){this.throwError(a.Messages.UnexpectedToken,this.lookahead.value)}var r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon();t=this.finalize(e,new u.ExportDefaultDeclaration(r))}}else if(this.match("*")){this.nextToken();if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var n=this.parseModuleSpecifier();this.consumeSemicolon();t=this.finalize(e,new u.ExportAllDeclaration(n))}else if(this.lookahead.type===4){var r=void 0;switch(this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:false});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new u.ExportNamedDeclaration(r,[],null))}else if(this.matchAsyncFunction()){var r=this.parseFunctionDeclaration();t=this.finalize(e,new u.ExportNamedDeclaration(r,[],null))}else{var s=[];var o=null;var l=false;this.expect("{");while(!this.match("}")){l=l||this.matchKeyword("default");s.push(this.parseExportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");if(this.matchContextualKeyword("from")){this.nextToken();o=this.parseModuleSpecifier();this.consumeSemicolon()}else if(l){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}else{this.consumeSemicolon()}t=this.finalize(e,new u.ExportNamedDeclaration(null,s,o))}return t};return Parser}();t.Parser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function assert(e,t){if(!e){throw new Error("ASSERT: "+t)}}t.assert=assert},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=function(){function ErrorHandler(){this.errors=[];this.tolerant=false}ErrorHandler.prototype.recordError=function(e){this.errors.push(e)};ErrorHandler.prototype.tolerate=function(e){if(this.tolerant){this.recordError(e)}else{throw e}};ErrorHandler.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){if(Object.create&&Object.defineProperty){r=Object.create(e);Object.defineProperty(r,"column",{value:t})}}return r};ErrorHandler.prototype.createError=function(e,t,r,i){var n="Line "+t+": "+i;var a=this.constructError(n,r);a.index=e;a.lineNumber=t;a.description=i;return a};ErrorHandler.prototype.throwError=function(e,t,r,i){throw this.createError(e,t,r,i)};ErrorHandler.prototype.tolerateError=function(e,t,r,i){var n=this.createError(e,t,r,i);if(this.tolerant){this.recordError(n)}else{throw n}};return ErrorHandler}();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(4);var a=r(11);function hexValue(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function octalValue(e){return"01234567".indexOf(e)}var u=function(){function Scanner(e,t){this.source=e;this.errorHandler=t;this.trackComment=false;this.isModule=false;this.length=e.length;this.index=0;this.lineNumber=e.length>0?1:0;this.lineStart=0;this.curlyStack=[]}Scanner.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}};Scanner.prototype.restoreState=function(e){this.index=e.index;this.lineNumber=e.lineNumber;this.lineStart=e.lineStart};Scanner.prototype.eof=function(){return this.index>=this.length};Scanner.prototype.throwUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.tolerateUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.skipSingleLineComment=function(e){var t=[];var r,i;if(this.trackComment){t=[];r=this.index-e;i={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}}}while(!this.eof()){var a=this.source.charCodeAt(this.index);++this.index;if(n.Character.isLineTerminator(a)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var u={multiLine:false,slice:[r+e,this.index-1],range:[r,this.index-1],loc:i};t.push(u)}if(a===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;return t}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:false,slice:[r+e,this.index],range:[r,this.index],loc:i};t.push(u)}return t};Scanner.prototype.skipMultiLineComment=function(){var e=[];var t,r;if(this.trackComment){e=[];t=this.index-2;r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}}}while(!this.eof()){var i=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(i)){if(i===13&&this.source.charCodeAt(this.index+1)===10){++this.index}++this.lineNumber;++this.index;this.lineStart=this.index}else if(i===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2;if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(a)}return e}++this.index}else{++this.index}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(a)}this.tolerateUnexpectedToken();return e};Scanner.prototype.scanComments=function(){var e;if(this.trackComment){e=[]}var t=this.index===0;while(!this.eof()){var r=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(r)){++this.index}else if(n.Character.isLineTerminator(r)){++this.index;if(r===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;t=true}else if(r===47){r=this.source.charCodeAt(this.index+1);if(r===47){this.index+=2;var i=this.skipSingleLineComment(2);if(this.trackComment){e=e.concat(i)}t=true}else if(r===42){this.index+=2;var i=this.skipMultiLineComment();if(this.trackComment){e=e.concat(i)}}else{break}}else if(t&&r===45){if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var i=this.skipSingleLineComment(3);if(this.trackComment){e=e.concat(i)}}else{break}}else if(r===60&&!this.isModule){if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var i=this.skipSingleLineComment(4);if(this.trackComment){e=e.concat(i)}}else{break}}else{break}}return e};Scanner.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return true;default:return false}};Scanner.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}};Scanner.prototype.isRestrictedWord=function(e){return e==="eval"||e==="arguments"};Scanner.prototype.isKeyword=function(e){switch(e.length){case 2:return e==="if"||e==="in"||e==="do";case 3:return e==="var"||e==="for"||e==="new"||e==="try"||e==="let";case 4:return e==="this"||e==="else"||e==="case"||e==="void"||e==="with"||e==="enum";case 5:return e==="while"||e==="break"||e==="catch"||e==="throw"||e==="const"||e==="yield"||e==="class"||e==="super";case 6:return e==="return"||e==="typeof"||e==="delete"||e==="switch"||e==="export"||e==="import";case 7:return e==="default"||e==="finally"||e==="extends";case 8:return e==="function"||e==="continue"||e==="debugger";case 10:return e==="instanceof";default:return false}};Scanner.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){var i=t;t=(i-55296)*1024+r-56320+65536}}return t};Scanner.prototype.scanHexEscape=function(e){var t=e==="u"?4:2;var r=0;for(var i=0;i1114111||e!=="}"){this.throwUnexpectedToken()}return n.Character.fromCodePoint(t)};Scanner.prototype.getIdentifier=function(){var e=this.index++;while(!this.eof()){var t=this.source.charCodeAt(this.index);if(t===92){this.index=e;return this.getComplexIdentifier()}else if(t>=55296&&t<57343){this.index=e;return this.getComplexIdentifier()}if(n.Character.isIdentifierPart(t)){++this.index}else{break}}return this.source.slice(e,this.index)};Scanner.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index);var t=n.Character.fromCodePoint(e);this.index+=t.length;var r;if(e===92){if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierStart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t=r}while(!this.eof()){e=this.codePointAt(this.index);if(!n.Character.isIdentifierPart(e)){break}r=n.Character.fromCodePoint(e);t+=r;this.index+=r.length;if(e===92){t=t.substr(0,t.length-1);if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierPart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t+=r}}return t};Scanner.prototype.octalToDecimal=function(e){var t=e!=="0";var r=octalValue(e);if(!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){t=true;r=r*8+octalValue(this.source[this.index++]);if("0123".indexOf(e)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){r=r*8+octalValue(this.source[this.index++])}}return{code:r,octal:t}};Scanner.prototype.scanIdentifier=function(){var e;var t=this.index;var r=this.source.charCodeAt(t)===92?this.getComplexIdentifier():this.getIdentifier();if(r.length===1){e=3}else if(this.isKeyword(r)){e=4}else if(r==="null"){e=5}else if(r==="true"||r==="false"){e=1}else{e=3}if(e!==3&&t+r.length!==this.index){var i=this.index;this.index=t;this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord);this.index=i}return{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanPunctuator=function(){var e=this.index;var t=this.source[this.index];switch(t){case"(":case"{":if(t==="{"){this.curlyStack.push("{")}++this.index;break;case".":++this.index;if(this.source[this.index]==="."&&this.source[this.index+1]==="."){this.index+=2;t="..."}break;case"}":++this.index;this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4);if(t===">>>="){this.index+=4}else{t=t.substr(0,3);if(t==="==="||t==="!=="||t===">>>"||t==="<<="||t===">>="||t==="**="){this.index+=3}else{t=t.substr(0,2);if(t==="&&"||t==="||"||t==="=="||t==="!="||t==="+="||t==="-="||t==="*="||t==="/="||t==="++"||t==="--"||t==="<<"||t===">>"||t==="&="||t==="|="||t==="^="||t==="%="||t==="<="||t===">="||t==="=>"||t==="**"){this.index+=2}else{t=this.source[this.index];if("<>=!+-*%&|^/".indexOf(t)>=0){++this.index}}}}}if(this.index===e){this.throwUnexpectedToken()}return{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanHexLiteral=function(e){var t="";while(!this.eof()){if(!n.Character.isHexDigit(this.source.charCodeAt(this.index))){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanBinaryLiteral=function(e){var t="";var r;while(!this.eof()){r=this.source[this.index];if(r!=="0"&&r!=="1"){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(!this.eof()){r=this.source.charCodeAt(this.index);if(n.Character.isIdentifierStart(r)||n.Character.isDecimalDigit(r)){this.throwUnexpectedToken()}}return{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanOctalLiteral=function(e,t){var r="";var i=false;if(n.Character.isOctalDigit(e.charCodeAt(0))){i=true;r="0"+this.source[this.index++]}else{++this.index}while(!this.eof()){if(!n.Character.isOctalDigit(this.source.charCodeAt(this.index))){break}r+=this.source[this.index++]}if(!i&&r.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt(r,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0){i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,i){var u=parseInt(t||i,16);if(u>1114111){n.throwUnexpectedToken(a.Messages.InvalidRegExp)}if(u<=65535){return String.fromCharCode(u)}return r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r)}try{RegExp(i)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}};Scanner.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert(e==="/","Regular expression literal must start with a slash");var t=this.source[this.index++];var r=false;var u=false;while(!this.eof()){e=this.source[this.index++];t+=e;if(e==="\\"){e=this.source[this.index++];if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}t+=e}else if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}else if(r){if(e==="]"){r=false}}else{if(e==="/"){u=true;break}else if(e==="["){r=true}}}if(!u){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}return t.substr(1,t.length-2)};Scanner.prototype.scanRegExpFlags=function(){var e="";var t="";while(!this.eof()){var r=this.source[this.index];if(!n.Character.isIdentifierPart(r.charCodeAt(0))){break}++this.index;if(r==="\\"&&!this.eof()){r=this.source[this.index];if(r==="u"){++this.index;var i=this.index;var a=this.scanHexEscape("u");if(a!==null){t+=a;for(e+="\\u";i=55296&&e<57343){if(n.Character.isIdentifierStart(this.codePointAt(this.index))){return this.scanIdentifier()}}return this.scanPunctuator()};return Scanner}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TokenName={};t.TokenName[1]="Boolean";t.TokenName[2]="";t.TokenName[3]="Identifier";t.TokenName[4]="Keyword";t.TokenName[5]="Null";t.TokenName[6]="Numeric";t.TokenName[7]="Punctuator";t.TokenName[8]="String";t.TokenName[9]="RegularExpression";t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(10);var n=r(12);var a=r(13);var u=function(){function Reader(){this.values=[];this.curly=this.paren=-1}Reader.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0};Reader.prototype.isRegexStart=function(){var e=this.values[this.values.length-1];var t=e!==null;switch(e){case"this":case"]":t=false;break;case")":var r=this.values[this.paren-1];t=r==="if"||r==="while"||r==="for"||r==="with";break;case"}":t=false;if(this.values[this.curly-3]==="function"){var i=this.values[this.curly-4];t=i?!this.beforeFunctionExpression(i):false}else if(this.values[this.curly-4]==="function"){var i=this.values[this.curly-5];t=i?!this.beforeFunctionExpression(i):true}break;default:break}return t};Reader.prototype.push=function(e){if(e.type===7||e.type===4){if(e.value==="{"){this.curly=this.values.length}else if(e.value==="("){this.paren=this.values.length}this.values.push(e.value)}else{this.values.push(null)}};return Reader}();var s=function(){function Tokenizer(e,t){this.errorHandler=new i.ErrorHandler;this.errorHandler.tolerant=t?typeof t.tolerant==="boolean"&&t.tolerant:false;this.scanner=new n.Scanner(e,this.errorHandler);this.scanner.trackComment=t?typeof t.comment==="boolean"&&t.comment:false;this.trackRange=t?typeof t.range==="boolean"&&t.range:false;this.trackLoc=t?typeof t.loc==="boolean"&&t.loc:false;this.buffer=[];this.reader=new u}Tokenizer.prototype.errors=function(){return this.errorHandler.errors};Tokenizer.prototype.getNextToken=function(){if(this.buffer.length===0){var e=this.scanner.scanComments();if(this.scanner.trackComment){for(var t=0;tt){if(e.charAt(r-1)!==" "){break}r--}return r}},,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:stringify");var n=r(928);var a=r(212);e.exports=stringify;function stringify(e,t){var r=e.processor;var u=e.tree;var s;if(n(t).fatal){i("Not compiling failed document");return}if(!e.output&&!e.out&&!e.alwaysStringify){i("Not compiling document without output settings");return}i("Compiling `%s`",t.path);if(e.inspect){if(t.path){t.extname=".txt"}s=a[e.color?"color":"noColor"](u)+"\n"}else if(e.treeOut){if(t.path){t.extname=".json"}s=JSON.stringify(u,null,2)+"\n"}else{s=r.stringify(u,t)}t.contents=s;i("Compiled document")}},,,function(e,t,r){"use strict";const i=r(624);e.exports=(e=>typeof e==="string"?e.replace(i(),""):e)},,function(e,t,r){"use strict";var i=r(260);function Mark(e,t,r,i,n){this.name=e;this.buffer=t;this.position=r;this.line=i;this.column=n}Mark.prototype.getSnippet=function getSnippet(e,t){var r,n,a,u,s;if(!this.buffer)return null;e=e||4;t=t||75;r="";n=this.position;while(n>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(n-1))===-1){n-=1;if(this.position-n>t/2-1){r=" ... ";n+=5;break}}a="";u=this.position;while(ut/2-1){a=" ... ";u-=5;break}}s=this.buffer.slice(n,u);return i.repeat(" ",e)+r+s+a+"\n"+i.repeat(" ",e+this.position-n+r.length)+"^"};Mark.prototype.toString=function toString(e){var t,r="";if(this.name){r+='in "'+this.name+'" '}r+="at line "+(this.line+1)+", column "+(this.column+1);if(!e){t=this.getSnippet();if(t){r+=":\n"+t}}return r};e.exports=Mark},function(e,t,r){var i=r(148);var n=function(){};var a=r(405);e.exports=wrapped;function wrapped(e){function wrap(){var t=i(arguments);var r=t[t.length-1];var u=this;var s=typeof r=="function"?t.pop():n;if(!e){return s.apply(u,[null].concat(t))}if(generator(e)){return a(e).apply(u,t.concat(s))}if(e.length>t.length){try{return e.apply(u,t.concat(s))}catch(e){return s(e)}}return sync(e,s).apply(u,t)}return wrap}function sync(e,t){return function(){var r;try{r=e.apply(this,arguments)}catch(e){return t(e)}if(promise(r)){r.then(function(e){t(null,e)},t)}else{r instanceof Error?t(r):t(null,r)}}}function generator(e){return e&&e.constructor&&"GeneratorFunction"==e.constructor.name}function promise(e){return e&&"function"==typeof e.then}},,,,,,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:no-file-name-articles",noFileNameArticles);function noFileNameArticles(e,t){var r=t.stem&&t.stem.match(/^(the|teh|an?)\b/i);if(r){t.message("Do not start file names with `"+r[0]+"`")}}},,,function(e,t,r){"use strict";var i=r(171);e.exports=newline;var n="\n";function newline(e,t,r){var a=t.charAt(0);var u;var s;var o;var l;if(a!==n){return}if(r){return true}l=1;u=t.length;s=a;o="";while(l{if(typeof e!=="string"||e.length===0){return 0}e=i(e);let t=0;for(let r=0;r=127&&i<=159){continue}if(i>=768&&i<=879){continue}if(i>65535){r++}t+=n(i)?2:1}return t})},,,,function(e){e.exports=require("stream")},,,,function(e){"use strict";e.exports=function isObject(e){return typeof e==="object"&&e!==null}},,function(e,t,r){"use strict";e.exports={position:true,gfm:true,commonmark:false,footnotes:false,pedantic:false,blocks:r(676)}},,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var t,r,i,a,u,s=e;u=new Array(s.length);for(t=0,r=s.length;t=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}else if(t.indexOf(":")>=0){t.split(":").forEach(function(e){n.unshift(parseFloat(e,10))});t=0;i=1;n.forEach(function(e){t+=e*i;i*=60});return r*t}return r*parseFloat(t,10)}var u=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(i.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return u.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||i.isNegativeZero(e))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},,function(e,t,r){"use strict";const i=r(947);e.exports=((e,t,r)=>{if(typeof t==="number"){r=t}if(i.has(e.toLowerCase())){t=i.get(e.toLowerCase());const r=e.charAt(0);const n=r===r.toUpperCase();if(n){t=r.toUpperCase()+t.slice(1)}const a=e===e.toUpperCase();if(a){t=t.toUpperCase()}}else if(typeof t!=="string"){t=(e.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,t=>{const r=e.slice(-1)===e.slice(-1).toLowerCase();return r?t.toLowerCase():t.toUpperCase()})}return Math.abs(r)===1?e:t})},function(e,t,r){"use strict";var i=r(814);e.exports=pad;var n="\n";var a=" ";var u=4;function pad(e,t){var r=e.split(n);var s=r.length;var o=i(a,t*u);while(s--){if(r[s].length!==0){r[s]=o+r[s]}}return r.join(n)}},,,,function(e){e.exports=function(e,t){return e.replace(/(\\*)(\$([_a-z0-9]+)|\${([_a-z0-9]+)})/gi,function(e,r,i,n,a){if(!(r.length%2)){return r.substring(Math.ceil(r.length/2))+(t[n||a]||"")}else{return r.substring(1)+i}})}},,,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var t,r=e;for(t in r){if(n.call(r,t)){if(r[t]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},function(e){if(typeof Object.create==="function"){e.exports=function inherits(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}else{e.exports=function inherits(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}},,,,,function(e){var t=Object.prototype.toString;var r=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return t.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,t,i){t>>>=0;var n=e.byteLength-t;if(n<0){throw new RangeError("'offset' is out of bounds")}if(i===undefined){i=n}else{i>>>=0;if(i>n){throw new RangeError("'length' is out of bounds")}}return r?Buffer.from(e.slice(t,t+i)):new Buffer(new Uint8Array(e.slice(t,t+i)))}function fromString(e,t){if(typeof t!=="string"||t===""){t="utf8"}if(!Buffer.isEncoding(t)){throw new TypeError('"encoding" must be a valid string encoding')}return r?Buffer.from(e,t):new Buffer(e,t)}function bufferFrom(e,t,i){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,t,i)}if(typeof e==="string"){return fromString(e,t)}return r?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},,function(e){e.exports={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t,r){const i=r(287);const n=r(809);const a={parse:i,stringify:n};e.exports=a},,function(e){"use strict";e.exports=interrupt;function interrupt(e,t,r,i){var n=e.length;var a=-1;var u;var s;while(++a>0},ToUint32:function(e){return e>>>0}}}();var u=Math.LN2,s=Math.abs,o=Math.floor,l=Math.log,f=Math.min,c=Math.pow,h=Math.round;function configureProperties(e){if(v&&p){var t=v(e),r;for(r=0;rn)throw new RangeError("Array too large for polyfill");function makeArrayAccessor(t){p(e,t,{get:function(){return e._getter(t)},set:function(r){e._setter(t,r)},enumerable:true,configurable:false})}var t;for(t=0;t>r}function as_unsigned(e,t){var r=32-t;return e<>>r}function packI8(e){return[e&255]}function unpackI8(e){return as_signed(e[0],8)}function packU8(e){return[e&255]}function unpackU8(e){return as_unsigned(e[0],8)}function packU8Clamped(e){e=h(Number(e));return[e<0?0:e>255?255:e&255]}function packI16(e){return[e>>8&255,e&255]}function unpackI16(e){return as_signed(e[0]<<8|e[1],16)}function packU16(e){return[e>>8&255,e&255]}function unpackU16(e){return as_unsigned(e[0]<<8|e[1],16)}function packI32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackI32(e){return as_signed(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packU32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackU32(e){return as_unsigned(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packIEEE754(e,t,r){var i=(1<.5)return t+1;return t%2?t+1:t}if(e!==e){a=(1<=c(2,1-i)){a=f(o(l(e)/u),1023);h=roundToEven(e/c(2,a)*c(2,r));if(h/c(2,r)>=2){a=a+1;h=1}if(a>i){a=(1<>1}}i.reverse();s=i.join("");o=(1<0){return l*c(2,f-o)*(1+h/c(2,r))}else if(h!==0){return l*c(2,-(o-1))*(h/c(2,r))}else{return l<0?-0:0}}function unpackF64(e){return unpackIEEE754(e,11,52)}function packF64(e){return packIEEE754(e,11,52)}function unpackF32(e){return unpackIEEE754(e,8,23)}function packF32(e){return packIEEE754(e,8,23)}(function(){var e=function ArrayBuffer(e){e=a.ToInt32(e);if(e<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=e;this._bytes=[];this._bytes.length=e;var t;for(t=0;tthis.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(this.byteOffset%this.BYTES_PER_ELEMENT){throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset;if(this.byteLength%this.BYTES_PER_ELEMENT){throw new RangeError("length of buffer minus byteOffset not a multiple of the element size")}this.length=this.byteLength/this.BYTES_PER_ELEMENT}else{this.length=a.ToUint32(i);this.byteLength=this.length*this.BYTES_PER_ELEMENT}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}}else{throw new TypeError("Unexpected argument type(s)")}this.constructor=s;configureProperties(this);makeArrayAccessors(this)};s.prototype=new r;s.prototype.BYTES_PER_ELEMENT=t;s.prototype._pack=n;s.prototype._unpack=u;s.BYTES_PER_ELEMENT=t;s.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");e=a.ToUint32(e);if(e>=this.length){return i}var t=[],r,n;for(r=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;r=this.length){return i}var r=this._pack(t),n,u;for(n=0,u=this.byteOffset+e*this.BYTES_PER_ELEMENT;nthis.length){throw new RangeError("Offset plus length of array is out of range")}f=this.byteOffset+n*this.BYTES_PER_ELEMENT;c=r.length*this.BYTES_PER_ELEMENT;if(r.buffer===this.buffer){h=[];for(s=0,o=r.byteOffset;sthis.length){throw new RangeError("Offset plus length of array is out of range")}for(s=0;sr?r:e}e=a.ToInt32(e);t=a.ToInt32(t);if(arguments.length<1){e=0}if(arguments.length<2){t=this.length}if(e<0){e=this.length+e}if(t<0){t=this.length+t}e=clamp(e,0,this.length);t=clamp(t,0,this.length);var r=t-e;if(r<0){r=0}return new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,r)};return s}var n=makeConstructor(1,packI8,unpackI8);var u=makeConstructor(1,packU8,unpackU8);var s=makeConstructor(1,packU8Clamped,unpackU8);var o=makeConstructor(2,packI16,unpackI16);var l=makeConstructor(2,packU16,unpackU16);var f=makeConstructor(4,packI32,unpackI32);var c=makeConstructor(4,packU32,unpackU32);var h=makeConstructor(4,packF32,unpackF32);var p=makeConstructor(8,packF64,unpackF64);t.Int8Array=t.Int8Array||n;t.Uint8Array=t.Uint8Array||u;t.Uint8ClampedArray=t.Uint8ClampedArray||s;t.Int16Array=t.Int16Array||o;t.Uint16Array=t.Uint16Array||l;t.Int32Array=t.Int32Array||f;t.Uint32Array=t.Uint32Array||c;t.Float32Array=t.Float32Array||h;t.Float64Array=t.Float64Array||p})();(function(){function r(e,t){return a.IsCallable(e.get)?e.get(t):e[t]}var e=function(){var e=new t.Uint16Array([4660]),i=new t.Uint8Array(e.buffer);return r(i,0)===18}();var i=function DataView(e,r,i){if(arguments.length===0){e=new t.ArrayBuffer(0)}else if(!(e instanceof t.ArrayBuffer||a.Class(e)==="ArrayBuffer")){throw new TypeError("TypeError")}this.buffer=e||new t.ArrayBuffer(0);this.byteOffset=a.ToUint32(r);if(this.byteOffset>this.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset}else{this.byteLength=a.ToUint32(i)}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}configureProperties(this)};function makeGetter(i){return function(n,u){n=a.ToUint32(n);if(n+i.BYTES_PER_ELEMENT>this.byteLength){throw new RangeError("Array index out of range")}n+=this.byteOffset;var s=new t.Uint8Array(this.buffer,n,i.BYTES_PER_ELEMENT),o=[],l;for(l=0;lthis.byteLength){throw new RangeError("Array index out of range")}var o=new i([u]),l=new t.Uint8Array(o.buffer),f=[],c,h;for(c=0;c=e.length?e.length:n+r;t.message+=` while parsing near '${i===0?"":"..."}${e.slice(i,a)}${a===e.length?"":"..."}'`}else{t.message+=` while parsing '${e.slice(0,r*2)}'`}throw t}}},,function(e){"use strict";e.exports=function isArrayish(e){if(!e){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&e.splice instanceof Function}},,,function(e){"use strict";e.exports=strikethrough;var t="~";var r=t+t;function strikethrough(e){return r+this.all(e).join("")+r}},,function(e,t,r){"use strict";var i=r(495);var n=r(704);var a=r(682);var u=r(839);var s=r(526);e.exports=i("remark-lint:no-heading-indent",noHeadingIndent);var o=u.start;function noHeadingIndent(e,t){var r=String(t);var i=r.length;a(e,"heading",visitor);function visitor(e){var a;var u;var l;var f;var c;if(s(e)){return}a=o(e);u=a.offset;l=u-1;while(++l-1&&r.charAt(i)!=="\n"){t.message("Missing newline character at end of file")}}},,,function(e,t,r){"use strict";var i=r(171);var n=r(111);e.exports=strikethrough;strikethrough.locator=n;var a="~";var u="~~";function strikethrough(e,t,r){var n=this;var s="";var o="";var l="";var f="";var c;var h;var p;if(!n.options.gfm||t.charAt(0)!==a||t.charAt(1)!==a||i(t.charAt(2))){return}c=1;h=t.length;p=e.now();p.column+=2;p.offset+=2;while(++c?@[\\\]^`{|}~_]/;function copy(e,t){var r=e.length;var u=t.length;var s=[];var o=0;var l=0;var f;while(l0){r=Math.min(10,Math.floor(r));o=" ".substr(0,r)}}else if(typeof r==="string"){o=r.substr(0,10)}return serializeProperty("",{"":e});function serializeProperty(e,t){let r=t[e];if(r!=null){if(typeof r.toJSON5==="function"){r=r.toJSON5(e)}else if(typeof r.toJSON==="function"){r=r.toJSON(e)}}if(s){r=s.call(t,e,r)}if(r instanceof Number){r=Number(r)}else if(r instanceof String){r=String(r)}else if(r instanceof Boolean){r=r.valueOf()}switch(r){case null:return"null";case true:return"true";case false:return"false"}if(typeof r==="string"){return quoteString(r,false)}if(typeof r==="number"){return String(r)}if(typeof r==="object"){return Array.isArray(r)?serializeArray(r):serializeObject(r)}return undefined}function quoteString(e){const t={"'":.1,'"':.2};const r={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let i="";for(const n of e){switch(n){case"'":case'"':t[n]++;i+=n;continue}if(r[n]){i+=r[n];continue}if(n<" "){let e=n.charCodeAt(0).toString(16);i+="\\x"+("00"+e).substring(e.length);continue}i+=n}const n=l||Object.keys(t).reduce((e,r)=>t[e]=0){throw TypeError("Converting circular structure to JSON5")}n.push(e);let t=a;a=a+o;let r=u||Object.keys(e);let i=[];for(const t of r){const r=serializeProperty(t,e);if(r!==undefined){let e=serializeKey(t)+":";if(o!==""){e+=" "}e+=r;i.push(e)}}let s;if(i.length===0){s="{}"}else{let e;if(o===""){e=i.join(",");s="{"+e+"}"}else{let r=",\n"+a;e=i.join(r);s="{\n"+a+e+",\n"+t+"}"}}n.pop();a=t;return s}function serializeKey(e){if(e.length===0){return quoteString(e,true)}const t=String.fromCodePoint(e.codePointAt(0));if(!i.isIdStartChar(t)){return quoteString(e,true)}for(let r=t.length;r=0){throw TypeError("Converting circular structure to JSON5")}n.push(e);let t=a;a=a+o;let r=[];for(let t=0;t=n){return t.substr(0,n)}while(n>t.length&&i>1){if(i&1){t+=e}i>>=1;e+=e}t+=e;t=t.substr(0,n);return t}},,function(e,t,r){"use strict";var i=r(495);var n=r(839);var a=r(526);var u=r(135);var s=r(682);e.exports=i("remark-lint:no-duplicate-definitions",noDuplicateDefinitions);var o="Do not use definitions with the same identifier";function noDuplicateDefinitions(e,t){var r={};s(e,["definition","footnoteDefinition"],validate);function validate(e){var i;var s;if(!a(e)){i=e.identifier;s=r[i];if(s&&s.type){t.message(o+" ("+u(n.start(s))+")",e)}r[i]=e}}}},function(e){"use strict";e.exports=is;function is(e,t,r,i,n){var a=i!==null&&i!==undefined;var u=r!==null&&r!==undefined;var s=convert(e);if(u&&(typeof r!=="number"||r<0||r===Infinity)){throw new Error("Expected positive finite index or child node")}if(a&&(!is(null,i)||!i.children)){throw new Error("Expected parent node")}if(!t||!t.type||typeof t.type!=="string"){return false}if(a!==u){throw new Error("Expected both parent and index")}return Boolean(s.call(n,t,r,i))}function convert(e){if(typeof e==="string"){return typeFactory(e)}if(e===null||e===undefined){return ok}if(typeof e==="object"){return("length"in e?anyFactory:matchesFactory)(e)}if(typeof e==="function"){return e}throw new Error("Expected function, string, or object as test")}function convertAll(e){var t=[];var r=e.length;var i=-1;while(++i=u){v--;break}d+=g}D="";m="";while(++v{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const i=t.indexOf(r+e);const n=t.indexOf("--");return i!==-1&&(n===-1?true:ie[r])e[r]=i});return e},[]);var u=map(e,function(e){return map(e,function(e,t){var r=String(e);if(i[t]==="."){var u=dotindex(r);var s=a[t]+(/\./.test(r)?1:2)-(n(r)-u);return r+Array(s).join(" ")}else return r})});var s=reduce(u,function(e,t){forEach(t,function(t,r){var i=n(t);if(!e[r]||i>e[r])e[r]=i});return e},[]);return map(u,function(e){return map(e,function(e,t){var r=s[t]-n(e)||0;var a=Array(Math.max(r+1,1)).join(" ");if(i[t]==="r"||i[t]==="."){return a+e}if(i[t]==="c"){return Array(Math.ceil(r/2+1)).join(" ")+e+Array(Math.floor(r/2+1)).join(" ")}return e+a}).join(r).replace(/\s+$/,"")}).join("\n")};function dotindex(e){var t=/\.[^.]*$/.exec(e);return t?t.index+1:e.length}function reduce(e,t,r){if(e.reduce)return e.reduce(t,r);var i=0;var n=arguments.length>=3?r:e[i++];for(;ir&&a0?"add":"remove")+" "+Math.abs(h)+" "+n("space",h);t.message(p,s)}}}}},,,,,function(e,t,r){"use strict";var i=r(721);e.exports=decodeEntity;var n={}.hasOwnProperty;function decodeEntity(e){return n.call(i,e)?i[e]:false}},,function(e,t,r){"use strict";var i=r(336);var n=r(780);e.exports=unherit;function unherit(e){var t;var r;var a;n(Of,e);n(From,Of);t=Of.prototype;for(r in t){a=t[r];if(a&&typeof a==="object"){t[r]="concat"in a?a.concat():i(a)}}return Of;function From(t){return e.apply(this,t)}function Of(){if(!(this instanceof Of)){return new From(arguments)}return e.apply(this,arguments)}}},function(e){"use strict";const t=e=>{let t=false;let r=false;let i=false;for(let n=0;n{if(!(typeof e==="string"||Array.isArray(e))){throw new TypeError("Expected the input to be `string | string[]`")}r=Object.assign({pascalCase:false},r);const i=e=>r.pascalCase?e.charAt(0).toUpperCase()+e.slice(1):e;if(Array.isArray(e)){e=e.map(e=>e.trim()).filter(e=>e.length).join("-")}else{e=e.trim()}if(e.length===0){return""}if(e.length===1){return r.pascalCase?e.toUpperCase():e.toLowerCase()}const n=e!==e.toLowerCase();if(n){e=t(e)}e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,t)=>t.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase());return i(e)};e.exports=r;e.exports.default=r},,function(e,t,r){"use strict";var i=r(211);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},function(e){"use strict";e.exports={gfm:true,commonmark:false,pedantic:false,entities:"false",setext:false,closeAtx:false,looseTable:false,spacedTable:true,paddedTable:true,stringLength:stringLength,incrementListMarker:true,fences:false,fence:"`",bullet:"-",listItemIndent:"tab",rule:"*",ruleSpaces:true,ruleRepetition:3,strong:"*",emphasis:"_"};function stringLength(e){return e.length}},function(e,t,r){"use strict";var i=r(197);var n=r(520);var a=r(439);var u=r(25);var s=r(908);var o=r(895);e.exports=parseEntities;var l={}.hasOwnProperty;var f=String.fromCharCode;var c=Function.prototype;var h={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:false,nonTerminated:true};var p="named";var v="hexadecimal";var d="decimal";var D={};D[v]=16;D[d]=10;var m={};m[p]=s;m[d]=a;m[v]=u;var g=1;var E=2;var A=3;var C=4;var y=5;var w=6;var x=7;var b={};b[g]="Named character references must be terminated by a semicolon";b[E]="Numeric character references must be terminated by a semicolon";b[A]="Named character references cannot be empty";b[C]="Numeric character references cannot be empty";b[y]="Named character references must be known";b[w]="Numeric character references cannot be disallowed";b[x]="Numeric character references cannot be outside the permissible Unicode range";function parseEntities(e,t){var r={};var i;var n;if(!t){t={}}for(n in h){i=t[n];r[n]=i===null||i===undefined?h[n]:i}if(r.position.indent||r.position.start){r.indent=r.position.indent||[];r.position=r.position.start}return parse(e,r)}function parse(e,t){var r=t.additional;var a=t.nonTerminated;var u=t.text;var h=t.reference;var F=t.warning;var S=t.textContext;var B=t.referenceContext;var k=t.warningContext;var O=t.position;var P=t.indent||[];var T=e.length;var I=0;var M=-1;var L=O.column||1;var R=O.line||1;var j="";var U=[];var N;var J;var z;var X;var G;var q;var W;var _;var V;var Y;var H;var $;var Z;var Q;var K;var ee;var te;var re;var ie;ee=now();_=F?parseError:c;I--;T++;while(++I65535){q-=65536;Y+=f(q>>>(10&1023)|55296);q=56320|q&1023}q=Y+f(q)}}if(!q){X=e.slice(Z-1,ie);j+=X;L+=X.length;I=ie-1}else{flush();ee=now();I=ie-1;L+=ie-Z+1;U.push(q);te=now();te.offset++;if(h){h.call(B,q,{start:ee,end:te},e.slice(Z-1,ie))}ee=te}}}return U.join("");function now(){return{line:R,column:L,offset:I+(O.offset||0)}}function parseError(e,t){var r=now();r.column+=t;r.offset+=t;F.call(k,b[e],r,e)}function at(t){return e.charAt(t)}function flush(){if(j){U.push(j);if(u){u.call(S,j,{start:ee,end:now()})}j=""}}}function prohibited(e){return e>=55296&&e<=57343||e>1114111}function disallowed(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}},,,function(e,t,r){"use strict";var i=r(36);var n=r(116);var a=r(171);var u=r(82);e.exports=emphasis;emphasis.locator=u;var s="*";var o="_";var l="\\";function emphasis(e,t,r){var u=this;var f=0;var c=t.charAt(f);var h;var p;var v;var d;var D;var m;var g;if(c!==s&&c!==o){return}p=u.options.pedantic;D=c;v=c;m=t.length;f++;d="";c="";if(p&&a(t.charAt(f))){return}while(f0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==l.prototype){t=_uint8ArrayToBuffer(t)}if(i){if(a.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,a,t,true)}else if(a.ended){e.emit("error",new Error("stream.push() after EOF"))}else{a.reading=false;if(a.decoder&&!r){t=a.decoder.write(t);if(a.objectMode||t.length!==0)addChunk(e,a,t,false);else maybeReadMore(e,a)}else{addChunk(e,a,t,false)}}}else if(!i){a.reading=false}}return needMoreData(a)}function addChunk(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=g){e=g}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){p("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){p("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var i=t.needReadable;p("need readable",i);if(t.length===0||t.length-e0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){p("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)i.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){p("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;i.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length1&&indexOf(n.pipes,e)!==-1)&&!l){p("false write response, pause",r._readableState.awaitDrain);r._readableState.awaitDrain++;f=true}r.pause()}}function onerror(t){p("onerror",t);unpipe();e.removeListener("error",onerror);if(s(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){p("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){p("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!n.flowing){p("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var i=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var a=0;a=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.head.data;else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=fromListPartial(e,t.buffer,t.decoder)}return r}function fromListPartial(e,t,r){var i;if(ea.length?a.length:e;if(u===a.length)n+=a;else n+=a.slice(0,e);e-=u;if(e===0){if(u===a.length){++i;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=a.slice(u)}break}++i}t.length-=i;return n}function copyFromBuffer(e,t){var r=l.allocUnsafe(e);var i=t.head;var n=1;i.data.copy(r);e-=i.data.length;while(i=i.next){var a=i.data;var u=e>a.length?a.length:e;a.copy(r,r.length-e,0,u);e-=u;if(e===0){if(u===a.length){++n;if(i.next)t.head=i.next;else t.head=t.tail=null}else{t.head=i;i.data=a.slice(u)}break}++n}t.length-=n;return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;i.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var r=0,i=e.length;r=f){continue}y="";while(v=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()});var i=process.env[t];if(/^(yes|on|true|enabled)$/i.test(i)){i=true}else if(/^(no|off|false|disabled)$/i.test(i)){i=false}else if(i==="null"){i=null}else{i=Number(i)}e[r]=i;return e},{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):i.isatty(process.stderr.fd)}function formatArgs(t){var r=this.namespace,i=this.useColors;if(i){var n=this.color;var a="[3"+(n<8?n:"8;5;"+n);var u=" ".concat(a,";1m").concat(r," ");t[0]=u+t[0].split("\n").join("\n"+u);t.push(a+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(){return process.stderr.write(n.format.apply(n,arguments)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};var r=Object.keys(t.inspectOpts);for(var i=0;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},,,function(e){"use strict";e.exports=locate;function locate(e,t){var r=e.indexOf("[",t);var i=e.indexOf("![",t);if(i===-1){return r}return r1){u=Math.floor(u/l)*l}o[u]=a;s=e.charAt(++a)}return{indent:u,stops:o}}},function(e){"use strict";e.exports=locate;function locate(e,t){return e.indexOf("`",t)}},,,,,function(e){"use strict";e.exports=factory;function factory(e){var t=indices(String(e));return{toPosition:offsetToPositionFactory(t),toOffset:positionToOffsetFactory(t)}}function offsetToPositionFactory(e){return offsetToPosition;function offsetToPosition(t){var r=-1;var i=e.length;if(t<0){return{}}while(++rt){return{line:r+1,column:t-(e[r-1]||0)+1,offset:t}}}return{}}}function positionToOffsetFactory(e){return positionToOffset;function positionToOffset(t){var r=t&&t.line;var i=t&&t.column;if(!isNaN(r)&&!isNaN(i)&&r-1 in e){return(e[r-2]||0)+i-1||0}return-1}}function indices(e){var t=[];var r=e.indexOf("\n");while(r!==-1){t.push(r+1);r=e.indexOf("\n",r+1)}t.push(e.length+1);return t}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(526);var u=r(10);e.exports=i("remark-lint:no-inline-padding",noInlinePadding);function noInlinePadding(e,t){n(e,["emphasis","strong","delete","image","link"],visitor);function visitor(e){var r;if(!a(e)){r=u(e);if(r.charAt(0)===" "||r.charAt(r.length-1)===" "){t.message("Don’t pad `"+e.type+"` with inner spaces",e)}}}}},function(e){"use strict";e.exports=toString;function toString(e){return valueOf(e)||e.children&&e.children.map(toString).join("")||""}function valueOf(e){return(e&&e.value?e.value:e.alt?e.alt:e.title)||""}},,function(e){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,r,i){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var n=arguments.length;var a,u;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function afterTickOne(){e.call(null,t)});case 3:return process.nextTick(function afterTickTwo(){e.call(null,t,r)});case 4:return process.nextTick(function afterTickThree(){e.call(null,t,r,i)});default:a=new Array(n-1);u=0;while(u=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}},,function(e,t,r){"use strict";var i=r(431);function homedir(){var e=process.env;var t=e.HOME;var r=e.LOGNAME||e.USER||e.LNAME||e.USERNAME;if(process.platform==="win32"){return e.USERPROFILE||e.HOMEDRIVE+e.HOMEPATH||t||null}if(process.platform==="darwin"){return t||(r?"/Users/"+r:null)}if(process.platform==="linux"){return t||(process.getuid()===0?"/root":r?"/home/"+r:null)}return t||null}e.exports=typeof i.homedir==="function"?i.homedir:homedir},,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(270);var u=r(704);var s=r(839);var o=r(526);e.exports=i("remark-lint:no-heading-content-indent",noHeadingContentIndent);var l=s.start;var f=s.end;function noHeadingContentIndent(e,t){var r=String(t);n(e,"heading",visitor);function visitor(e){var i;var n;var s;var c;var h;var p;var v;var d;var D;var m;if(o(e)){return}i=e.depth;n=e.children;s=a(e,"atx");if(s==="atx"||s==="atx-closed"){h=l(e);d=h.offset;D=r.charAt(d);while(D&&D!=="#"){D=r.charAt(++d)}if(!D){return}d=i+(d-h.offset);c=l(n[0]).column;if(!c){return}v=c-h.column-1-d;if(v){m=(v>0?"Remove":"Add")+" "+Math.abs(v)+" "+u("space",v)+" before this heading’s content";t.message(m,l(n[0]))}}if(s==="atx-closed"){p=f(n[n.length-1]);v=f(e).column-p.column-1-i;if(v){m="Remove "+v+" "+u("space",v)+" after this heading’s content";t.message(m,p)}}}}},function(e,t,r){"use strict";var i=r(336);var n=r(440);var a=r(901);var u=r(360);var s=r(315);e.exports=setOptions;var o={entities:{true:true,false:true,numbers:true,escape:true},bullet:{"*":true,"-":true,"+":true},rule:{"-":true,_:true,"*":true},listItemIndent:{tab:true,mixed:true,1:true},emphasis:{_:true,"*":true},strong:{_:true,"*":true},fence:{"`":true,"~":true}};var l={boolean:validateBoolean,string:validateString,number:validateNumber,function:validateFunction};function setOptions(e){var t=this;var r=t.options;var n;var s;if(e==null){e={}}else if(typeof e==="object"){e=i(e)}else{throw new Error("Invalid value `"+e+"` for setting `options`")}for(s in a){l[typeof a[s]](e,s,r[s],o[s])}n=e.ruleRepetition;if(n&&n<3){raise(n,"options.ruleRepetition")}t.encode=encodeFactory(String(e.entities));t.escape=u(e);t.options=e;return t}function validateBoolean(e,t,r){var i=e[t];if(i==null){i=r}if(typeof i!=="boolean"){raise(i,"options."+t)}e[t]=i}function validateNumber(e,t,r){var i=e[t];if(i==null){i=r}if(isNaN(i)){raise(i,"options."+t)}e[t]=i}function validateString(e,t,r,i){var n=e[t];if(n==null){n=r}n=String(n);if(!(n in i)){raise(n,"options."+t)}e[t]=n}function validateFunction(e,t,r){var i=e[t];if(i==null){i=r}if(typeof i!=="function"){raise(i,"options."+t)}e[t]=i}function encodeFactory(e){var t={};if(e==="false"){return s}if(e==="true"){t.useNamedReferences=true}if(e==="escape"){t.escapeOnly=true;t.useNamedReferences=true}return wrapped;function wrapped(e){return n(e,t)}}function raise(e,t){throw new Error("Invalid value `"+e+"` for setting `"+t+"`")}},,function(e,t){t=e.exports=trim;function trim(e){return e.replace(/^\s*|\s*$/g,"")}t.left=function(e){return e.replace(/^\s*/,"")};t.right=function(e){return e.replace(/\s*$/,"")}},function(e,t,r){"use strict";var i=r(814);e.exports=thematic;var n=" ";function thematic(){var e=this.options;var t=i(e.rule,e.ruleRepetition);return e.ruleSpaces?t.split("").join(n):t}},,,,,function(e,t,r){"use strict";var i=r(315);e.exports=enter;function enter(e,t){var r=e.encode;var n=e.escape;var a=e.enterLink();if(t.referenceType!=="shortcut"&&t.referenceType!=="collapsed"){return a}e.escape=i;e.encode=i;return exit;function exit(){e.encode=r;e.escape=n;a()}}},function(e,t,r){"use strict";var i=r(727);e.exports=new i({include:[r(234)],implicit:[r(633),r(843),r(981),r(702)]})},function(e,t,r){"use strict";var i=r(36);var n=r(814);var a=r(439);var u=r(1);var s=r(235);var o=r(724);e.exports=list;var l="*";var f="_";var c="+";var h="-";var p=".";var v=" ";var d="\n";var D="\t";var m=")";var g="x";var E=4;var A=/\n\n(?!\s*$)/;var C=/^\[([ \t]|x|X)][ \t]/;var y=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/;var w=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/;var x=/^( {1,4}|\t)?/gm;function list(e,t,r){var n=this;var u=n.options.commonmark;var s=n.options.pedantic;var g=n.blockTokenizers;var A=n.interruptList;var C=0;var y=t.length;var w=null;var x=0;var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var j;var R;var U;var N;var J;var z;var X;var G=false;var q;var W;var _;var V;while(C=E){return}S=t.charAt(C);if(S===l||S===c||S===h){B=S;F=false}else{F=true;b="";while(C=E){V=true}if(J&&x>=J.indent){V=true}S=t.charAt(C);T=null;if(!V){if(S===l||S===c||S===h){T=S;C++;x++}else{b="";while(C=J.indent||x>E}P=false;C=O}M=t.slice(O,k);I=O===C?M:t.slice(C,k);if(T===l||T===f||T===h){if(g.thematicBreak.call(n,e,M,true)){break}}L=j;j=!P&&!i(I).length;if(V&&J){J.value=J.value.concat(N,M);U=U.concat(N,M);N=[]}else if(P){if(N.length!==0){G=true;J.value.push("");J.trail=N.concat()}J={value:[M],indent:x,trail:[]};R.push(J);U=U.concat(N,M);N=[]}else if(j){if(L&&!u){break}N.push(M)}else{if(L){break}if(o(A,g,n,[e,M,true])){break}J.value=J.value.concat(N,M);U=U.concat(N,M);N=[]}C=k+1}q=e(U.join(d)).reset({type:"list",ordered:F,start:w,spread:G,children:[]});z=n.enterList();X=n.enterBlock();C=-1;y=R.length;while(++C1){t.message(s,e)}}}},function(e){e.exports=function isBuffer(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}},,,,,,,,function(e){e.exports=require("util")},function(e,t,r){"use strict";var i=r(727);e.exports=i.DEFAULT=new i({include:[r(388)],explicit:[r(875),r(555),r(329)]})},function(e){e.exports=require("fs")},function(e){"use strict";e.exports=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return!/[^0-9a-z\xDF-\xFF]/.test(e.toLowerCase())}},,,,,function(e,t,r){"use strict";var i=r(495);var n=r(7);e.exports=i("remark-lint:no-tabs",noTabs);var a="Use spaces instead of hard-tabs";function noTabs(e,t){var r=String(t);var i=n(t).toPosition;var u=r.indexOf("\t");while(u!==-1){t.message(a,i(u));u=r.indexOf("\t",u+1)}}},function(e){function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");t.code="MODULE_NOT_FOUND";throw t}webpackEmptyContext.keys=function(){return[]};webpackEmptyContext.resolve=webpackEmptyContext;e.exports=webpackEmptyContext;webpackEmptyContext.id=73},function(e,t,r){"use strict";var i=r(864);var n=r(97);var a=r(503);var u=r(123);var s=r(340);var o=r(951);e.exports=unified().freeze();var l=[].slice;var f={}.hasOwnProperty;var c=u().use(pipelineParse).use(pipelineRun).use(pipelineStringify);function pipelineParse(e,t){t.tree=e.parse(t.file)}function pipelineRun(e,t,r){e.run(t.tree,t.file,done);function done(e,i,n){if(e){r(e)}else{t.tree=i;t.file=n;r()}}}function pipelineStringify(e,t){t.file.contents=e.stringify(t.tree,t.file)}function unified(){var e=[];var t=u();var r={};var h=false;var p=-1;processor.data=data;processor.freeze=freeze;processor.attachers=e;processor.use=use;processor.parse=parse;processor.stringify=stringify;processor.run=run;processor.runSync=runSync;processor.process=process;processor.processSync=processSync;return processor;function processor(){var t=unified();var n=e.length;var a=-1;while(++a{if(typeof e!=="string"){throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof e}\``)}if(typeof t!=="string"){throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof t}\``)}try{e=a.realpathSync(e)}catch(t){if(t.code==="ENOENT"){e=i.resolve(e)}else if(r){return null}else{throw t}}const u=i.join(e,"noop.js");const s=()=>n._resolveFilename(t,{id:u,filename:u,paths:n._nodeModulePaths(e)});if(r){try{return s()}catch(e){return null}}return s()};e.exports=((e,t)=>u(e,t));e.exports.silent=((e,t)=>u(e,t,true))},,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:configure");var n=r(928);var a=r(623);var u=r(692);var s=r(876);e.exports=configure;function configure(e,t,r,o){var l=e.configuration;var f=e.processor;if(n(t).fatal){return o()}l.load(t.path,handleConfiguration);function handleConfiguration(e,t){var n;var l;var c;var h;var p;var v;if(e){return o(e)}i("Using settings `%j`",t.settings);f.data("settings",t.settings);n=t.plugins;h=n.length;p=-1;i("Using `%d` plugins",h);while(++p>10)+55296,(e-65536&1023)+56320)}var C=new Array(256);var y=new Array(256);for(var w=0;w<256;w++){C[w]=simpleEscapeSequence(w)?1:0;y[w]=simpleEscapeSequence(w)}function State(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||s;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(e,t){return new n(t,new a(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){if(e.onWarning){e.onWarning.call(null,generateError(e,t))}}var x={YAML:function handleYamlDirective(e,t,r){var i,n,a;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(i===null){throwError(e,"ill-formed argument of the YAML directive")}n=parseInt(i[1],10);a=parseInt(i[2],10);if(n!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=a<2;if(a!==1&&a!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,t,r){var i,n;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}i=r[0];n=r[1];if(!E.test(i)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(o.call(e.tagMap,i)){throwError(e,'there is a previously declared suffix for "'+i+'" tag handle')}if(!A.test(n)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}e.tagMap[i]=n}};function captureSegment(e,t,r,i){var n,a,u,s;if(t1){e.result+=i.repeat("\n",t-1)}}function readPlainScalar(e,t,r){var i,n,a,u,s,o,l,f,c=e.kind,h=e.result,p;p=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(p)||is_FLOW_INDICATOR(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96){return false}if(p===63||p===45){n=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)){return false}}e.kind="scalar";e.result="";a=u=e.position;s=false;while(p!==0){if(p===58){n=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)){break}}else if(p===35){i=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(i)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(p)){break}else if(is_EOL(p)){o=e.line;l=e.lineStart;f=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=t){s=true;p=e.input.charCodeAt(e.position);continue}else{e.position=u;e.line=o;e.lineStart=l;e.lineIndent=f;break}}if(s){captureSegment(e,a,u,false);writeFoldedLines(e,e.line-o);a=u=e.position;s=false}if(!is_WHITE_SPACE(p)){u=e.position+1}p=e.input.charCodeAt(++e.position)}captureSegment(e,a,u,false);if(e.result){return true}e.kind=c;e.result=h;return false}function readSingleQuotedScalar(e,t){var r,i,n;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;i=n=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,i,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){i=e.position;e.position++;n=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,i,n,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));i=n=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;n=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,i,n,a,u,s;s=e.input.charCodeAt(e.position);if(s!==34){return false}e.kind="scalar";e.result="";e.position++;r=i=e.position;while((s=e.input.charCodeAt(e.position))!==0){if(s===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(s===92){captureSegment(e,r,e.position,true);s=e.input.charCodeAt(++e.position);if(is_EOL(s)){skipSeparationSpace(e,false,t)}else if(s<256&&C[s]){e.result+=y[s];e.position++}else if((u=escapedHexLen(s))>0){n=u;a=0;for(;n>0;n--){s=e.input.charCodeAt(++e.position);if((u=fromHexCode(s))>=0){a=(a<<4)+u}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(a);e.position++}else{throwError(e,"unknown escape sequence")}r=i=e.position}else if(is_EOL(s)){captureSegment(e,r,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));r=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r=true,i,n=e.tag,a,u=e.anchor,s,o,f,c,h,p={},v,d,D,m;m=e.input.charCodeAt(e.position);if(m===91){o=93;h=false;a=[]}else if(m===123){o=125;h=true;a={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=a}m=e.input.charCodeAt(++e.position);while(m!==0){skipSeparationSpace(e,true,t);m=e.input.charCodeAt(e.position);if(m===o){e.position++;e.tag=n;e.anchor=u;e.kind=h?"mapping":"sequence";e.result=a;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}d=v=D=null;f=c=false;if(m===63){s=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(s)){f=c=true;e.position++;skipSeparationSpace(e,true,t)}}i=e.line;composeNode(e,t,l,false,true);d=e.tag;v=e.result;skipSeparationSpace(e,true,t);m=e.input.charCodeAt(e.position);if((c||e.line===i)&&m===58){f=true;m=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,t);composeNode(e,t,l,false,true);D=e.result}if(h){storeMappingPair(e,a,p,d,v,D)}else if(f){a.push(storeMappingPair(e,null,p,d,v,D))}else{a.push(v)}skipSeparationSpace(e,true,t);m=e.input.charCodeAt(e.position);if(m===44){r=true;m=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,n,a=p,u=false,s=false,o=t,l=0,f=false,c,h;h=e.input.charCodeAt(e.position);if(h===124){n=false}else if(h===62){n=true}else{return false}e.kind="scalar";e.result="";while(h!==0){h=e.input.charCodeAt(++e.position);if(h===43||h===45){if(p===a){a=h===43?d:v}else{throwError(e,"repeat of a chomping mode identifier")}}else if((c=fromDecimalCode(h))>=0){if(c===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!s){o=t+c-1;s=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(h)){do{h=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(h));if(h===35){do{h=e.input.charCodeAt(++e.position)}while(!is_EOL(h)&&h!==0)}}while(h!==0){readLineBreak(e);e.lineIndent=0;h=e.input.charCodeAt(e.position);while((!s||e.lineIndento){o=e.lineIndent}if(is_EOL(h)){l++;continue}if(e.lineIndentt)&&o!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentt){if(composeNode(e,t,h,true,n)){if(D){v=e.result}else{d=e.result}}if(!D){storeMappingPair(e,l,c,p,v,d,a,u);p=v=d=null}skipSeparationSpace(e,true,-1);g=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&g!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndent tag; it should be "'+g.kind+'", not "'+e.kind+'"')}if(!g.resolve(e.result)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=g.construct(e.result);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else{throwError(e,"unknown tag !<"+e.tag+">")}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||d}function readDocument(e){var t=e.position,r,i,n,a=false,u;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap={};e.anchorMap={};while((u=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);u=e.input.charCodeAt(e.position);if(e.lineIndent>0||u!==37){break}a=true;u=e.input.charCodeAt(++e.position);r=e.position;while(u!==0&&!is_WS_OR_EOL(u)){u=e.input.charCodeAt(++e.position)}i=e.input.slice(r,e.position);n=[];if(i.length<1){throwError(e,"directive name must not be less than one character in length")}while(u!==0){while(is_WHITE_SPACE(u)){u=e.input.charCodeAt(++e.position)}if(u===35){do{u=e.input.charCodeAt(++e.position)}while(u!==0&&!is_EOL(u));break}if(is_EOL(u))break;r=e.position;while(u!==0&&!is_WS_OR_EOL(u)){u=e.input.charCodeAt(++e.position)}n.push(e.input.slice(r,e.position))}if(u!==0)readLineBreak(e);if(o.call(x,i)){x[i](e,i,n)}else{throwWarning(e,'unknown document directive "'+i+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(a){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,h,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&m.test(e.input.slice(t,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position output."+r,""," # Rewrite all applicable files"," $ "+i+" . -o"].join("\n");return{helpMessage:u,cwd:t.cwd,processor:t.processor,help:n.help,version:n.version,files:n._,filePath:n.filePath,watch:n.watch,extensions:f.length===0?t.extensions:f,output:n.output,out:n.stdout,tree:n.tree,treeIn:n.treeIn,treeOut:n.treeOut,inspect:n.inspect,rcName:t.rcName,packageField:t.packageField,rcPath:n.rcPath,detectConfig:n.config,settings:settings(n.setting),ignoreName:t.ignoreName,ignorePath:n.ignorePath,detectIgnore:n.ignore,pluginPrefix:t.pluginPrefix,plugins:plugins(n.use),reporter:c[0],reporterOptions:c[1],color:n.color,silent:n.silent,quiet:n.quiet,frail:n.frail}}function addEach(e){var t=e.default;l.default[e.long]=t===undefined?null:t;if(e.type in l){l[e.type].push(e.long)}if(e.short){l.alias[e.short]=e.long}}function extensions(e){return flatten(normalize(e).map(splitList))}function plugins(e){var t={};normalize(e).map(splitOptions).forEach(function(e){t[e[0]]=e[1]?parseConfig(e[1],{}):null});return t}function reporter(e){var t=normalize(e).map(splitOptions).map(function(e){return[e[0],e[1]?parseConfig(e[1],{}):null]});return t[t.length-1]||[]}function settings(e){var t={};normalize(e).forEach(function(e){parseConfig(e,t)});return t}function parseConfig(e,t){var r;var i;try{e=toCamelCase(parseJSON(e))}catch(t){i=t.message.replace(/at(?= position)/,"around");throw s("Cannot parse `%s` as JSON: %s",e,i)}for(r in e){t[r]=e[r]}return t}function handleUnknownArgument(e){if(e.charAt(0)!=="-"){return}if(e.charAt(1)==="-"){throw s("Unknown option `%s`, expected:\n%s",e,inspectAll(o))}e.slice(1).split("").forEach(each);function each(e){var t=o.length;var r=-1;var i;while(++r=2,has16m:e>=3}}function supportsColor(e){if(u===false){return 0}if(n("color=16m")||n("color=full")||n("color=truecolor")){return 3}if(n("color=256")){return 2}if(e&&!e.isTTY&&u!==true){return 0}const t=u?1:0;if(process.platform==="win32"){const e=i.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in a){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in a)||a.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in a){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0}if(a.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(a.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)){return 1}if("COLORTERM"in a){return 1}if(a.TERM==="dumb"){return t}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},,,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:queue");var n=r(928);e.exports=queue;function queue(e,t,r,a){var u=t.history[0];var s=r.complete;var o=true;if(!s){s={};r.complete=s}i("Queueing `%s`",u);s[u]=a;r.valueOf().forEach(each);if(!o){i("Not flushing: some files cannot be flushed");return}r.complete={};r.pipeline.run(r,done);function each(e){var t=e.history[0];if(n(e).fatal){return}if(typeof s[t]==="function"){i("`%s` can be flushed",t)}else{i("Interupting flush: `%s` is not finished",t);o=false}}function done(e){i("Flushing: all files can be flushed");for(u in s){s[u](e)}}}},function(e,t,r){"use strict";var i=r(171);var n=r(426);e.exports=definition;definition.notInList=true;definition.notInBlock=true;var a='"';var u="'";var s="\\";var o="\n";var l="\t";var f=" ";var c="[";var h="]";var p="(";var v=")";var d=":";var D="<";var m=">";function definition(e,t,r){var i=this;var m=i.options.commonmark;var g=0;var E=t.length;var A="";var C;var y;var w;var x;var b;var F;var S;var B;while(g"];var r=t.concat(["~","|"]);var i=r.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);escapes.default=t;escapes.gfm=r;escapes.commonmark=i;function escapes(e){var n=e||{};if(n.commonmark){return i}return n.gfm?r:t}},,function(e){"use strict";e.exports=locate;function locate(e,t){return e.indexOf("~~",t)}},function(e,t,r){"use strict";var i=r(495);var n=r(7);var a=r(682);var u=r(839);var s=r(526);e.exports=i("remark-lint:checkbox-character-style",checkboxCharacterStyle);var o=u.start;var l=u.end;var f={x:true,X:true};var c={" ":true,"\t":true};var h={true:"checked",false:"unchecked"};function checkboxCharacterStyle(e,t,r){var i=String(t);var u=n(t);r=typeof r==="object"?r:{};if(r.unchecked&&c[r.unchecked]!==true){t.fail("Invalid unchecked checkbox marker `"+r.unchecked+"`: use either `'\\t'`, or `' '`")}if(r.checked&&f[r.checked]!==true){t.fail("Invalid checked checkbox marker `"+r.checked+"`: use either `'x'`, or `'X'`")}a(e,"listItem",visitor);function visitor(e){var n;var a;var f;var c;var p;var v;var d;if(typeof e.checked!=="boolean"||s(e)){return}n=h[e.checked];a=o(e).offset;f=(e.children.length===0?l(e):o(e.children[0])).offset;c=i.slice(a,f).trimRight().slice(0,-1);v=c.charAt(c.length-1);p=r[n];if(p){if(v!==p){d=n.charAt(0).toUpperCase()+n.slice(1)+" checkboxes should use `"+p+"` as a marker";t.message(d,{start:u.toPosition(a+c.length-1),end:u.toPosition(a+c.length)})}}else{r[n]=v}}}},,,,function(e){"use strict";e.exports=wordCharacter;var t=String.fromCharCode;var r=/\w/;function wordCharacter(e){return r.test(typeof e==="number"?t(e):e.charAt(0))}},,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(526);e.exports=i("remark-lint:no-shortcut-reference-image",noShortcutReferenceImage);var u="Use the trailing [] on reference images";function noShortcutReferenceImage(e,t){n(e,"imageReference",visitor);function visitor(e){if(!a(e)&&e.referenceType==="shortcut"){t.message(u,e)}}}},,function(e,t,r){"use strict";var i=r(335);e.exports=trough;trough.wrap=i;var n=[].slice;function trough(){var e=[];var t={};t.run=run;t.use=use;return t;function run(){var t=-1;var r=n.call(arguments,0,-1);var a=arguments[arguments.length-1];if(typeof a!=="function"){throw new Error("Expected function as last argument, not "+a)}next.apply(null,[null].concat(r));function next(u){var s=e[++t];var o=n.call(arguments,0);var l=o.slice(1);var f=r.length;var c=-1;if(u){a(u);return}while(++c"){break}if(v!==" "&&v!=="\t"){t.message(o,d);break}}}}}},,function(e,t,r){e.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var i=r(66);var n=i.realpath;var a=i.realpathSync;var u=process.version;var s=/^v[0-5]\./.test(u);var o=r(544);function newError(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function realpath(e,t,r){if(s){return n(e,t,r)}if(typeof t==="function"){r=t;t=null}n(e,t,function(i,n){if(newError(i)){o.realpath(e,t,r)}else{r(i,n)}})}function realpathSync(e,t){if(s){return a(e,t)}try{return a(e,t)}catch(r){if(newError(r)){return o.realpathSync(e,t)}else{throw r}}}function monkeypatch(){i.realpath=realpath;i.realpathSync=realpathSync}function unmonkeypatch(){i.realpath=n;i.realpathSync=a}},,,,,,function(e){"use strict";var t={}.hasOwnProperty;e.exports=stringify;function stringify(e){if(!e||typeof e!=="object"){return""}if(t.call(e,"position")||t.call(e,"type")){return position(e.position)}if(t.call(e,"start")||t.call(e,"end")){return position(e)}if(t.call(e,"line")||t.call(e,"column")){return point(e)}return""}function point(e){if(!e||typeof e!=="object"){e={}}return index(e.line)+":"+index(e.column)}function position(e){if(!e||typeof e!=="object"){e={}}return point(e.start)+"-"+point(e.end)}function index(e){return e&&typeof e==="number"?e:1}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:fenced-code-flag",fencedCodeFlag);var s=a.start;var o=a.end;var l=/^ {0,3}([~`])\1{2,}/;var f="Invalid code-language flag";var c="Missing code-language flag";function fencedCodeFlag(e,t,r){var i=String(t);var a=false;var h=[];if(typeof r==="object"&&!("length"in r)){a=Boolean(r.allowEmpty);r=r.flags}if(typeof r==="object"&&"length"in r){h=String(r).split(",")}n(e,"code",visitor);function visitor(e){var r;if(!u(e)){if(e.lang){if(h.length!==0&&h.indexOf(e.lang)===-1){t.message(f,e)}}else{r=i.slice(s(e).offset,o(e).offset);if(!a&&l.test(r)){t.message(c,e)}}}}}},function(e){"use strict";e.exports=alphabetical;function alphabetical(e){var t=typeof e==="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},function(e){"use strict";e.exports=locate;var t=["https://","http://","mailto:"];function locate(e,r){var i=t.length;var n=-1;var a=-1;var u;if(!this.options.gfm){return-1}while(++na){i[n-a]=e[n]}return i}},,,,,,,,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.hasOwnProperty;var a=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var t=[],r,i,u,s,o,l=e;for(r=0,i=l.length;r-1){a.splice(u,1)}var s=r;a.forEach(function _buildSubObj(e,r){if(!e||typeof s!=="object")return;if(r===a.length-1)s[e]=t[n];if(s[e]===undefined)s[e]={};s=s[e]})}}return r};var c=t.find=function(){var e=a.join.apply(null,[].slice.call(arguments));function find(e,t){var r=a.join(e,t);try{i.statSync(r);return r}catch(r){if(a.dirname(e)!==e)return find(a.dirname(e),t)}}return find(process.cwd(),e)}},,,,function(e,t,r){"use strict";const i=r(202);const n=r(751);const a=i("JSONError",{fileName:i.append("in %s")});e.exports=((e,t,r)=>{if(typeof t==="string"){r=t;t=null}try{try{return JSON.parse(e,t)}catch(r){n(e,t);throw r}}catch(e){e.message=e.message.replace(/\n/g,"");const t=new a(e);if(r){t.fileName=r}throw t}})},function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:maximum-line-length",maximumLineLength);var s=a.start;var o=a.end;function maximumLineLength(e,t,r){var i=typeof r==="number"&&!isNaN(r)?r:80;var a=String(t);var l=a.split(/\r?\n/);var f=l.length;var c=-1;var h;n(e,["heading","table","code","definition","html","jsx"],ignore);n(e,["link","image","inlineCode"],inline);while(++ci){t.message("Line must be at most "+i+" characters",{line:c+1,column:h+1})}}function inline(e,t,r){var n=r.children[t+1];var a;var l;if(u(e)){return}a=s(e);l=o(e);if(a.column>i||l.column0?"Add":"Remove")+" "+Math.abs(i)+" "+n("space",i)+" between blockquote and content";t.message(a,u.start(e.children[0]))}}else{r=check(e)}}}function check(e){var t=e.children[0];var r=u.start(t).column-u.start(e).column;var i=o(t).match(/^ +/);if(i){r+=i[0].length}return r}},,,,,function(e){"use strict";e.exports=whitespace;var t=String.fromCharCode;var r=/\s/;function whitespace(e){return r.test(typeof e==="number"?t(e):e.charAt(0))}},,,function(e,t,r){"use strict";var i=r(814);var n="\n";var a=" ";var u=":";var s="[";var o="]";var l="^";var f=4;var c=n+n;var h=i(a,f);e.exports=footnoteDefinition;function footnoteDefinition(e){var t=this.all(e).join(c+h);return s+l+(e.label||e.identifier)+o+u+a+t}},function(e){"use strict";e.exports=collapse;function collapse(e){return String(e).replace(/\s+/g," ")}},function(e){"use strict";e.exports=label;var t="[";var r="]";var i="shortcut";var n="collapsed";function label(e){var a=e.referenceType;if(a===i){return""}return t+(a===n?"":e.label||e.identifier)+r}},,,,,function(e,t,r){"use strict";var i=r(814);var n=r(705);e.exports=listItem;var a="\n";var u=" ";var s="[";var o="]";var l="x";var f=Math.ceil;var c=a+a;var h=4;function listItem(e,t,r,p){var v=this;var d=v.options.listItemIndent;var D=p||v.options.bullet;var m=e.spread==null?true:e.spread;var g=e.checked;var E=e.children;var A=E.length;var C=[];var y=-1;var w;var x;var b;while(++y",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"}},,,,,function(e,t,r){"use strict";var i=r(64);var n=r(753);var a=function errorEx(e,t){if(!e||e.constructor!==String){t=e||{};e=Error.name}var r=function ErrorEXError(i){if(!this){return new ErrorEXError(i)}i=i instanceof Error?i.message:i||this.message;Error.call(this,i);Error.captureStackTrace(this,r);this.name=e;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var e=i.split(/\r?\n/g);for(var r in t){if(!t.hasOwnProperty(r)){continue}var a=t[r];if("message"in a){e=a.message(this[r],e)||e;if(!n(e)){e=[e]}}}return e.join("\n")},set:function(e){i=e}});var a=null;var u=Object.getOwnPropertyDescriptor(this,"stack");var s=u.get;var o=u.value;delete u.value;delete u.writable;u.set=function(e){a=e};u.get=function(){var e=(a||(s?s.call(this):o)).split(/\r?\n+/g);if(!a){e[0]=this.name+": "+this.message}var r=1;for(var i in t){if(!t.hasOwnProperty(i)){continue}var n=t[i];if("line"in n){var u=n.line(this[i]);if(u){e.splice(r++,0," "+u)}}if("stack"in n){n.stack(this[i],e)}}return e.join("\n")};Object.defineProperty(this,"stack",u)};if(Object.setPrototypeOf){Object.setPrototypeOf(r.prototype,Error.prototype);Object.setPrototypeOf(r,Error)}else{i.inherits(r,Error)}return r};a.append=function(e,t){return{message:function(r,i){r=r||t;if(r){i[0]+=" "+e.replace("%s",r.toString())}return i}}};a.line=function(e,t){return{line:function(r){r=r||t;if(r){return e.replace("%s",r.toString())}return null}}};e.exports=a},,,,,function(e,t,r){"use strict";var i=r(211);e.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},,,function(e,t,r){"use strict";var i=r(589);function replaceExt(e,t){if(typeof e!=="string"){return e}if(e.length===0){return e}var r=i.basename(e,i.extname(e))+t;return i.join(i.dirname(e),r)}e.exports=replaceExt},function(e,t,r){"use strict";var i=r(833);var n=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var a=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};if(e!==null){Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})})}return t}function Type(e,t){t=t||{};Object.keys(t).forEach(function(t){if(n.indexOf(t)===-1){throw new i('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}});this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.defaultStyle=t["defaultStyle"]||null;this.styleAliases=compileStyleAliases(t["styleAliases"]||null);if(a.indexOf(this.kind)===-1){throw new i('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}e.exports=Type},function(e,t,r){"use strict";var i=r(876);var n=true;try{n="inspect"in r(64)}catch(e){n=false}e.exports=n?inspect:noColor;inspect.color=inspect;noColor.color=inspect;inspect.noColor=noColor;noColor.noColor=noColor;var a=ansiColor(2,22);var u=ansiColor(33,39);var s=ansiColor(32,39);var o=new RegExp("(?:"+"(?:\\u001b\\[)|"+"\\u009b"+")"+"(?:"+"(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m]"+")|"+"\\u001b[A-M]","g");var l=["type","value","children","position"];function noColor(e,t){return stripColor(inspect(e,t))}function inspect(e,t){var r;var i;var n;var a;if(e&&Boolean(e.length)&&typeof e!=="string"){a=e.length;n=-1;r=[];while(++n|$))/i;var l=/<\/(script|pre|style)>/i;var f=/^/;var h=/^<\?/;var p=/\?>/;var v=/^/;var D=/^/;var g=/^$/;var E=new RegExp(i.source+"\\s*$");function blockHtml(e,t,r){var i=this;var A=i.options.blocks.join("|");var C=new RegExp("^|$))","i");var y=t.length;var w=0;var x;var b;var F;var S;var B;var k;var O;var P=[[o,l,true],[f,c,true],[h,p,true],[v,d,true],[D,m,true],[C,g,true],[E,g,false]];while(w0&&v.indenta){return}if(!m||!l&&u.charAt(c+1)===n){return}f=u.length+1;D="";while(++c0){const t=peek();if(!i.isHexDigit(t)){throw invalidChar(read())}e+=read()}return String.fromCodePoint(parseInt(e,16))}const E={start(){if(f.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(f.type){case"identifier":case"string":c=f.value;a="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(f.type==="eof"){throw invalidEOF()}a="beforePropertyValue"},beforePropertyValue(){if(f.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(f.type==="eof"){throw invalidEOF()}if(f.type==="punctuator"&&f.value==="]"){pop();return}push()},afterPropertyValue(){if(f.type==="eof"){throw invalidEOF()}switch(f.value){case",":a="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(f.type==="eof"){throw invalidEOF()}switch(f.value){case",":a="beforeArrayValue";return;case"]":pop()}},end(){}};function push(){let e;switch(f.type){case"punctuator":switch(f.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=f.value;break}if(h===undefined){h=e}else{const t=u[u.length-1];if(Array.isArray(t)){t.push(e)}else{t[c]=e}}if(e!==null&&typeof e==="object"){u.push(e);if(Array.isArray(e)){a="beforeArrayValue"}else{a="beforePropertyName"}}else{const e=u[u.length-1];if(e==null){a="end"}else if(Array.isArray(e)){a="afterArrayValue"}else{a="afterPropertyValue"}}}function pop(){u.pop();const e=u[u.length-1];if(e==null){a="end"}else if(Array.isArray(e)){a="afterArrayValue"}else{a="afterPropertyValue"}}function invalidChar(e){if(e===undefined){return syntaxError(`JSON5: invalid end of input at ${o}:${l}`)}return syntaxError(`JSON5: invalid character '${formatChar(e)}' at ${o}:${l}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${o}:${l}`)}function invalidIdentifier(){l-=5;return syntaxError(`JSON5: invalid identifier character at ${o}:${l}`)}function separatorChar(e){console.warn(`JSON5: '${formatChar(e)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e]){return t[e]}if(e<" "){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function syntaxError(e){const t=new SyntaxError(e);t.lineNumber=o;t.columnNumber=l;return t}},,function(e,t,r){"use strict";var i=r(66);var n=r(589);var a=r(345);var u=r(347)("unified-engine:find-up");var s=r(692);e.exports=FindUp;var o=i.readFile;var l=n.resolve;var f=n.relative;var c=n.join;var h=n.dirname;FindUp.prototype.load=load;function FindUp(e){var t=this;var r=e.filePath;t.cache={};t.cwd=e.cwd;t.detect=e.detect;t.names=e.names;t.create=e.create;if(r){t.givenFilePath=l(e.cwd,r)}}function load(e,t){var r=this;var i=r.cache;var n=r.givenFilePath;var p=r.givenFile;var v=r.names;var d=r.create;var D=r.cwd;var m;if(n){if(p){apply(t,p)}else{p=[t];r.givenFile=p;u("Checking given file `%s`",n);o(n,loadGiven)}return}if(!r.detect){return t()}e=l(D,e);m=h(e);if(m in i){apply(t,i[m])}else{i[m]=[t];find(m)}function loadGiven(e,t){var i=r.givenFile;var s;if(e){s=a("Cannot read given file `%s`\n%s",f(D,n),e.stack);s.code="ENOENT";s.path=e.path;s.syscall=e.syscall}else{try{s=d(t,n);u("Read given file `%s`",n)}catch(e){s=a("Cannot parse given file `%s`\n%s",f(D,n),e.stack);u(e.message)}}p=s;r.givenFile=s;applyAll(i,s)}function find(t){var r=-1;var n=v.length;next();function next(){var a;if(++r{if(e)console.error(e);process.exit(t)})},,,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:code-block-style",codeBlockStyle);var s=a.start;var o=a.end;var l={null:true,fenced:true,indented:true};function codeBlockStyle(e,t,r){var i=String(t);r=typeof r==="string"&&r!=="consistent"?r:null;if(l[r]!==true){t.fail("Invalid code block style `"+r+"`: use either `'consistent'`, `'fenced'`, or `'indented'`")}n(e,"code",visitor);function visitor(e){var i=check(e);if(i){if(!r){r=i}else if(r!==i){t.message("Code blocks should be "+r,e)}}}function check(e){var t=s(e).offset;var r=o(e).offset;if(u(e)){return null}return e.lang||/^\s*([~`])\1{2,}/.test(i.slice(t,r))?"fenced":"indented"}}},,,function(e,t,r){"use strict";var i=r(589);var n=r(77);var a=r(289);e.exports=Ignore;Ignore.prototype.check=check;var u=i.dirname;var s=i.relative;var o=i.resolve;function Ignore(e){this.cwd=e.cwd;this.findUp=new a({filePath:e.ignorePath,cwd:e.cwd,detect:e.detectIgnore,names:e.ignoreName?[e.ignoreName]:[],create:create})}function check(e,t){var r=this;r.findUp.load(e,done);function done(i,n){var a;if(i){t(i)}else if(n){a=s(n.filePath,o(r.cwd,e));t(null,a?n.ignores(a):false)}else{t(null,false)}}}function create(e,t){var r=n().add(String(e));r.filePath=u(t);return r}},,,,function(e){e.exports={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"}},,,,function(e,t,r){"use strict";var i=r(54);e.exports=enclose;var n="(";var a=")";var u="<";var s=">";var o=/\s/;function enclose(e,t){if(t||e.length===0||o.test(e)||i(e,n)!==i(e,a)){return u+e+s}return e}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:table-pipes",tablePipes);var s=a.start;var o=a.end;var l="Missing initial pipe in table fence";var f="Missing final pipe in table fence";function tablePipes(e,t){var r=String(t);n(e,"table",visitor);function visitor(e){var i=e.children;var n=i.length;var a=-1;var c;var h;var p;var v;var d;var D;while(++a0?parseInt(t):null};for(;i1)return true;for(var a=0;athis.maxLength)return t();if(!this.stat&&m(this.cache,r)){var a=this.cache[r];if(Array.isArray(a))a="DIR";if(!n||a==="DIR")return t(null,a);if(n&&a==="FILE")return t()}var u;var s=this.statCache[r];if(s!==undefined){if(s===false)return t(null,s);else{var o=s.isDirectory()?"DIR":"FILE";if(n&&o==="FILE")return t();else return t(null,o,s)}}var l=this;var f=g("stat\0"+r,lstatcb_);if(f)i.lstat(r,f);function lstatcb_(n,a){if(a&&a.isSymbolicLink()){return i.stat(r,function(i,n){if(i)l._stat2(e,r,null,a,t);else l._stat2(e,r,i,n,t)})}else{l._stat2(e,r,n,a,t)}}};Glob.prototype._stat2=function(e,t,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return n()}var a=e.slice(-1)==="/";this.statCache[t]=i;if(t.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,false,i);var u=true;if(i)u=i.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||u;if(a&&u==="FILE")return n();return n(null,u,i)}},function(e,t,r){"use strict";var i=r(36);var n=r(439);var a=r(934);var u=r(724);e.exports=paragraph;var s="\t";var o="\n";var l=" ";var f=4;function paragraph(e,t,r){var c=this;var h=c.options;var p=h.commonmark;var v=h.gfm;var d=c.blockTokenizers;var D=c.interruptParagraph;var m=t.indexOf(o);var g=t.length;var E;var A;var C;var y;var w;while(m=f&&C!==o){m=t.indexOf(o,m+1);continue}}A=t.slice(m+1);if(u(D,d,c,[e,A,true])){break}if(d.list.call(c,e,A,true)&&(c.inList||p||v&&!n(i.left(A).charAt(0)))){break}E=m;m=t.indexOf(o,m+1);if(m!==-1&&i(t.slice(E,m))===""){m=E;break}}A=t.slice(0,m);if(i(A)===""){e(A);return null}if(r){return true}w=e.now();A=a(A);return e(A)({type:"paragraph",children:c.tokenizeInline(A,w)})}},function(e,t,r){"use strict";var i;var n;try{var a=i;n=r(644)}catch(e){if(typeof window!=="undefined")n=window.esprima}var u=r(211);function resolveJavascriptFunction(e){if(e===null)return false;try{var t="("+e+")",r=n.parse(t,{range:true});if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(e){return false}}function constructJavascriptFunction(e){var t="("+e+")",r=n.parse(t,{range:true}),i=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}r.body[0].expression.params.forEach(function(e){i.push(e.name)});a=r.body[0].expression.body.range;if(r.body[0].expression.body.type==="BlockStatement"){return new Function(i,t.slice(a[0]+1,a[1]-1))}return new Function(i,"return "+t.slice(a[0],a[1]))}function representJavascriptFunction(e){return e.toString()}function isFunction(e){return Object.prototype.toString.call(e)==="[object Function]"}e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},,,function(e,t,r){"use strict";var i=r(171);var n=r(984);var a=r(426);e.exports=reference;reference.locator=n;var u="link";var s="image";var o="footnote";var l="shortcut";var f="collapsed";var c="full";var h=" ";var p="!";var v="[";var d="\\";var D="]";var m="^";function reference(e,t,r){var n=this;var g=n.options.commonmark;var E=t.charAt(0);var A=0;var C=t.length;var y="";var w="";var x=u;var b=l;var F;var S;var B;var k;var O;var P;var T;var I;if(E===p){x=s;w=E;E=t.charAt(++A)}if(E!==v){return}A++;w+=E;P="";if(n.options.footnotes&&t.charAt(A)===m){if(x===s){return}w+=m;A++;x=o}I=0;while(A "+h.destination:""}if(!h.stats.total){p+=p?": ":"";if(h.stored){p+=m.yellow.open+"written"+m.yellow.close}else{p+="no issues found"}}if(p){l.push(p)}}else{g=m[h.label==="error"?"red":"yellow"];E=h.reason;A="";C=E.indexOf("\n");if(C!==-1){A=E.slice(C);E=E.slice(0,C)}l.push(["",padLeft(h.location,e.location),padRight(g.open+h.label+g.close,e.label),padRight(E,e.reason),padRight(h.ruleId,e.ruleId),h.source||""].join(" ").replace(c,"")+A)}}if(a.fatal||a.warn){p=[];if(a.fatal){p.push([m.red.open+f.error+m.red.close,a.fatal,plural(D.true,a.fatal)].join(" "))}if(a.warn){p.push([m.yellow.open+f.warning+m.yellow.close,a.warn,plural(D.false,a.warn)].join(" "))}p=p.join(", ");if(a.total!==a.fatal&&a.total!==a.warn){p=a.total+" messages ("+p+")"}l.push("",p)}return l.join("\n")}function applicable(e,t){var r=e.messages;var i=r.length;var n=-1;var a=[];if(t.silent){while(++n64)continue;if(t<0)return false;i+=6}return i%8===0}function constructYamlBinary(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,u=s,o=0,l=[];for(t=0;t>16&255);l.push(o>>8&255);l.push(o&255)}o=o<<6|u.indexOf(i.charAt(t))}r=a%4*6;if(r===0){l.push(o>>16&255);l.push(o>>8&255);l.push(o&255)}else if(r===18){l.push(o>>10&255);l.push(o>>2&255)}else if(r===12){l.push(o>>4&255)}if(n){return n.from?n.from(l):new n(l)}return l}function representYamlBinary(e){var t="",r=0,i,n,a=e.length,u=s;for(i=0;i>18&63];t+=u[r>>12&63];t+=u[r>>6&63];t+=u[r&63]}r=(r<<8)+e[i]}n=a%3;if(n===0){t+=u[r>>18&63];t+=u[r>>12&63];t+=u[r>>6&63];t+=u[r&63]}else if(n===2){t+=u[r>>10&63];t+=u[r>>4&63];t+=u[r<<2&63];t+=u[64]}else if(n===1){t+=u[r>>2&63];t+=u[r<<4&63];t+=u[64];t+=u[64]}return t}function isBinary(e){return n&&n.isBuffer(e)}e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},function(e){"use strict";var t=[].slice;e.exports=wrap;function wrap(e,r){var i;return wrapped;function wrapped(){var r=t.call(arguments,0);var n=e.length>r.length;var a;if(n){r.push(done)}try{a=e.apply(null,r)}catch(e){if(n&&i){throw e}return done(e)}if(!n){if(a&&typeof a.then==="function"){a.then(then,done)}else if(a instanceof Error){done(a)}else{then(a)}}}function done(){if(!i){i=true;r.apply(null,arguments)}}function then(e){done(null,e)}}},function(e){e.exports=extend;var t=Object.prototype.hasOwnProperty;function extend(){var e={};for(var r=0;ri){t.message("Move definitions to the end of the file (after the node at line `"+r+"`)",e)}}else if(r===null){r=i}}}},function(e){var t=Object.prototype.toString;e.exports=isString;function isString(e){return t.call(e)==="[object String]"}},function(e,t,r){"use strict";var i=r(874);e.exports=configure;function configure(e,t){e.configuration=new i(t)}},,,,function(e,t,r){"use strict";var i=r(323);var n=create(Error);e.exports=n;n.eval=create(EvalError);n.range=create(RangeError);n.reference=create(ReferenceError);n.syntax=create(SyntaxError);n.type=create(TypeError);n.uri=create(URIError);n.create=create;function create(e){FormattedError.displayName=e.displayName||e.name;return FormattedError;function FormattedError(t){if(t){t=i.apply(null,arguments)}return new e(t)}}},,function(e,t,r){"use strict";if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(470)}else{e.exports=r(970)}},function(e,t,r){var i=r(20);var n=r(491);e.exports=expandTop;var a="\0SLASH"+Math.random()+"\0";var u="\0OPEN"+Math.random()+"\0";var s="\0CLOSE"+Math.random()+"\0";var o="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(a).split("\\{").join(u).split("\\}").join(s).split("\\,").join(o).split("\\.").join(l)}function unescapeBraces(e){return e.split(a).join("\\").split(u).join("{").split(s).join("}").split(o).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=n("{","}",e);if(!r)return e.split(",");var i=r.pre;var a=r.body;var u=r.post;var s=i.split(",");s[s.length-1]+="{"+a+"}";var o=parseCommaParts(u);if(u.length){s[s.length-1]+=o.shift();s.push.apply(s,o)}t.push.apply(t,s);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var a=n("{","}",e);if(!a||/\$$/.test(a.pre))return[e];var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body);var o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body);var l=u||o;var f=a.body.indexOf(",")>=0;if(!l&&!f){if(a.post.match(/,.*\}/)){e=a.pre+"{"+a.body+s+a.post;return expand(e)}return[e]}var c;if(l){c=a.body.split(/\.\./)}else{c=parseCommaParts(a.body);if(c.length===1){c=expand(c[0],false).map(embrace);if(c.length===1){var h=a.post.length?expand(a.post,false):[""];return h.map(function(e){return a.pre+c[0]+e})}}}var p=a.pre;var h=a.post.length?expand(a.post,false):[""];var v;if(l){var d=numeric(c[0]);var D=numeric(c[1]);var m=Math.max(c[0].length,c[1].length);var g=c.length==3?Math.abs(numeric(c[2])):1;var E=lte;var A=D0){var b=new Array(x+1).join("0");if(y<0)w="-"+b+w.slice(1);else w=b+w}}}v.push(w)}}else{v=i(c,function(e){return expand(e,false)})}for(var F=0;F>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var i=t.length-1;if(i=0){if(n>0)e.lastNeed=n-1;return n}if(--i=0){if(n>0)e.lastNeed=n-2;return n}if(--i=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,i);return e.toString("utf8",t,i)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},,,,function(e,t,r){"use strict";var i=r(186);e.exports=VMessage;function VMessagePrototype(){}VMessagePrototype.prototype=Error.prototype;VMessage.prototype=new VMessagePrototype;var n=VMessage.prototype;n.file="";n.name="";n.reason="";n.message="";n.stack="";n.fatal=null;n.column=null;n.line=null;function VMessage(e,t,r){var n;var a;var u;if(typeof t==="string"){r=t;t=null}n=parseOrigin(r);a=i(t)||"1:1";u={start:{line:null,column:null},end:{line:null,column:null}};if(t&&t.position){t=t.position}if(t){if(t.start){u=t;t=t.start}else{u.start=t}}if(e.stack){this.stack=e.stack;e=e.message}this.message=e;this.name=a;this.reason=e;this.line=t?t.line:null;this.column=t?t.column:null;this.location=u;this.source=n[0];this.ruleId=n[1]}function parseOrigin(e){var t=[null,null];var r;if(typeof e==="string"){r=e.indexOf(":");if(r===-1){t[1]=e}else{t[0]=e.slice(0,r);t[1]=e.slice(r+1)}}return t}},,function(e,t,r){"use strict";var i=r(171);var n=r(902);var a=r(49);e.exports=autoLink;autoLink.locator=a;autoLink.notInLink=true;var u="<";var s=">";var o="@";var l="/";var f="mailto:";var c=f.length;function autoLink(e,t,r){var a=this;var h="";var p=t.length;var v=0;var d="";var D=false;var m="";var g;var E;var A;var C;var y;if(t.charAt(0)!==u){return}v++;h=u;while(v0||H===x&&I.inLink||M&&H===B&&t.charAt(W+1)===B||M&&H===S&&(I.inTable||alignment(t,W))||H===b&&W>0&&W=e.expected){e.emit("done")}}},,function(e,t,r){"use strict";var i=r(897);var n=r(336);var a=r(860);e.exports=parse;parse.Parser=a;function parse(e){var t=this.data("settings");var r=i(a);r.prototype.options=n(r.prototype.options,t,e);this.Parser=r}},,,,,,function(e,t,r){"use strict";var i=r(176);e.exports=imageReference;var n="[";var a="]";var u="!";function imageReference(e){return u+n+(this.encode(e.alt,e)||"")+a+i(e)}},,,,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:no-file-name-consecutive-dashes",noFileNameConsecutiveDashes);var n="Do not use consecutive dashes in a file name";function noFileNameConsecutiveDashes(e,t){if(t.stem&&/-{2,}/.test(t.stem)){t.message(n)}}},,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:fenced-code-marker",fencedCodeMarker);var s={"`":true,"~":true,null:true};function fencedCodeMarker(e,t,r){var i=String(t);r=typeof r==="string"&&r!=="consistent"?r:null;if(s[r]!==true){t.fail("Invalid fenced code marker `"+r+"`: use either `'consistent'`, `` '`' ``, or `'~'`")}n(e,"code",visitor);function visitor(e){var n;if(!u(e)){n=i.substr(a.start(e).offset,4).trimLeft().charAt(0);if(s[n]===true){if(r){if(n!==r){t.message("Fenced code should use "+r+" as a marker",e)}}else{r=n}}}}}},,function(e,t,r){"use strict";var i=r(727);e.exports=new i({include:[r(95)],implicit:[r(788),r(900)],explicit:[r(334),r(157),r(697),r(713)]})},,,function(e){"use strict";e.exports=thematicBreak;var t="\t";var r="\n";var i=" ";var n="*";var a="-";var u="_";var s=3;function thematicBreak(e,o,l){var f=-1;var c=o.length+1;var h="";var p;var v;var d;var D;while(++f=s&&(!p||p===r)){h+=D;if(l){return true}return e(h)({type:"thematicBreak"})}else{return}}}},,function(e){e.exports=require("assert")},,,,,,,function(e,t,r){"use strict";var i=r(774);var n=r(176);e.exports=linkReference;var a="[";var u="]";var s="shortcut";var o="collapsed";function linkReference(e){var t=this;var r=e.referenceType;var l=t.enterLinkReference(t,e);var f=t.all(e).join("");l();if(r===s||r===o){f=i(f,e.label||e.identifier)}return a+f+u+n(e)}},function(e){"use strict";e.exports=lineBreak;var t="\\";var r="\n";var i=" ";var n=t+r;var a=i+i+r;function lineBreak(){return this.options.commonmark?n:a}},function(e,t,r){"use strict";function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var i=r(945).Buffer;var n=r(64);function copyBuffer(e,t,r){e.copy(t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r};BufferList.prototype.concat=function concat(e){if(this.length===0)return i.alloc(0);if(this.length===1)return this.head.data;var t=i.allocUnsafe(e>>>0);var r=this.head;var n=0;while(r){copyBuffer(r.data,t,n);n+=r.data.length;r=r.next}return t};return BufferList}();if(n&&n.inspect&&n.inspect.custom){e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e}}},function(e,t,r){"use strict";var i=r(336);var n=r(109);var a=r(694);e.exports=setOptions;function setOptions(e){var t=this;var r=t.options;var u;var s;if(e==null){e={}}else if(typeof e==="object"){e=i(e)}else{throw new Error("Invalid value `"+e+"` for setting `options`")}for(u in a){s=e[u];if(s==null){s=r[u]}if(u!=="blocks"&&typeof s!=="boolean"||u==="blocks"&&typeof s!=="object"){throw new Error("Invalid value `"+s+"` for setting `options."+u+"`")}e[u]=s}t.options=e;t.escape=n(e);return t}},,function(e){var t=Array.prototype.slice;e.exports=co;function co(e){var r=isGeneratorFunction(e);return function(i){var n=this;var a=e;if(r){var u=t.call(arguments),s=u.length;var o=s&&"function"==typeof u[s-1];i=o?u.pop():error;a=e.apply(this,u)}else{i=i||error}next();function exit(e,t){setImmediate(function(){i.call(n,e,t)})}function next(e,r){var i;if(arguments.length>2)r=t.call(arguments,1);if(e){try{i=a.throw(e)}catch(e){return exit(e)}}if(!e){try{i=a.next(r)}catch(e){return exit(e)}}if(i.done)return exit(null,i.value);i.value=toThunk(i.value,n);if("function"==typeof i.value){var u=false;try{i.value.call(n,function(){if(u)return;u=true;next.apply(n,arguments)})}catch(e){setImmediate(function(){if(u)return;u=true;next(e)})}return}next(new TypeError("You may only yield a function, promise, generator, array, or object, "+'but the following was passed: "'+String(i.value)+'"'))}}}function toThunk(e,t){if(isGeneratorFunction(e)){return co(e.call(t))}if(isGenerator(e)){return co(e)}if(isPromise(e)){return promiseToThunk(e)}if("function"==typeof e){return e}if(isObject(e)||Array.isArray(e)){return objectToThunk.call(t,e)}return e}function objectToThunk(e){var t=this;var r=Array.isArray(e);return function(i){var n=Object.keys(e);var a=n.length;var u=r?new Array(a):new e.constructor;var s;if(!a){setImmediate(function(){i(null,u)});return}if(!r){for(var o=0;or){t.splice(0,r);process.nextTick(function(){RES.apply(null,i)})}else{delete n[e]}}})}function slice(e){var t=e.length;var r=[];for(var i=0;ii){o+=" with 1 space, not "+u;if(size(a)=48&&t<=57}},function(e,t,r){"use strict";var i=r(308);var n=r(197);var a=r(25);var u=r(908);var s=r(617);e.exports=encode;encode.escape=escape;var o={}.hasOwnProperty;var l=['"',"'","<",">","&","`"];var f=construct();var c=toExpression(l);var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var p=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;function encode(e,t){var r=t||{};var i=r.subset;var n=i?toExpression(i):c;var a=r.escapeOnly;var u=r.omitOptionalSemicolons;e=e.replace(n,function(e,t,i){return one(e,i.charAt(t+1),r)});if(i||a){return e}return e.replace(h,replaceSurrogatePair).replace(p,replaceBmp);function replaceSurrogatePair(e,t,r){return toHexReference((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charAt(t+2),u)}function replaceBmp(e,t,i){return one(e,i.charAt(t+1),r)}}function escape(e){return encode(e,{escapeOnly:true,useNamedReferences:true})}function one(e,t,r){var i=r.useShortestReferences;var n=r.omitOptionalSemicolons;var a;var u;if((i||r.useNamedReferences)&&o.call(f,e)){a=toNamed(f[e],t,n,r.attribute)}if(i||!a){u=toHexReference(e.charCodeAt(0),t,n)}if(a&&(!i||a.length/i;function inlineHTML(e,t,r){var n=this;var h=t.length;var p;var v;if(t.charAt(0)!==u||h<3){return}p=t.charAt(1);if(!i(p)&&p!==s&&p!==o&&p!==l){return}v=t.match(a);if(!v){return}if(r){return true}v=v[0];if(!n.inLink&&f.test(v)){n.inLink=true}else if(n.inLink&&c.test(v)){n.inLink=false}return e(v)({type:"html",value:v})}},function(e){e.exports=["md","markdown","mdown","mkdn","mkd","mdwn","mkdown","ron"]},,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:file-extension",fileExtension);function fileExtension(e,t,r){var i=t.extname;r=typeof r==="string"?r:"md";if(i&&i.slice(1)!==r){t.message("Invalid extension: use `"+r+"`")}}},function(e){"use strict";e.exports=factory;var t="\\";function factory(e,r){return unescape;function unescape(i){var n=0;var a=i.indexOf(t);var u=e[r];var s=[];var o;while(a!==-1){s.push(i.slice(n,a));n=a+1;o=i.charAt(n);if(!o||u.indexOf(o)===-1){s.push(t)}a=i.indexOf(t,n+1)}s.push(i.slice(n));return s.join("")}}},,,function(e,t,r){"use strict";const i=r(495);const n=r(682);e.exports=i("remark-lint:prohibited-strings",prohibitedStrings);function testProhibited(e,t){const r=new RegExp(`(\\.|@[a-z0-9/-]*)?(${e.no})(\\.\\w)?`,"g");let i=null;while(i=r.exec(t)){if(!i[1]&&!i[3]){return i[2]}}return false}function prohibitedStrings(e,t,r){n(e,"text",checkText);function checkText(e){const i=e.value;r.forEach(r=>{const n=testProhibited(r,i);if(n){t.message(`Use "${r.yes}" instead of "${n}"`,e)}})}}},,,,,function(e){"use strict";e.exports=hidden;function hidden(e){if(typeof e!=="string"){throw new Error("Expected string")}return e.charAt(0)==="."}},,,,,function(e,t,r){"use strict";var i=r(171);var n=r(426);e.exports=footnoteDefinition;footnoteDefinition.notInList=true;footnoteDefinition.notInBlock=true;var a="\\";var u="\n";var s="\t";var o=" ";var l="[";var f="]";var c="^";var h=":";var p=/^( {4}|\t)?/gm;function footnoteDefinition(e,t,r){var v=this;var d=v.offset;var D;var m;var g;var E;var A;var C;var y;var w;var x;var b;var F;var S;if(!v.options.footnotes){return}D=0;m=t.length;g="";E=e.now();A=E.line;while(D=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0;var n=0;t[0].replace(/%[a-zA-Z%]/g,function(e){if(e==="%%"){return}i++;if(e==="%c"){n=i}});t.splice(n,0,r)}function log(){var e;return(typeof console==="undefined"?"undefined":_typeof(console))==="object"&&console.log&&(e=console).log.apply(e,arguments)}function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){var e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(772)(t);var i=e.exports.formatters;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},,,,function(e,t,r){var i=r(159);var n=r(589).join;var a=r(281);var u="/etc";var s=process.platform==="win32";var o=s?process.env.USERPROFILE:process.env.HOME;e.exports=function(e,t,l,f){if("string"!==typeof e)throw new Error("rc(name): name *must* be string");if(!l)l=r(359)(process.argv.slice(2));t=("string"===typeof t?i.json(t):t)||{};f=f||i.parse;var c=i.env(e+"_");var h=[t];var p=[];function addConfigFile(e){if(p.indexOf(e)>=0)return;var t=i.file(e);if(t){h.push(f(t));p.push(e)}}if(!s)[n(u,e,"config"),n(u,e+"rc")].forEach(addConfigFile);if(o)[n(o,".config",e,"config"),n(o,".config",e),n(o,"."+e,"config"),n(o,"."+e+"rc")].forEach(addConfigFile);addConfigFile(i.find("."+e+"rc"));if(c.config)addConfigFile(c.config);if(l.config)addConfigFile(l.config);return a.apply(null,h.concat([c,l,p.length?{configs:p,config:p[p.length-1]}:undefined]))}},,,,,,,,,,function(e){e.exports={_args:[["remark@10.0.1","/Users/trott/io.js/tools/node-lint-md-cli-rollup"]],_from:"remark@10.0.1",_id:"remark@10.0.1",_inBundle:false,_integrity:"sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==",_location:"/remark",_phantomChildren:{},_requested:{type:"version",registry:true,raw:"remark@10.0.1",name:"remark",escapedName:"remark",rawSpec:"10.0.1",saveSpec:null,fetchSpec:"10.0.1"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/remark/-/remark-10.0.1.tgz",_spec:"10.0.1",_where:"/Users/trott/io.js/tools/node-lint-md-cli-rollup",author:{name:"Titus Wormer",email:"tituswormer@gmail.com",url:"https://wooorm.com"},bugs:{url:"https://github.com/remarkjs/remark/issues"},contributors:[{name:"Titus Wormer",email:"tituswormer@gmail.com",url:"https://wooorm.com"}],dependencies:{"remark-parse":"^6.0.0","remark-stringify":"^6.0.0",unified:"^7.0.0"},description:"Markdown processor powered by plugins",devDependencies:{tape:"^4.9.1"},files:["index.js"],homepage:"https://remark.js.org",keywords:["markdown","abstract","syntax","tree","ast","parse","stringify","process"],license:"MIT",name:"remark",repository:{type:"git",url:"https://github.com/remarkjs/remark/tree/master/packages/remark"},scripts:{test:"tape test.js"},version:"10.0.1",xo:false}},function(e){e.exports=require("events")},,function(e,t,r){e.exports=globSync;globSync.GlobSync=GlobSync;var i=r(66);var n=r(129);var a=r(620);var u=a.Minimatch;var s=r(327).Glob;var o=r(64);var l=r(589);var f=r(393);var c=r(969);var h=r(922);var p=h.alphasort;var v=h.alphasorti;var d=h.setopts;var D=h.ownProp;var m=h.childrenIgnored;var g=h.isIgnored;function globSync(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(e,t).found}function GlobSync(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(e,t);d(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;ithis.maxLength)return false;if(!this.stat&&D(this.cache,t)){var n=this.cache[t];if(Array.isArray(n))n="DIR";if(!r||n==="DIR")return n;if(r&&n==="FILE")return false}var a;var u=this.statCache[t];if(!u){var s;try{s=i.lstatSync(t)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{u=i.statSync(t)}catch(e){u=s}}else{u=s}}this.statCache[t]=u;var n=true;if(u)n=u.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||n;if(r&&n==="FILE")return false;return n};GlobSync.prototype._mark=function(e){return h.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return h.makeAbs(this,e)}},,,,function(e){"use strict";e.exports=balanced;function balanced(e,t,r){if(e instanceof RegExp)e=maybeMatch(e,r);if(t instanceof RegExp)t=maybeMatch(t,r);var i=range(e,t,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+e.length,i[1]),post:r.slice(i[1]+t.length)}}function maybeMatch(e,t){var r=t.match(e);return r?r[0]:null}balanced.range=range;function range(e,t,r){var i,n,a,u,s;var o=r.indexOf(e);var l=r.indexOf(t,o+1);var f=o;if(o>=0&&l>0){i=[];a=r.length;while(f>=0&&!s){if(f==o){i.push(f);o=r.indexOf(e,f+1)}else if(i.length==1){s=[i.pop(),l]}else{n=i.pop();if(n=0?o:l}if(i.length){s=[a,u]}}return s}},,,,function(e,t,r){"use strict";var i=r(659);e.exports=factory;function factory(e,t){var r=e.split(":");var n=r[0];var a=r[1];var u=i(t);if(!a){a=n;n=null}attacher.displayName=e;return attacher;function attacher(e){var t=coerce(a,e);var r=t[0];var i=t[1];var s=r===2;return r?transformer:undefined;function transformer(e,t,r){var o=t.messages.length;u(e,t,i,done);function done(e){var i=t.messages;var u;if(e&&i.indexOf(e)===-1){try{t.fail(e)}catch(e){}}while(o2){throw new Error("Invalid severity `"+n+"` for `"+e+"`, "+"expected 0, 1, or 2")}i[0]=n;return i}},,,,,,,function(e,t,r){"use strict";e.exports=PassThrough;var i=r(955);var n=r(683);n.inherits=r(780);n.inherits(PassThrough,i);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);i.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";var i=r(353);var n=r(320);e.exports=n;var a=n.prototype;a.message=message;a.info=info;a.fail=fail;a.warn=message;function message(e,t,r){var n=this.path;var a=new i(e,t,r);if(n){a.name=n+":"+a.name;a.file=n}a.fatal=false;this.messages.push(a);return a}function fail(){var e=this.message.apply(this,arguments);e.fatal=true;throw e}function info(){var e=this.message.apply(this,arguments);e.fatal=null;return e}},,,,function(e,t,r){e.exports=r(64).deprecate},,,,function(e){"use strict";e.exports=locate;function locate(e,t){var r=e.indexOf("**",t);var i=e.indexOf("__",t);if(i===-1){return r}if(r===-1){return i}return ii&&e[c+1]!==" ";c=a}}else if(!isPrintable(u)){return R}h=h&&isPlainSafe(u)}o=o||l&&(a-c-1>i&&e[c+1]!==" ")}if(!s&&!o){return h&&!n(e)?I:M}if(r>9&&needIndentIndicator(e)){return R}return o?j:L}function writeScalar(e,t,r,i){e.dump=function(){if(t.length===0){return"''"}if(!e.noCompatMode&&T.indexOf(t)!==-1){return"'"+t+"'"}var a=e.indent*Math.max(1,r);var u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a);var s=i||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,s,e.indent,u,testAmbiguity)){case I:return t;case M:return"'"+t.replace(/'/g,"''")+"'";case L:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,a));case j:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,u),a));case R:return'"'+escapeString(t,u)+'"';default:throw new n("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var i=e[e.length-1]==="\n";var n=i&&(e[e.length-2]==="\n"||e==="\n");var a=n?"+":i?"":"-";return r+a+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var i=function(){var i=e.indexOf("\n");i=i!==-1?i:e.length;r.lastIndex=i;return foldLine(e.slice(0,i),t)}();var n=e[0]==="\n"||e[0]===" ";var a;var u;while(u=r.exec(e)){var s=u[1],o=u[2];a=o[0]===" ";i+=s+(!n&&!a&&o!==""?"\n":"")+foldLine(o,t);n=a}return i}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var i;var n=0,a,u=0,s=0;var o="";while(i=r.exec(e)){s=i.index;if(s-n>t){a=u>n?u:s;o+="\n"+e.slice(n,a);n=a+1}u=s}o+="\n";if(e.length-n>t&&u>n){o+=e.slice(n,u)+"\n"+e.slice(u+1)}else{o+=e.slice(n)}return o.slice(1)}function escapeString(e){var t="";var r,i;var n;for(var a=0;a=55296&&r<=56319){i=e.charCodeAt(a+1);if(i>=56320&&i<=57343){t+=encodeHex((r-55296)*1024+i-56320+65536);a++;continue}}n=P[r];t+=!n&&isPrintable(r)?e[a]:n||encodeHex(r)}return t}function writeFlowSequence(e,t,r){var i="",n=e.tag,a,u;for(a=0,u=r.length;a1024)f+="? ";f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,l,false,false)){continue}f+=e.dump;i+=f}e.tag=n;e.dump="{"+i+"}"}function writeBlockMapping(e,t,r,i){var a="",u=e.tag,s=Object.keys(r),o,l,c,h,p,v;if(e.sortKeys===true){s.sort()}else if(typeof e.sortKeys==="function"){s.sort(e.sortKeys)}else if(e.sortKeys){throw new n("sortKeys must be a boolean or a function")}for(o=0,l=s.length;o1024;if(p){if(e.dump&&f===e.dump.charCodeAt(0)){v+="?"}else{v+="? "}}v+=e.dump;if(p){v+=generateNextLine(e,t)}if(!writeNode(e,t+1,h,true,p)){continue}if(e.dump&&f===e.dump.charCodeAt(0)){v+=":"}else{v+=": "}v+=e.dump;a+=v}e.tag=u;e.dump=a||"{}"}function detectType(e,t,r){var i,a,u,l,f,c;a=r?e.explicitTypes:e.implicitTypes;for(u=0,l=a.length;u tag resolver accepts not "'+c+'" style')}e.dump=i}return true}}return false}function writeNode(e,t,r,i,a,u){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var o=s.call(e.dump);if(i){i=e.flowLevel<0||e.flowLevel>t}var l=o==="[object Object]"||o==="[object Array]",f,c;if(l){f=e.duplicates.indexOf(r);c=f!==-1}if(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0){a=false}if(c&&e.usedDuplicates[f]){e.dump="*ref_"+f}else{if(l&&c&&!e.usedDuplicates[f]){e.usedDuplicates[f]=true}if(o==="[object Object]"){if(i&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,a);if(c){e.dump="&ref_"+f+e.dump}}else{writeFlowMapping(e,t,e.dump);if(c){e.dump="&ref_"+f+" "+e.dump}}}else if(o==="[object Array]"){var h=e.noArrayIndent&&t>0?t-1:t;if(i&&e.dump.length!==0){writeBlockSequence(e,h,e.dump,a);if(c){e.dump="&ref_"+f+e.dump}}else{writeFlowSequence(e,h,e.dump);if(c){e.dump="&ref_"+f+" "+e.dump}}}else if(o==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,u)}}else{if(e.skipInvalid)return false;throw new n("unacceptable kind of an object to dump "+o)}if(e.tag!==null&&e.tag!=="?"){e.dump="!<"+e.tag+"> "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],i=[],n,a;inspectNode(e,r,i);for(n=0,a=i.length;n=e.length){if(t)t[u]=e;return r(null,e)}o.lastIndex=c;var i=o.exec(e);v=h;h+=i[0];p=v+i[1];c=o.lastIndex;if(f[p]||t&&t[p]===p){return process.nextTick(LOOP)}if(t&&Object.prototype.hasOwnProperty.call(t,p)){return gotResolvedLink(t[p])}return a.lstat(p,gotStat)}function gotStat(e,i){if(e)return r(e);if(!i.isSymbolicLink()){f[p]=true;if(t)t[p]=p;return process.nextTick(LOOP)}if(!n){var u=i.dev.toString(32)+":"+i.ino.toString(32);if(s.hasOwnProperty(u)){return gotTarget(null,s[u],p)}}a.stat(p,function(e){if(e)return r(e);a.readlink(p,function(e,t){if(!n)s[u]=t;gotTarget(e,t)})})}function gotTarget(e,n,a){if(e)return r(e);var u=i.resolve(v,n);if(t)t[a]=u;gotResolvedLink(u)}function gotResolvedLink(t){e=i.resolve(t,e.slice(c));start()}}},,function(e){e.exports=[{long:"help",description:"output usage information",short:"h",type:"boolean",default:false},{long:"version",description:"output version number",short:"v",type:"boolean",default:false},{long:"output",description:"specify output location",short:"o",value:"[path]"},{long:"rc-path",description:"specify configuration file",short:"r",type:"string",value:""},{long:"ignore-path",description:"specify ignore file",short:"i",type:"string",value:""},{long:"setting",description:"specify settings",short:"s",type:"string",value:""},{long:"ext",description:"specify extensions",short:"e",type:"string",value:""},{long:"use",description:"use plugins",short:"u",type:"string",value:""},{long:"watch",description:"watch for changes and reprocess",short:"w",type:"boolean",default:false},{long:"quiet",description:"output only warnings and errors",short:"q",type:"boolean",default:false},{long:"silent",description:"output only errors",short:"S",type:"boolean",default:false},{long:"frail",description:"exit with 1 on warnings",short:"f",type:"boolean",default:false},{long:"tree",description:"specify input and output as syntax tree",short:"t",type:"boolean",default:false},{long:"report",description:"specify reporter",type:"string",value:""},{long:"file-path",description:"specify path to process as",type:"string",value:""},{long:"tree-in",description:"specify input as syntax tree",type:"boolean"},{long:"tree-out",description:"output syntax tree",type:"boolean"},{long:"inspect",description:"output formatted syntax tree",type:"boolean"},{long:"stdout",description:"specify writing to stdout",type:"boolean",truelike:true},{long:"color",description:"specify color in report",type:"boolean",default:true},{long:"config",description:"search for configuration files",type:"boolean",default:true},{long:"ignore",description:"search for ignore files",type:"boolean",default:true}]},,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:hard-break-spaces",hardBreakSpaces);var s="Use two spaces for hard line breaks";function hardBreakSpaces(e,t){var r=String(t);n(e,"break",visitor);function visitor(e){var i;if(!u(e)){i=r.slice(a.start(e).offset,a.end(e).offset).split("\n",1)[0].replace(/\r$/,"");if(i.length>2){t.message(s,e)}}}}},,,,function(e,t,r){"use strict";var i=r(171);e.exports=table;var n="\t";var a="\n";var u=" ";var s="-";var o=":";var l="\\";var f="`";var c="|";var h=1;var p=2;var v="left";var d="center";var D="right";function table(e,t,r){var m=this;var g;var E;var A;var C;var y;var w;var x;var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var j;var R;var U;var N;var J;var z;if(!m.options.gfm){return}g=0;L=0;w=t.length+1;x=[];while(gN){if(L1){if(F){C+=b.slice(0,b.length-1);b=b.charAt(b.length-1)}else{C+=b;b=""}}I=e.now();e(C)({type:"tableCell",children:m.tokenizeInline(k,I)},y)}e(b+F);b="";k=""}}else{if(b){k+=b;b=""}k+=F;if(F===l&&g!==w-2){k+=j.charAt(g+1);g++}if(F===f){P=1;while(j.charAt(g+1)===F){k+=F;g++;P++}if(!T){T=P}else if(P>=T){T=0}}}O=false;g++}if(!M){e(a+E)}}return U}},function(e,t,r){"use strict";var i=r(211);function resolveJavascriptRegExp(e){if(e===null)return false;if(e.length===0)return false;var t=e,r=/\/([gim]*)$/.exec(e),i="";if(t[0]==="/"){if(r)i=r[1];if(i.length>3)return false;if(t[t.length-i.length-1]!=="/")return false}return true}function constructJavascriptRegExp(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";if(t[0]==="/"){if(r)i=r[1];t=t.slice(1,t.length-i.length-1)}return new RegExp(t,i)}function representJavascriptRegExp(e){var t="/"+e.source+"/";if(e.global)t+="g";if(e.multiline)t+="m";if(e.ignoreCase)t+="i";return t}function isRegExp(e){return Object.prototype.toString.call(e)==="[object RegExp]"}e.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},,,,,,,,,function(e){"use strict";e.exports=markdownTable;var t=/\./;var r=/\.[^.]*$/;var i="l";var n="r";var a="c";var u=".";var s="";var o=[i,n,a,u,s];var l=3;var f=":";var c="-";var h="|";var p=" ";var v="\n";function markdownTable(e,r){var d=r||{};var D=d.delimiter;var m=d.start;var g=d.end;var E=d.align;var A=d.stringLength||lengthNoop;var C=0;var y=-1;var w=e.length;var x=[];var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var j;E=E?E.concat():[];if(D===null||D===undefined){D=p+h+p}if(m===null||m===undefined){m=h+p}if(g===null||g===undefined){g=p+h}while(++yC){C=B.length}while(++Ox[O]){x[O]=P}}}if(typeof E==="string"){E=pad(C,E).split("")}O=-1;while(++Ox[O]){x[O]=T}}}y=-1;while(++yl?M:l}else{M=x[O]}b=E[O];I=b===n||b===s?c:f;I+=pad(M-2,c);I+=b!==i&&b!==s?f:c;F[O]=I}S.splice(1,0,F.join(D))}return m+S.join(g+v+m)+g}function stringify(e){return e===null||e===undefined?"":String(e)}function lengthNoop(e){return String(e).length}function pad(e,t){return new Array(e+1).join(t||p)}function dotindex(e){var t=r.exec(e);return t?t.index+1:e.length}},,,,,function(e,t,r){e.exports=r(688)},,,,,function(e,t,r){"use strict";var i=r(12);e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:i.nextTick;var a;Writable.WritableState=WritableState;var u=r(683);u.inherits=r(780);var s={deprecate:r(507)};var o=r(569);var l=r(945).Buffer;var f=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return l.from(e)}function _isUint8Array(e){return l.isBuffer(e)||e instanceof f}var c=r(972);u.inherits(Writable,o);function nop(){}function WritableState(e,t){a=a||r(98);e=e||{};var i=t instanceof a;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.writableObjectMode;var n=e.highWaterMark;var u=e.writableHighWaterMark;var s=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(i&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=s;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var o=e.decodeStrings===false;this.decodeStrings=!o;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var h;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){h=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(h.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{h=function(e){return e instanceof this}}function Writable(e){a=a||r(98);if(!h.call(Writable,this)&&!(this instanceof a)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}o.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r);i.nextTick(t,r)}function validChunk(e,t,r,n){var a=true;var u=false;if(r===null){u=new TypeError("May not write null values to stream")}else if(typeof r!=="string"&&r!==undefined&&!t.objectMode){u=new TypeError("Invalid non-string/buffer chunk")}if(u){e.emit("error",u);i.nextTick(n,u);a=false}return a}Writable.prototype.write=function(e,t,r){var i=this._writableState;var n=false;var a=!i.objectMode&&_isUint8Array(e);if(a&&!l.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(a)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=nop;if(i.ended)writeAfterEnd(this,r);else if(a||validChunk(this,i,e,r)){i.pendingcb++;n=writeOrBuffer(this,i,a,e,t,r)}return n};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=l.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,i,n,a){if(!r){var u=decodeChunk(t,i,n);if(i!==u){r=true;n="buffer";i=u}}var s=t.objectMode?1:i.length;t.length+=s;var o=t.length=b){b=0}}else if(E===v){g++;B+=t.charAt(g)}else if((!b||y)&&E===p){L++}else if((!b||y)&&E===d){if(L){L--}else{if(!A){while(gn){return false}}return check(e,i,r)&&check(e,m)}function isKnown(e,t,r){var i=o?o.indexOf(e)!==-1:true;if(!i){h.warn("Unknown rule: cannot "+t+" `'"+e+"'`",r)}return i}function getState(e){var t=e?D[e]:m;if(t&&t.length!==0){return t[t.length-1].state}if(!e){return!l}if(l){return f.indexOf(e)!==-1}return c.indexOf(e)===-1}function toggle(e,t,r){var i=r?D[r]:m;var n;var a;if(!i){i=[];D[r]=i}a=getState(r);n=t;if(n!==a){i.push({state:n,position:e})}if(!r){for(r in D){toggle(e,t,r)}}}function check(e,t,r){var i=t&&t.length;var n=-1;var a;while(--i>n){a=t[i];if(!a.position||!a.position.line||!a.position.column){continue}if(a.position.line=e){return}if(u){s.push({start:n,end:e});u=false}n=e}}},,function(e){"use strict";e.exports=orderedItems;var t="\n";var r=".";var i=t+t;function orderedItems(e){var n=this;var a=n.visitors.listItem;var u=n.options.incrementListMarker;var s=[];var o=e.start;var l=e.children;var f=l.length;var c=-1;var h;o=o==null?1:o;while(++c1;var p=c;var v=t.path;if(!u(p)){a("Not copying");return i()}p=l(e.cwd,p);a("Copying `%s`",v);s(p,onstatfile);function onstatfile(e,t){if(e){if(e.code!=="ENOENT"||c.charAt(c.length-1)===n.sep){return i(new Error("Cannot read output directory. Error:\n"+e.message))}s(o(p),onstatparent)}else{done(t.isDirectory())}}function onstatparent(e){if(e){i(new Error("Cannot read parent directory. Error:\n"+e.message))}else{done(false)}}function done(e){if(!e&&h){return i(new Error("Cannot write multiple files to single output: "+p))}t[e?"dirname":"path"]=f(t.cwd,p);a("Copying document from %s to %s",v,t.path);i()}}},function(e,t){"use strict";var r="[a-zA-Z_:][a-zA-Z0-9:._-]*";var i="[^\"'=<>`\\u0000-\\u0020]+";var n="'[^']*'";var a='"[^"]*"';var u="(?:"+i+"|"+n+"|"+a+")";var s="(?:\\s+"+r+"(?:\\s*=\\s*"+u+")?)";var o="<[A-Za-z][A-Za-z0-9\\-]*"+s+"*\\s*\\/?>";var l="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";var f="\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e";var c="<[?].*?[?]>";var h="]*>";var p="";t.openCloseTag=new RegExp("^(?:"+o+"|"+l+")");t.tag=new RegExp("^(?:"+o+"|"+l+"|"+f+"|"+c+"|"+h+"|"+p+")")},,function(e){e.exports=require("path")},,,,function(e,t,r){"use strict";var i=r(36);var n=r(171);var a=r(511);e.exports=strong;strong.locator=a;var u="\\";var s="*";var o="_";function strong(e,t,r){var a=this;var l=0;var f=t.charAt(l);var c;var h;var p;var v;var d;var D;var m;if(f!==s&&f!==o||t.charAt(++l)!==f){return}h=a.options.pedantic;p=f;d=p+p;D=t.length;l++;v="";f="";if(h&&n(t.charAt(l))){return}while(l0){return parse(e)}else if(r==="number"&&isNaN(e)===false){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var s=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s){return}var o=parseFloat(s[1]);var l=(s[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return o*u;case"weeks":case"week":case"w":return o*a;case"days":case"day":case"d":return o*n;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return undefined}}function fmtShort(e){var a=Math.abs(e);if(a>=n){return Math.round(e/n)+"d"}if(a>=i){return Math.round(e/i)+"h"}if(a>=r){return Math.round(e/r)+"m"}if(a>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var a=Math.abs(e);if(a>=n){return plural(e,a,n,"day")}if(a>=i){return plural(e,a,i,"hour")}if(a>=r){return plural(e,a,r,"minute")}if(a>=t){return plural(e,a,t,"second")}return e+" ms"}function plural(e,t,r,i){var n=t>=r*1.5;return Math.round(e/r)+" "+i+(n?"s":"")}},function(e,t){t.parse=t.decode=decode;t.stringify=t.encode=encode;t.safe=safe;t.unsafe=unsafe;var r=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(e,t){var i=[];var n="";if(typeof t==="string"){t={section:t,whitespace:false}}else{t=t||{};t.whitespace=t.whitespace===true}var a=t.whitespace?" = ":"=";Object.keys(e).forEach(function(t,u,s){var o=e[t];if(o&&Array.isArray(o)){o.forEach(function(e){n+=safe(t+"[]")+a+safe(e)+"\n"})}else if(o&&typeof o==="object"){i.push(t)}else{n+=safe(t)+a+safe(o)+r}});if(t.section&&n.length){n="["+safe(t.section)+"]"+r+n}i.forEach(function(i,a,u){var s=dotSplit(i).join("\\.");var o=(t.section?t.section+".":"")+s;var l=encode(e[i],{section:o,whitespace:t.whitespace});if(n.length&&l.length){n+=r}n+=l});return n}function dotSplit(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function decode(e){var t={};var r=t;var i=null;var n=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var a=e.split(/[\r\n]+/g);a.forEach(function(e,a,u){if(!e||e.match(/^\s*[;#]/))return;var s=e.match(n);if(!s)return;if(s[1]!==undefined){i=unsafe(s[1]);r=t[i]=t[i]||{};return}var o=unsafe(s[2]);var l=s[3]?unsafe(s[4]):true;switch(l){case"true":case"false":case"null":l=JSON.parse(l)}if(o.length>2&&o.slice(-2)==="[]"){o=o.substring(0,o.length-2);if(!r[o]){r[o]=[]}else if(!Array.isArray(r[o])){r[o]=[r[o]]}}if(Array.isArray(r[o])){r[o].push(l)}else{r[o]=l}});Object.keys(t).filter(function(e,r,i){if(!t[e]||typeof t[e]!=="object"||Array.isArray(t[e])){return false}var n=dotSplit(e);var a=t;var u=n.pop();var s=u.replace(/\\\./g,".");n.forEach(function(e,t,r){if(!a[e]||typeof a[e]!=="object")a[e]={};a=a[e]});if(a===t&&s===u){return false}a[s]=t[e];return true}).forEach(function(e,r,i){delete t[e]});return t}function isQuoted(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function safe(e){return typeof e!=="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&isQuoted(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(e,t){e=(e||"").trim();if(isQuoted(e)){if(e.charAt(0)==="'"){e=e.substr(1,e.length-2)}try{e=JSON.parse(e)}catch(e){}}else{var r=false;var i="";for(var n=0,a=e.length;n="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||i.ID_Start.test(e)},isIdContinueChar(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||i.ID_Continue.test(e)},isDigit(e){return/[0-9]/.test(e)},isHexDigit(e){return/[0-9A-Fa-f]/.test(e)}}},,function(e){"use strict";e.exports=(e=>{if(Number.isNaN(e)){return false}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false})},,,,,,,,,function(e,t,r){"use strict";e.exports.plugins=[r(889),r(424),r(725),r(137),r(339),r(767),r(550),r(550),[r(890),"space"],r(164),r(223),r(127),r(816),r(667),r(380),r(911),r(33),r(758),r(9),r(273),r(926),r(121),r(55),r(72),r(522),r(842),r(467),r(314),[r(166),2],[r(112),{checked:"x",unchecked:" "}],[r(301),"fenced"],[r(386),"`"],[r(451),"md"],[r(284),1],[r(675),"atx"],[r(455),[{no:"End-Of-Life",yes:"End-of-Life"},{no:"End-of-life",yes:"End-of-Life"},{no:"Github",yes:"GitHub"},{no:"Javascript",yes:"JavaScript"},{no:"Node.JS",yes:"Node.js"},{no:"Note that",yes:""},{no:"note that",yes:""},{no:"Rfc",yes:"RFC"},{no:"[Rr][Ff][Cc]\\d+",yes:"RFC "},{no:"rfc",yes:"RFC"},{no:"UNIX",yes:"Unix"},{no:"unix",yes:"Unix"},{no:"v8",yes:"V8"}]],[r(108),"*"],[r(435),"padded"]]},,function(e){e.exports=["cent","copy","divide","gt","lt","not","para","times"]},,function(e,t,r){"use strict";e.exports=r(447)},function(e,t,r){e.exports=minimatch;minimatch.Minimatch=Minimatch;var i={sep:"/"};try{i=r(589)}catch(e){}var n=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var a=r(348);var u={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var s="[^/]";var o=s+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var f="(?:(?!(?:\\/|^)\\.).)*?";var c=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce(function(e,t){e[t]=true;return e},{})}var h=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,i,n){return minimatch(r,e,t)}}function ext(e,t){e=e||{};t=t||{};var r={};Object.keys(t).forEach(function(e){r[e]=t[e]});Object.keys(e).forEach(function(t){r[t]=e[t]});return r}minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return minimatch;var t=minimatch;var r=function minimatch(r,i,n){return t.minimatch(r,i,ext(e,n))};r.Minimatch=function Minimatch(r,i){return new t.Minimatch(r,ext(e,i))};return r};Minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return Minimatch;return minimatch.defaults(e).Minimatch};function minimatch(e,t,r){if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}if(t.trim()==="")return e==="";return new Minimatch(t,r).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}if(typeof e!=="string"){throw new TypeError("glob pattern string required")}if(!t)t={};e=e.trim();if(i.sep!=="/"){e=e.split(i.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=console.error;this.debug(this.pattern,r);r=this.globParts=r.map(function(e){return e.split(h)});this.debug(this.pattern,r);r=r.map(function(e,t,r){return e.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(e){return e.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var r=this.options;var i=0;if(r.nonegate)return;for(var n=0,a=e.length;n1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&e==="**")return n;if(e==="")return"";var i="";var a=!!r.nocase;var l=false;var f=[];var h=[];var v;var d=false;var D=-1;var m=-1;var g=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var E=this;function clearStateChar(){if(v){switch(v){case"*":i+=o;a=true;break;case"?":i+=s;a=true;break;default:i+="\\"+v;break}E.debug("clearStateChar %j %j",v,i);v=false}}for(var A=0,C=e.length,y;A-1;k--){var O=h[k];var P=i.slice(0,O.reStart);var T=i.slice(O.reStart,O.reEnd-8);var I=i.slice(O.reEnd-8,O.reEnd);var M=i.slice(O.reEnd);I+=M;var L=P.split("(").length-1;var j=M;for(A=0;A=0;u--){a=e[u];if(a)break}for(u=0;u>> no match, partial?",e,c,t,h);if(c===s)return true}return false}var v;if(typeof l==="string"){if(i.nocase){v=f.toLowerCase()===l.toLowerCase()}else{v=f===l}this.debug("string match",l,f,v)}else{v=f.match(l);this.debug("pattern match",l,f,v)}if(!v)return false}if(a===s&&u===o){return true}else if(a===s){return r}else if(u===o){var d=a===s-1&&e[a]==="";return d}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},,,function(e){"use strict";e.exports=function(e){if(typeof e!=="function"){throw new TypeError("Expected a function")}return e.displayName||e.name||(/function ([^\(]+)?\(/.exec(e.toString())||[])[1]||null}},function(e){"use strict";e.exports=(()=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(e,"g")})},,,function(e,t,r){"use strict";var i=r(304);var n=r(948);e.exports=fileSystem;function fileSystem(e,t,r){var a=e.files;if(a.length===0){r()}else{n(a,{cwd:t.cwd,extensions:t.extensions,silentlyIgnore:t.silentlyIgnore,ignore:new i({cwd:t.cwd,detectIgnore:t.detectIgnore,ignoreName:t.ignoreName,ignorePath:t.ignorePath})},onfound)}function onfound(i,n){var a=n.files;a.sort(sortAlphabetically);a.forEach(markAsGiven);e.files=a;if(t.out===null||t.out===undefined){t.out=n.oneFileMode}r(i)}function markAsGiven(e){e.data.unifiedEngineGiven=true}function sortAlphabetically(e,t){return e.pathi){i=r}}else{r=1}n=a+1;a=e.indexOf(t,n)}return i}},function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:stdout");var n=r(928);e.exports=stdout;function stdout(e,t,r,a){if(!t.data.unifiedEngineGiven){i("Ignoring programmatically added file");a()}else if(n(t).fatal||e.output||!e.out){i("Ignoring writing to `streamOut`");a()}else{i("Writing document to `streamOut`");e.streamOut.write(t.toString(),a)}}},,,function(e,t,r){"use strict";var i=r(56);var n=r(503);e.exports=toVFile;function toVFile(e){if(typeof e==="string"||i(e)){e={path:String(e)}}return n(e)}},,,,function(e){(function webpackUniversalModuleDefinition(t,r){if(true)e.exports=r();else{}})(this,function(){return function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:false};e[r].call(i.exports,i,i.exports,__webpack_require__);i.loaded=true;return i.exports}__webpack_require__.m=e;__webpack_require__.c=t;__webpack_require__.p="";return __webpack_require__(0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(1);var n=r(3);var a=r(8);var u=r(15);function parse(e,t,r){var u=null;var s=function(e,t){if(r){r(e,t)}if(u){u.visit(e,t)}};var o=typeof r==="function"?s:null;var l=false;if(t){l=typeof t.comment==="boolean"&&t.comment;var f=typeof t.attachComment==="boolean"&&t.attachComment;if(l||f){u=new i.CommentHandler;u.attach=f;t.comment=true;o=s}}var c=false;if(t&&typeof t.sourceType==="string"){c=t.sourceType==="module"}var h;if(t&&typeof t.jsx==="boolean"&&t.jsx){h=new n.JSXParser(e,t,o)}else{h=new a.Parser(e,t,o)}var p=c?h.parseModule():h.parseScript();var v=p;if(l&&u){v.comments=u.comments}if(h.config.tokens){v.tokens=h.tokens}if(h.config.tolerant){v.errors=h.errorHandler.errors}return v}t.parse=parse;function parseModule(e,t,r){var i=t||{};i.sourceType="module";return parse(e,i,r)}t.parseModule=parseModule;function parseScript(e,t,r){var i=t||{};i.sourceType="script";return parse(e,i,r)}t.parseScript=parseScript;function tokenize(e,t,r){var i=new u.Tokenizer(e,t);var n;n=[];try{while(true){var a=i.getNextToken();if(!a){break}if(r){a=r(a)}n.push(a)}}catch(e){i.errorHandler.tolerate(e)}if(i.errorHandler.tolerant){n.errors=i.errors()}return n}t.tokenize=tokenize;var s=r(2);t.Syntax=s.Syntax;t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function CommentHandler(){this.attach=false;this.comments=[];this.stack=[];this.leading=[];this.trailing=[]}CommentHandler.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&e.body.length===0){var r=[];for(var n=this.leading.length-1;n>=0;--n){var a=this.leading[n];if(t.end.offset>=a.start){r.unshift(a.comment);this.leading.splice(n,1);this.trailing.splice(n,1)}}if(r.length){e.innerComments=r}}};CommentHandler.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];if(i.start>=e.end.offset){t.unshift(i.comment)}}this.trailing.length=0;return t}var n=this.stack[this.stack.length-1];if(n&&n.node.trailingComments){var a=n.node.trailingComments[0];if(a&&a.range[0]>=e.end.offset){t=n.node.trailingComments;delete n.node.trailingComments}}return t};CommentHandler.prototype.findLeadingComments=function(e){var t=[];var r;while(this.stack.length>0){var i=this.stack[this.stack.length-1];if(i&&i.start>=e.start.offset){r=i.node;this.stack.pop()}else{break}}if(r){var n=r.leadingComments?r.leadingComments.length:0;for(var a=n-1;a>=0;--a){var u=r.leadingComments[a];if(u.range[1]<=e.start.offset){t.unshift(u);r.leadingComments.splice(a,1)}}if(r.leadingComments&&r.leadingComments.length===0){delete r.leadingComments}return t}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];if(i.start<=e.start.offset){t.unshift(i.comment);this.leading.splice(a,1)}}return t};CommentHandler.prototype.visitNode=function(e,t){if(e.type===i.Syntax.Program&&e.body.length>0){return}this.insertInnerComments(e,t);var r=this.findTrailingComments(t);var n=this.findLeadingComments(t);if(n.length>0){e.leadingComments=n}if(r.length>0){e.trailingComments=r}this.stack.push({node:e,start:t.start.offset})};CommentHandler.prototype.visitComment=function(e,t){var r=e.type[0]==="L"?"Line":"Block";var i={type:r,value:e.value};if(e.range){i.range=e.range}if(e.loc){i.loc=e.loc}this.comments.push(i);if(this.attach){var n={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};if(e.loc){n.comment.loc=e.loc}e.type=r;this.leading.push(n);this.trailing.push(n)}};CommentHandler.prototype.visit=function(e,t){if(e.type==="LineComment"){this.visitComment(e,t)}else if(e.type==="BlockComment"){this.visitComment(e,t)}else if(this.attach){this.visitNode(e,t)}};return CommentHandler}();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return function(t,r){e(t,r);function __(){this.constructor=t}t.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});var n=r(4);var a=r(5);var u=r(6);var s=r(7);var o=r(8);var l=r(13);var f=r(14);l.TokenName[100]="JSXIdentifier";l.TokenName[101]="JSXText";function getQualifiedElementName(e){var t;switch(e.type){case u.JSXSyntax.JSXIdentifier:var r=e;t=r.name;break;case u.JSXSyntax.JSXNamespacedName:var i=e;t=getQualifiedElementName(i.namespace)+":"+getQualifiedElementName(i.name);break;case u.JSXSyntax.JSXMemberExpression:var n=e;t=getQualifiedElementName(n.object)+"."+getQualifiedElementName(n.property);break;default:break}return t}var c=function(e){i(JSXParser,e);function JSXParser(t,r,i){return e.call(this,t,r,i)||this}JSXParser.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)};JSXParser.prototype.startJSX=function(){this.scanner.index=this.startMarker.index;this.scanner.lineNumber=this.startMarker.line;this.scanner.lineStart=this.startMarker.index-this.startMarker.column};JSXParser.prototype.finishJSX=function(){this.nextToken()};JSXParser.prototype.reenterJSX=function(){this.startJSX();this.expectJSX("}");if(this.config.tokens){this.tokens.pop()}};JSXParser.prototype.createJSXNode=function(){this.collectComments();return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.scanXHTMLEntity=function(e){var t="&";var r=true;var i=false;var a=false;var u=false;while(!this.scanner.eof()&&r&&!i){var s=this.scanner.source[this.scanner.index];if(s===e){break}i=s===";";t+=s;++this.scanner.index;if(!i){switch(t.length){case 2:a=s==="#";break;case 3:if(a){u=s==="x";r=u||n.Character.isDecimalDigit(s.charCodeAt(0));a=a&&!u}break;default:r=r&&!(a&&!n.Character.isDecimalDigit(s.charCodeAt(0)));r=r&&!(u&&!n.Character.isHexDigit(s.charCodeAt(0)));break}}}if(r&&i&&t.length>2){var o=t.substr(1,t.length-2);if(a&&o.length>1){t=String.fromCharCode(parseInt(o.substr(1),10))}else if(u&&o.length>2){t=String.fromCharCode(parseInt("0"+o.substr(1),16))}else if(!a&&!u&&f.XHTMLEntities[o]){t=f.XHTMLEntities[o]}}return t};JSXParser.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(e===60||e===62||e===47||e===58||e===61||e===123||e===125){var t=this.scanner.source[this.scanner.index++];return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(e===34||e===39){var r=this.scanner.index;var i=this.scanner.source[this.scanner.index++];var a="";while(!this.scanner.eof()){var u=this.scanner.source[this.scanner.index++];if(u===i){break}else if(u==="&"){a+=this.scanXHTMLEntity(i)}else{a+=u}}return{type:8,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===46){var s=this.scanner.source.charCodeAt(this.scanner.index+1);var o=this.scanner.source.charCodeAt(this.scanner.index+2);var t=s===46&&o===46?"...":".";var r=this.scanner.index;this.scanner.index+=t.length;return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===96){return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index}}if(n.Character.isIdentifierStart(e)&&e!==92){var r=this.scanner.index;++this.scanner.index;while(!this.scanner.eof()){var u=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(u)&&u!==92){++this.scanner.index}else if(u===45){++this.scanner.index}else{break}}var l=this.scanner.source.slice(r,this.scanner.index);return{type:100,value:l,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}return this.scanner.lex()};JSXParser.prototype.nextJSXToken=function(){this.collectComments();this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;if(this.config.tokens){this.tokens.push(this.convertToken(e))}return e};JSXParser.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.scanner.index;var t="";while(!this.scanner.eof()){var r=this.scanner.source[this.scanner.index];if(r==="{"||r==="<"){break}++this.scanner.index;t+=r;if(n.Character.isLineTerminator(r.charCodeAt(0))){++this.scanner.lineNumber;if(r==="\r"&&this.scanner.source[this.scanner.index]==="\n"){++this.scanner.index}this.scanner.lineStart=this.scanner.index}}this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};if(t.length>0&&this.config.tokens){this.tokens.push(this.convertToken(i))}return i};JSXParser.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();this.scanner.restoreState(e);return t};JSXParser.prototype.expectJSX=function(e){var t=this.nextJSXToken();if(t.type!==7||t.value!==e){this.throwUnexpectedToken(t)}};JSXParser.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===7&&t.value===e};JSXParser.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==100){this.throwUnexpectedToken(t)}return this.finalize(e,new a.JSXIdentifier(t.value))};JSXParser.prototype.parseJSXElementName=function(){var e=this.createJSXNode();var t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(r,i))}else if(this.matchJSX(".")){while(this.matchJSX(".")){var n=t;this.expectJSX(".");var u=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(n,u))}}return t};JSXParser.prototype.parseJSXAttributeName=function(){var e=this.createJSXNode();var t;var r=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=r;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(i,n))}else{t=r}return t};JSXParser.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==8){this.throwUnexpectedToken(t)}var r=this.getTokenRaw(t);return this.finalize(e,new s.Literal(t.value,r))};JSXParser.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.finishJSX();if(this.match("}")){this.tolerateError("JSX attributes must only be assigned a non-empty expression")}var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()};JSXParser.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode();var t=this.parseJSXAttributeName();var r=null;if(this.matchJSX("=")){this.expectJSX("=");r=this.parseJSXAttributeValue()}return this.finalize(e,new a.JSXAttribute(t,r))};JSXParser.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.expectJSX("...");this.finishJSX();var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXSpreadAttribute(t))};JSXParser.prototype.parseJSXAttributes=function(){var e=[];while(!this.matchJSX("/")&&!this.matchJSX(">")){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e};JSXParser.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName();var r=this.parseJSXAttributes();var i=this.matchJSX("/");if(i){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(t,i,r))};JSXParser.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();this.expectJSX("<");if(this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();this.expectJSX(">");return this.finalize(e,new a.JSXClosingElement(t))}var r=this.parseJSXElementName();var i=this.parseJSXAttributes();var n=this.matchJSX("/");if(n){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(r,n,i))};JSXParser.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();this.collectComments();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;return this.finalize(e,new a.JSXEmptyExpression)};JSXParser.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;if(this.matchJSX("}")){t=this.parseJSXEmptyExpression();this.expectJSX("}")}else{this.finishJSX();t=this.parseAssignmentExpression();this.reenterJSX()}return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXChildren=function(){var e=[];while(!this.scanner.eof()){var t=this.createJSXChildNode();var r=this.nextJSXText();if(r.start0){var s=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing));e=t[t.length-1];e.children.push(s);t.pop()}else{break}}}return e};JSXParser.prototype.parseJSXElement=function(){var e=this.createJSXNode();var t=this.parseJSXOpeningElement();var r=[];var i=null;if(!t.selfClosing){var n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:r});r=n.children;i=n.closing}return this.finalize(e,new a.JSXElement(t,r,i))};JSXParser.prototype.parseJSXRoot=function(){if(this.config.tokens){this.tokens.pop()}this.startJSX();var e=this.parseJSXElement();this.finishJSX();return e};JSXParser.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")};return JSXParser}(o.Parser);t.JSXParser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return e===10||e===13||e===8232||e===8233},isIdentifierStart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(6);var n=function(){function JSXClosingElement(e){this.type=i.JSXSyntax.JSXClosingElement;this.name=e}return JSXClosingElement}();t.JSXClosingElement=n;var a=function(){function JSXElement(e,t,r){this.type=i.JSXSyntax.JSXElement;this.openingElement=e;this.children=t;this.closingElement=r}return JSXElement}();t.JSXElement=a;var u=function(){function JSXEmptyExpression(){this.type=i.JSXSyntax.JSXEmptyExpression}return JSXEmptyExpression}();t.JSXEmptyExpression=u;var s=function(){function JSXExpressionContainer(e){this.type=i.JSXSyntax.JSXExpressionContainer;this.expression=e}return JSXExpressionContainer}();t.JSXExpressionContainer=s;var o=function(){function JSXIdentifier(e){this.type=i.JSXSyntax.JSXIdentifier;this.name=e}return JSXIdentifier}();t.JSXIdentifier=o;var l=function(){function JSXMemberExpression(e,t){this.type=i.JSXSyntax.JSXMemberExpression;this.object=e;this.property=t}return JSXMemberExpression}();t.JSXMemberExpression=l;var f=function(){function JSXAttribute(e,t){this.type=i.JSXSyntax.JSXAttribute;this.name=e;this.value=t}return JSXAttribute}();t.JSXAttribute=f;var c=function(){function JSXNamespacedName(e,t){this.type=i.JSXSyntax.JSXNamespacedName;this.namespace=e;this.name=t}return JSXNamespacedName}();t.JSXNamespacedName=c;var h=function(){function JSXOpeningElement(e,t,r){this.type=i.JSXSyntax.JSXOpeningElement;this.name=e;this.selfClosing=t;this.attributes=r}return JSXOpeningElement}();t.JSXOpeningElement=h;var p=function(){function JSXSpreadAttribute(e){this.type=i.JSXSyntax.JSXSpreadAttribute;this.argument=e}return JSXSpreadAttribute}();t.JSXSpreadAttribute=p;var v=function(){function JSXText(e,t){this.type=i.JSXSyntax.JSXText;this.value=e;this.raw=t}return JSXText}();t.JSXText=v},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function ArrayExpression(e){this.type=i.Syntax.ArrayExpression;this.elements=e}return ArrayExpression}();t.ArrayExpression=n;var a=function(){function ArrayPattern(e){this.type=i.Syntax.ArrayPattern;this.elements=e}return ArrayPattern}();t.ArrayPattern=a;var u=function(){function ArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=false}return ArrowFunctionExpression}();t.ArrowFunctionExpression=u;var s=function(){function AssignmentExpression(e,t,r){this.type=i.Syntax.AssignmentExpression;this.operator=e;this.left=t;this.right=r}return AssignmentExpression}();t.AssignmentExpression=s;var o=function(){function AssignmentPattern(e,t){this.type=i.Syntax.AssignmentPattern;this.left=e;this.right=t}return AssignmentPattern}();t.AssignmentPattern=o;var l=function(){function AsyncArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=true}return AsyncArrowFunctionExpression}();t.AsyncArrowFunctionExpression=l;var f=function(){function AsyncFunctionDeclaration(e,t,r){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionDeclaration}();t.AsyncFunctionDeclaration=f;var c=function(){function AsyncFunctionExpression(e,t,r){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionExpression}();t.AsyncFunctionExpression=c;var h=function(){function AwaitExpression(e){this.type=i.Syntax.AwaitExpression;this.argument=e}return AwaitExpression}();t.AwaitExpression=h;var p=function(){function BinaryExpression(e,t,r){var n=e==="||"||e==="&&";this.type=n?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression;this.operator=e;this.left=t;this.right=r}return BinaryExpression}();t.BinaryExpression=p;var v=function(){function BlockStatement(e){this.type=i.Syntax.BlockStatement;this.body=e}return BlockStatement}();t.BlockStatement=v;var d=function(){function BreakStatement(e){this.type=i.Syntax.BreakStatement;this.label=e}return BreakStatement}();t.BreakStatement=d;var D=function(){function CallExpression(e,t){this.type=i.Syntax.CallExpression;this.callee=e;this.arguments=t}return CallExpression}();t.CallExpression=D;var m=function(){function CatchClause(e,t){this.type=i.Syntax.CatchClause;this.param=e;this.body=t}return CatchClause}();t.CatchClause=m;var g=function(){function ClassBody(e){this.type=i.Syntax.ClassBody;this.body=e}return ClassBody}();t.ClassBody=g;var E=function(){function ClassDeclaration(e,t,r){this.type=i.Syntax.ClassDeclaration;this.id=e;this.superClass=t;this.body=r}return ClassDeclaration}();t.ClassDeclaration=E;var A=function(){function ClassExpression(e,t,r){this.type=i.Syntax.ClassExpression;this.id=e;this.superClass=t;this.body=r}return ClassExpression}();t.ClassExpression=A;var C=function(){function ComputedMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=true;this.object=e;this.property=t}return ComputedMemberExpression}();t.ComputedMemberExpression=C;var y=function(){function ConditionalExpression(e,t,r){this.type=i.Syntax.ConditionalExpression;this.test=e;this.consequent=t;this.alternate=r}return ConditionalExpression}();t.ConditionalExpression=y;var w=function(){function ContinueStatement(e){this.type=i.Syntax.ContinueStatement;this.label=e}return ContinueStatement}();t.ContinueStatement=w;var x=function(){function DebuggerStatement(){this.type=i.Syntax.DebuggerStatement}return DebuggerStatement}();t.DebuggerStatement=x;var b=function(){function Directive(e,t){this.type=i.Syntax.ExpressionStatement;this.expression=e;this.directive=t}return Directive}();t.Directive=b;var F=function(){function DoWhileStatement(e,t){this.type=i.Syntax.DoWhileStatement;this.body=e;this.test=t}return DoWhileStatement}();t.DoWhileStatement=F;var S=function(){function EmptyStatement(){this.type=i.Syntax.EmptyStatement}return EmptyStatement}();t.EmptyStatement=S;var B=function(){function ExportAllDeclaration(e){this.type=i.Syntax.ExportAllDeclaration;this.source=e}return ExportAllDeclaration}();t.ExportAllDeclaration=B;var k=function(){function ExportDefaultDeclaration(e){this.type=i.Syntax.ExportDefaultDeclaration;this.declaration=e}return ExportDefaultDeclaration}();t.ExportDefaultDeclaration=k;var O=function(){function ExportNamedDeclaration(e,t,r){this.type=i.Syntax.ExportNamedDeclaration;this.declaration=e;this.specifiers=t;this.source=r}return ExportNamedDeclaration}();t.ExportNamedDeclaration=O;var P=function(){function ExportSpecifier(e,t){this.type=i.Syntax.ExportSpecifier;this.exported=t;this.local=e}return ExportSpecifier}();t.ExportSpecifier=P;var T=function(){function ExpressionStatement(e){this.type=i.Syntax.ExpressionStatement;this.expression=e}return ExpressionStatement}();t.ExpressionStatement=T;var I=function(){function ForInStatement(e,t,r){this.type=i.Syntax.ForInStatement;this.left=e;this.right=t;this.body=r;this.each=false}return ForInStatement}();t.ForInStatement=I;var M=function(){function ForOfStatement(e,t,r){this.type=i.Syntax.ForOfStatement;this.left=e;this.right=t;this.body=r}return ForOfStatement}();t.ForOfStatement=M;var L=function(){function ForStatement(e,t,r,n){this.type=i.Syntax.ForStatement;this.init=e;this.test=t;this.update=r;this.body=n}return ForStatement}();t.ForStatement=L;var j=function(){function FunctionDeclaration(e,t,r,n){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionDeclaration}();t.FunctionDeclaration=j;var R=function(){function FunctionExpression(e,t,r,n){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionExpression}();t.FunctionExpression=R;var U=function(){function Identifier(e){this.type=i.Syntax.Identifier;this.name=e}return Identifier}();t.Identifier=U;var N=function(){function IfStatement(e,t,r){this.type=i.Syntax.IfStatement;this.test=e;this.consequent=t;this.alternate=r}return IfStatement}();t.IfStatement=N;var J=function(){function ImportDeclaration(e,t){this.type=i.Syntax.ImportDeclaration;this.specifiers=e;this.source=t}return ImportDeclaration}();t.ImportDeclaration=J;var z=function(){function ImportDefaultSpecifier(e){this.type=i.Syntax.ImportDefaultSpecifier;this.local=e}return ImportDefaultSpecifier}();t.ImportDefaultSpecifier=z;var X=function(){function ImportNamespaceSpecifier(e){this.type=i.Syntax.ImportNamespaceSpecifier;this.local=e}return ImportNamespaceSpecifier}();t.ImportNamespaceSpecifier=X;var G=function(){function ImportSpecifier(e,t){this.type=i.Syntax.ImportSpecifier;this.local=e;this.imported=t}return ImportSpecifier}();t.ImportSpecifier=G;var q=function(){function LabeledStatement(e,t){this.type=i.Syntax.LabeledStatement;this.label=e;this.body=t}return LabeledStatement}();t.LabeledStatement=q;var W=function(){function Literal(e,t){this.type=i.Syntax.Literal;this.value=e;this.raw=t}return Literal}();t.Literal=W;var _=function(){function MetaProperty(e,t){this.type=i.Syntax.MetaProperty;this.meta=e;this.property=t}return MetaProperty}();t.MetaProperty=_;var V=function(){function MethodDefinition(e,t,r,n,a){this.type=i.Syntax.MethodDefinition;this.key=e;this.computed=t;this.value=r;this.kind=n;this.static=a}return MethodDefinition}();t.MethodDefinition=V;var Y=function(){function Module(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="module"}return Module}();t.Module=Y;var H=function(){function NewExpression(e,t){this.type=i.Syntax.NewExpression;this.callee=e;this.arguments=t}return NewExpression}();t.NewExpression=H;var $=function(){function ObjectExpression(e){this.type=i.Syntax.ObjectExpression;this.properties=e}return ObjectExpression}();t.ObjectExpression=$;var Z=function(){function ObjectPattern(e){this.type=i.Syntax.ObjectPattern;this.properties=e}return ObjectPattern}();t.ObjectPattern=Z;var Q=function(){function Property(e,t,r,n,a,u){this.type=i.Syntax.Property;this.key=t;this.computed=r;this.value=n;this.kind=e;this.method=a;this.shorthand=u}return Property}();t.Property=Q;var K=function(){function RegexLiteral(e,t,r,n){this.type=i.Syntax.Literal;this.value=e;this.raw=t;this.regex={pattern:r,flags:n}}return RegexLiteral}();t.RegexLiteral=K;var ee=function(){function RestElement(e){this.type=i.Syntax.RestElement;this.argument=e}return RestElement}();t.RestElement=ee;var te=function(){function ReturnStatement(e){this.type=i.Syntax.ReturnStatement;this.argument=e}return ReturnStatement}();t.ReturnStatement=te;var re=function(){function Script(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="script"}return Script}();t.Script=re;var ie=function(){function SequenceExpression(e){this.type=i.Syntax.SequenceExpression;this.expressions=e}return SequenceExpression}();t.SequenceExpression=ie;var ne=function(){function SpreadElement(e){this.type=i.Syntax.SpreadElement;this.argument=e}return SpreadElement}();t.SpreadElement=ne;var ae=function(){function StaticMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=false;this.object=e;this.property=t}return StaticMemberExpression}();t.StaticMemberExpression=ae;var ue=function(){function Super(){this.type=i.Syntax.Super}return Super}();t.Super=ue;var se=function(){function SwitchCase(e,t){this.type=i.Syntax.SwitchCase;this.test=e;this.consequent=t}return SwitchCase}();t.SwitchCase=se;var oe=function(){function SwitchStatement(e,t){this.type=i.Syntax.SwitchStatement;this.discriminant=e;this.cases=t}return SwitchStatement}();t.SwitchStatement=oe;var le=function(){function TaggedTemplateExpression(e,t){this.type=i.Syntax.TaggedTemplateExpression;this.tag=e;this.quasi=t}return TaggedTemplateExpression}();t.TaggedTemplateExpression=le;var fe=function(){function TemplateElement(e,t){this.type=i.Syntax.TemplateElement;this.value=e;this.tail=t}return TemplateElement}();t.TemplateElement=fe;var ce=function(){function TemplateLiteral(e,t){this.type=i.Syntax.TemplateLiteral;this.quasis=e;this.expressions=t}return TemplateLiteral}();t.TemplateLiteral=ce;var he=function(){function ThisExpression(){this.type=i.Syntax.ThisExpression}return ThisExpression}();t.ThisExpression=he;var pe=function(){function ThrowStatement(e){this.type=i.Syntax.ThrowStatement;this.argument=e}return ThrowStatement}();t.ThrowStatement=pe;var ve=function(){function TryStatement(e,t,r){this.type=i.Syntax.TryStatement;this.block=e;this.handler=t;this.finalizer=r}return TryStatement}();t.TryStatement=ve;var de=function(){function UnaryExpression(e,t){this.type=i.Syntax.UnaryExpression;this.operator=e;this.argument=t;this.prefix=true}return UnaryExpression}();t.UnaryExpression=de;var De=function(){function UpdateExpression(e,t,r){this.type=i.Syntax.UpdateExpression;this.operator=e;this.argument=t;this.prefix=r}return UpdateExpression}();t.UpdateExpression=De;var me=function(){function VariableDeclaration(e,t){this.type=i.Syntax.VariableDeclaration;this.declarations=e;this.kind=t}return VariableDeclaration}();t.VariableDeclaration=me;var ge=function(){function VariableDeclarator(e,t){this.type=i.Syntax.VariableDeclarator;this.id=e;this.init=t}return VariableDeclarator}();t.VariableDeclarator=ge;var Ee=function(){function WhileStatement(e,t){this.type=i.Syntax.WhileStatement;this.test=e;this.body=t}return WhileStatement}();t.WhileStatement=Ee;var Ae=function(){function WithStatement(e,t){this.type=i.Syntax.WithStatement;this.object=e;this.body=t}return WithStatement}();t.WithStatement=Ae;var Ce=function(){function YieldExpression(e,t){this.type=i.Syntax.YieldExpression;this.argument=e;this.delegate=t}return YieldExpression}();t.YieldExpression=Ce},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(10);var a=r(11);var u=r(7);var s=r(12);var o=r(2);var l=r(13);var f="ArrowParameterPlaceHolder";var c=function(){function Parser(e,t,r){if(t===void 0){t={}}this.config={range:typeof t.range==="boolean"&&t.range,loc:typeof t.loc==="boolean"&&t.loc,source:null,tokens:typeof t.tokens==="boolean"&&t.tokens,comment:typeof t.comment==="boolean"&&t.comment,tolerant:typeof t.tolerant==="boolean"&&t.tolerant};if(this.config.loc&&t.source&&t.source!==null){this.config.source=String(t.source)}this.delegate=r;this.errorHandler=new n.ErrorHandler;this.errorHandler.tolerant=this.config.tolerant;this.scanner=new s.Scanner(e,this.errorHandler);this.scanner.trackComment=this.config.comment;this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11};this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0};this.hasLineTerminator=false;this.context={isModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,firstCoverInitializedNameError:null,isAssignmentTarget:false,isBindingElement:false,inFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},strict:false};this.tokens=[];this.startMarker={index:0,line:this.scanner.lineNumber,column:0};this.lastMarker={index:0,line:this.scanner.lineNumber,column:0};this.nextToken();this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}Parser.prototype.throwError=function(e){var t=[];for(var r=1;r0&&this.delegate){for(var t=0;t>="||e===">>>="||e==="&="||e==="^="||e==="|="};Parser.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);if(this.context.firstCoverInitializedNameError!==null){this.throwUnexpectedToken(this.context.firstCoverInitializedNameError)}this.context.isBindingElement=t;this.context.isAssignmentTarget=r;this.context.firstCoverInitializedNameError=i;return n};Parser.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);this.context.isBindingElement=this.context.isBindingElement&&t;this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r;this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError;return n};Parser.prototype.consumeSemicolon=function(){if(this.match(";")){this.nextToken()}else if(!this.hasLineTerminator){if(this.lookahead.type!==2&&!this.match("}")){this.throwUnexpectedToken(this.lookahead)}this.lastMarker.index=this.startMarker.index;this.lastMarker.line=this.startMarker.line;this.lastMarker.column=this.startMarker.column}};Parser.prototype.parsePrimaryExpression=function(){var e=this.createNode();var t;var r,i;switch(this.lookahead.type){case 3:if((this.context.isModule||this.context.await)&&this.lookahead.value==="await"){this.tolerateUnexpectedToken(this.lookahead)}t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new u.Identifier(this.nextToken().value));break;case 6:case 8:if(this.context.strict&&this.lookahead.octal){this.tolerateUnexpectedToken(this.lookahead,a.Messages.StrictOctalLiteral)}this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(r.value,i));break;case 1:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(r.value==="true",i));break;case 5:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(null,i));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=false;t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.scanner.index=this.startMarker.index;r=this.nextRegexToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.RegexLiteral(r.regex,i,r.pattern,r.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:if(!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")){t=this.parseIdentifierName()}else if(!this.context.strict&&this.matchKeyword("let")){t=this.finalize(e,new u.Identifier(this.nextToken().value))}else{this.context.isAssignmentTarget=false;this.context.isBindingElement=false;if(this.matchKeyword("function")){t=this.parseFunctionExpression()}else if(this.matchKeyword("this")){this.nextToken();t=this.finalize(e,new u.ThisExpression)}else if(this.matchKeyword("class")){t=this.parseClassExpression()}else{t=this.throwUnexpectedToken(this.nextToken())}}break;default:t=this.throwUnexpectedToken(this.nextToken())}return t};Parser.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new u.SpreadElement(t))};Parser.prototype.parseArrayInitializer=function(){var e=this.createNode();var t=[];this.expect("[");while(!this.match("]")){if(this.match(",")){this.nextToken();t.push(null)}else if(this.match("...")){var r=this.parseSpreadElement();if(!this.match("]")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.expect(",")}t.push(r)}else{t.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(e,new u.ArrayExpression(t))};Parser.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var t=this.context.strict;var r=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);if(this.context.strict&&e.firstRestricted){this.tolerateUnexpectedToken(e.firstRestricted,e.message)}if(this.context.strict&&e.stricted){this.tolerateUnexpectedToken(e.stricted,e.message)}this.context.strict=t;this.context.allowStrictDirective=r;return i};Parser.prototype.parsePropertyMethodFunction=function(){var e=false;var t=this.createNode();var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(t,new u.FunctionExpression(null,i.params,n,e))};Parser.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode();var t=this.context.allowYield;var r=this.context.await;this.context.allowYield=false;this.context.await=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=t;this.context.await=r;return this.finalize(e,new u.AsyncFunctionExpression(null,i.params,n))};Parser.prototype.parseObjectPropertyKey=function(){var e=this.createNode();var t=this.nextToken();var r;switch(t.type){case 8:case 6:if(this.context.strict&&t.octal){this.tolerateUnexpectedToken(t,a.Messages.StrictOctalLiteral)}var i=this.getTokenRaw(t);r=this.finalize(e,new u.Literal(t.value,i));break;case 3:case 1:case 5:case 4:r=this.finalize(e,new u.Identifier(t.value));break;case 7:if(t.value==="["){r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.expect("]")}else{r=this.throwUnexpectedToken(t)}break;default:r=this.throwUnexpectedToken(t)}return r};Parser.prototype.isPropertyKey=function(e,t){return e.type===o.Syntax.Identifier&&e.name===t||e.type===o.Syntax.Literal&&e.value===t};Parser.prototype.parseObjectProperty=function(e){var t=this.createNode();var r=this.lookahead;var i;var n=null;var s=null;var o=false;var l=false;var f=false;var c=false;if(r.type===3){var h=r.value;this.nextToken();o=this.match("[");c=!this.hasLineTerminator&&h==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(",");n=c?this.parseObjectPropertyKey():this.finalize(t,new u.Identifier(h))}else if(this.match("*")){this.nextToken()}else{o=this.match("[");n=this.parseObjectPropertyKey()}var p=this.qualifiedPropertyName(this.lookahead);if(r.type===3&&!c&&r.value==="get"&&p){i="get";o=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;s=this.parseGetterMethod()}else if(r.type===3&&!c&&r.value==="set"&&p){i="set";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseSetterMethod()}else if(r.type===7&&r.value==="*"&&p){i="init";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseGeneratorMethod();l=true}else{if(!n){this.throwUnexpectedToken(this.lookahead)}i="init";if(this.match(":")&&!c){if(!o&&this.isPropertyKey(n,"__proto__")){if(e.value){this.tolerateError(a.Messages.DuplicateProtoProperty)}e.value=true}this.nextToken();s=this.inheritCoverGrammar(this.parseAssignmentExpression)}else if(this.match("(")){s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();l=true}else if(r.type===3){var h=this.finalize(t,new u.Identifier(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead;this.nextToken();f=true;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(t,new u.AssignmentPattern(h,v))}else{f=true;s=h}}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(t,new u.Property(i,n,o,s,l,f))};Parser.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");var t=[];var r={value:false};while(!this.match("}")){t.push(this.parseObjectProperty(r));if(!this.match("}")){this.expectCommaSeparator()}}this.expect("}");return this.finalize(e,new u.ObjectExpression(t))};Parser.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode();var t=this.nextToken();var r=t.value;var n=t.cooked;return this.finalize(e,new u.TemplateElement({raw:r,cooked:n},t.tail))};Parser.prototype.parseTemplateElement=function(){if(this.lookahead.type!==10){this.throwUnexpectedToken()}var e=this.createNode();var t=this.nextToken();var r=t.value;var i=t.cooked;return this.finalize(e,new u.TemplateElement({raw:r,cooked:i},t.tail))};Parser.prototype.parseTemplateLiteral=function(){var e=this.createNode();var t=[];var r=[];var i=this.parseTemplateHead();r.push(i);while(!i.tail){t.push(this.parseExpression());i=this.parseTemplateElement();r.push(i)}return this.finalize(e,new u.TemplateLiteral(r,t))};Parser.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case o.Syntax.Identifier:case o.Syntax.MemberExpression:case o.Syntax.RestElement:case o.Syntax.AssignmentPattern:break;case o.Syntax.SpreadElement:e.type=o.Syntax.RestElement;this.reinterpretExpressionAsPattern(e.argument);break;case o.Syntax.ArrayExpression:e.type=o.Syntax.ArrayPattern;for(var t=0;t")){this.expect("=>")}e={type:f,params:[],async:false}}else{var t=this.lookahead;var r=[];if(this.match("...")){e=this.parseRestElement(r);this.expect(")");if(!this.match("=>")){this.expect("=>")}e={type:f,params:[e],async:false}}else{var i=false;this.context.isBindingElement=true;e=this.inheritCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];this.context.isAssignmentTarget=false;n.push(e);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();if(this.match(")")){this.nextToken();for(var a=0;a")){this.expect("=>")}this.context.isBindingElement=false;for(var a=0;a")){if(e.type===o.Syntax.Identifier&&e.name==="yield"){i=true;e={type:f,params:[e],async:false}}if(!i){if(!this.context.isBindingElement){this.throwUnexpectedToken(this.lookahead)}if(e.type===o.Syntax.SequenceExpression){for(var a=0;a")){for(var o=0;o0){this.nextToken();this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=[e,this.lookahead];var a=t;var s=this.isolateCoverGrammar(this.parseExponentiationExpression);var o=[a,r.value,s];var l=[i];while(true){i=this.binaryPrecedence(this.lookahead);if(i<=0){break}while(o.length>2&&i<=l[l.length-1]){s=o.pop();var f=o.pop();l.pop();a=o.pop();n.pop();var c=this.startNode(n[n.length-1]);o.push(this.finalize(c,new u.BinaryExpression(f,a,s)))}o.push(this.nextToken().value);l.push(i);n.push(this.lookahead);o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=o.length-1;t=o[h];var p=n.pop();while(h>1){var v=n.pop();var d=p&&p.lineStart;var c=this.startNode(v,d);var f=o[h-1];t=this.finalize(c,new u.BinaryExpression(f,o[h-2],t));h-=2;p=v}}return t};Parser.prototype.parseConditionalExpression=function(){var e=this.lookahead;var t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=true;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r;this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new u.ConditionalExpression(t,i,n));this.context.isAssignmentTarget=false;this.context.isBindingElement=false}return t};Parser.prototype.checkPatternParam=function(e,t){switch(t.type){case o.Syntax.Identifier:this.validateParam(e,t,t.name);break;case o.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case o.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case o.Syntax.ArrayPattern:for(var r=0;r")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=e.async;var s=this.reinterpretAsCoverFormalsList(e);if(s){if(this.hasLineTerminator){this.tolerateUnexpectedToken(this.lookahead)}this.context.firstCoverInitializedNameError=null;var l=this.context.strict;var c=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var h=this.context.allowYield;var p=this.context.await;this.context.allowYield=true;this.context.await=n;var v=this.startNode(t);this.expect("=>");var d=void 0;if(this.match("{")){var D=this.context.allowIn;this.context.allowIn=true;d=this.parseFunctionSourceElements();this.context.allowIn=D}else{d=this.isolateCoverGrammar(this.parseAssignmentExpression)}var m=d.type!==o.Syntax.BlockStatement;if(this.context.strict&&s.firstRestricted){this.throwUnexpectedToken(s.firstRestricted,s.message)}if(this.context.strict&&s.stricted){this.tolerateUnexpectedToken(s.stricted,s.message)}e=n?this.finalize(v,new u.AsyncArrowFunctionExpression(s.params,d,m)):this.finalize(v,new u.ArrowFunctionExpression(s.params,d,m));this.context.strict=l;this.context.allowStrictDirective=c;this.context.allowYield=h;this.context.await=p}}else{if(this.matchAssign()){if(!this.context.isAssignmentTarget){this.tolerateError(a.Messages.InvalidLHSInAssignment)}if(this.context.strict&&e.type===o.Syntax.Identifier){var g=e;if(this.scanner.isRestrictedWord(g.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictLHSAssignment)}if(this.scanner.isStrictModeReservedWord(g.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}}if(!this.match("=")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false}else{this.reinterpretExpressionAsPattern(e)}r=this.nextToken();var E=r.value;var A=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new u.AssignmentExpression(E,e,A));this.context.firstCoverInitializedNameError=null}}}return e};Parser.prototype.parseExpression=function(){var e=this.lookahead;var t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];r.push(t);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();r.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}t=this.finalize(this.startNode(e),new u.SequenceExpression(r))}return t};Parser.prototype.parseStatementListItem=function(){var e;this.context.isAssignmentTarget=true;this.context.isBindingElement=true;if(this.lookahead.type===4){switch(this.lookahead.value){case"export":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalExportDeclaration)}e=this.parseExportDeclaration();break;case"import":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalImportDeclaration)}e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:false});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:false}):this.parseStatement();break;default:e=this.parseStatement();break}}else{e=this.parseStatement()}return e};Parser.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");var t=[];while(true){if(this.match("}")){break}t.push(this.parseStatementListItem())}this.expect("}");return this.finalize(e,new u.BlockStatement(t))};Parser.prototype.parseLexicalBinding=function(e,t){var r=this.createNode();var i=[];var n=this.parsePattern(i,e);if(this.context.strict&&n.type===o.Syntax.Identifier){if(this.scanner.isRestrictedWord(n.name)){this.tolerateError(a.Messages.StrictVarName)}}var s=null;if(e==="const"){if(!this.matchKeyword("in")&&!this.matchContextualKeyword("of")){if(this.match("=")){this.nextToken();s=this.isolateCoverGrammar(this.parseAssignmentExpression)}else{this.throwError(a.Messages.DeclarationMissingInitializer,"const")}}}else if(!t.inFor&&n.type!==o.Syntax.Identifier||this.match("=")){this.expect("=");s=this.isolateCoverGrammar(this.parseAssignmentExpression)}return this.finalize(r,new u.VariableDeclarator(n,s))};Parser.prototype.parseBindingList=function(e,t){var r=[this.parseLexicalBinding(e,t)];while(this.match(",")){this.nextToken();r.push(this.parseLexicalBinding(e,t))}return r};Parser.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();this.scanner.restoreState(e);return t.type===3||t.type===7&&t.value==="["||t.type===7&&t.value==="{"||t.type===4&&t.value==="let"||t.type===4&&t.value==="yield"};Parser.prototype.parseLexicalDeclaration=function(e){var t=this.createNode();var r=this.nextToken().value;i.assert(r==="let"||r==="const","Lexical declaration must be either let or const");var n=this.parseBindingList(r,e);this.consumeSemicolon();return this.finalize(t,new u.VariableDeclaration(n,r))};Parser.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(r,new u.RestElement(i))};Parser.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");var i=[];while(!this.match("]")){if(this.match(",")){this.nextToken();i.push(null)}else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}else{i.push(this.parsePatternWithDefault(e,t))}if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(r,new u.ArrayPattern(i))};Parser.prototype.parsePropertyPattern=function(e,t){var r=this.createNode();var i=false;var n=false;var a=false;var s;var o;if(this.lookahead.type===3){var l=this.lookahead;s=this.parseVariableIdentifier();var f=this.finalize(r,new u.Identifier(l.value));if(this.match("=")){e.push(l);n=true;this.nextToken();var c=this.parseAssignmentExpression();o=this.finalize(this.startNode(l),new u.AssignmentPattern(f,c))}else if(!this.match(":")){e.push(l);n=true;o=f}else{this.expect(":");o=this.parsePatternWithDefault(e,t)}}else{i=this.match("[");s=this.parseObjectPropertyKey();this.expect(":");o=this.parsePatternWithDefault(e,t)}return this.finalize(r,new u.Property("init",s,i,o,a,n))};Parser.prototype.parseObjectPattern=function(e,t){var r=this.createNode();var i=[];this.expect("{");while(!this.match("}")){i.push(this.parsePropertyPattern(e,t));if(!this.match("}")){this.expect(",")}}this.expect("}");return this.finalize(r,new u.ObjectPattern(i))};Parser.prototype.parsePattern=function(e,t){var r;if(this.match("[")){r=this.parseArrayPattern(e,t)}else if(this.match("{")){r=this.parseObjectPattern(e,t)}else{if(this.matchKeyword("let")&&(t==="const"||t==="let")){this.tolerateUnexpectedToken(this.lookahead,a.Messages.LetInLexicalBinding)}e.push(this.lookahead);r=this.parseVariableIdentifier(t)}return r};Parser.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead;var i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var n=this.context.allowYield;this.context.allowYield=true;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=n;i=this.finalize(this.startNode(r),new u.AssignmentPattern(i,a))}return i};Parser.prototype.parseVariableIdentifier=function(e){var t=this.createNode();var r=this.nextToken();if(r.type===4&&r.value==="yield"){if(this.context.strict){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else if(!this.context.allowYield){this.throwUnexpectedToken(r)}}else if(r.type!==3){if(this.context.strict&&r.type===4&&this.scanner.isStrictModeReservedWord(r.value)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else{if(this.context.strict||r.value!=="let"||e!=="var"){this.throwUnexpectedToken(r)}}}else if((this.context.isModule||this.context.await)&&r.type===3&&r.value==="await"){this.tolerateUnexpectedToken(r)}return this.finalize(t,new u.Identifier(r.value))};Parser.prototype.parseVariableDeclaration=function(e){var t=this.createNode();var r=[];var i=this.parsePattern(r,"var");if(this.context.strict&&i.type===o.Syntax.Identifier){if(this.scanner.isRestrictedWord(i.name)){this.tolerateError(a.Messages.StrictVarName)}}var n=null;if(this.match("=")){this.nextToken();n=this.isolateCoverGrammar(this.parseAssignmentExpression)}else if(i.type!==o.Syntax.Identifier&&!e.inFor){this.expect("=")}return this.finalize(t,new u.VariableDeclarator(i,n))};Parser.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor};var r=[];r.push(this.parseVariableDeclaration(t));while(this.match(",")){this.nextToken();r.push(this.parseVariableDeclaration(t))}return r};Parser.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:false});this.consumeSemicolon();return this.finalize(e,new u.VariableDeclaration(t,"var"))};Parser.prototype.parseEmptyStatement=function(){var e=this.createNode();this.expect(";");return this.finalize(e,new u.EmptyStatement)};Parser.prototype.parseExpressionStatement=function(){var e=this.createNode();var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new u.ExpressionStatement(t))};Parser.prototype.parseIfClause=function(){if(this.context.strict&&this.matchKeyword("function")){this.tolerateError(a.Messages.StrictFunction)}return this.parseStatement()};Parser.prototype.parseIfStatement=function(){var e=this.createNode();var t;var r=null;this.expectKeyword("if");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");t=this.parseIfClause();if(this.matchKeyword("else")){this.nextToken();r=this.parseIfClause()}}return this.finalize(e,new u.IfStatement(i,t,r))};Parser.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=true;var r=this.parseStatement();this.context.inIteration=t;this.expectKeyword("while");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken())}else{this.expect(")");if(this.match(";")){this.nextToken()}}return this.finalize(e,new u.DoWhileStatement(r,i))};Parser.prototype.parseWhileStatement=function(){var e=this.createNode();var t;this.expectKeyword("while");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=true;t=this.parseStatement();this.context.inIteration=i}return this.finalize(e,new u.WhileStatement(r,t))};Parser.prototype.parseForStatement=function(){var e=null;var t=null;var r=null;var i=true;var n,s;var l=this.createNode();this.expectKeyword("for");this.expect("(");if(this.match(";")){this.nextToken()}else{if(this.matchKeyword("var")){e=this.createNode();this.nextToken();var f=this.context.allowIn;this.context.allowIn=false;var c=this.parseVariableDeclarationList({inFor:true});this.context.allowIn=f;if(c.length===1&&this.matchKeyword("in")){var h=c[0];if(h.init&&(h.id.type===o.Syntax.ArrayPattern||h.id.type===o.Syntax.ObjectPattern||this.context.strict)){this.tolerateError(a.Messages.ForInOfLoopInitializer,"for-in")}e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.nextToken();n=e;s=this.parseExpression();e=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.nextToken();n=e;s=this.parseAssignmentExpression();e=null;i=false}else{e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.expect(";")}}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var p=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in"){e=this.finalize(e,new u.Identifier(p));this.nextToken();n=e;s=this.parseExpression();e=null}else{var f=this.context.allowIn;this.context.allowIn=false;var c=this.parseBindingList(p,{inFor:true});this.context.allowIn=f;if(c.length===1&&c[0].init===null&&this.matchKeyword("in")){e=this.finalize(e,new u.VariableDeclaration(c,p));this.nextToken();n=e;s=this.parseExpression();e=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new u.VariableDeclaration(c,p));this.nextToken();n=e;s=this.parseAssignmentExpression();e=null;i=false}else{this.consumeSemicolon();e=this.finalize(e,new u.VariableDeclaration(c,p))}}}else{var v=this.lookahead;var f=this.context.allowIn;this.context.allowIn=false;e=this.inheritCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=f;if(this.matchKeyword("in")){if(!this.context.isAssignmentTarget||e.type===o.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForIn)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;s=this.parseExpression();e=null}else if(this.matchContextualKeyword("of")){if(!this.context.isAssignmentTarget||e.type===o.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForLoop)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;s=this.parseAssignmentExpression();e=null;i=false}else{if(this.match(",")){var d=[e];while(this.match(",")){this.nextToken();d.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}e=this.finalize(this.startNode(v),new u.SequenceExpression(d))}this.expect(";")}}}if(typeof n==="undefined"){if(!this.match(";")){t=this.parseExpression()}this.expect(";");if(!this.match(")")){r=this.parseExpression()}}var D;if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());D=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");var m=this.context.inIteration;this.context.inIteration=true;D=this.isolateCoverGrammar(this.parseStatement);this.context.inIteration=m}return typeof n==="undefined"?this.finalize(l,new u.ForStatement(e,t,r,D)):i?this.finalize(l,new u.ForInStatement(n,s,D)):this.finalize(l,new u.ForOfStatement(n,s,D))};Parser.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();t=r;var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}}this.consumeSemicolon();if(t===null&&!this.context.inIteration){this.throwError(a.Messages.IllegalContinue)}return this.finalize(e,new u.ContinueStatement(t))};Parser.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}t=r}this.consumeSemicolon();if(t===null&&!this.context.inIteration&&!this.context.inSwitch){this.throwError(a.Messages.IllegalBreak)}return this.finalize(e,new u.BreakStatement(t))};Parser.prototype.parseReturnStatement=function(){if(!this.context.inFunctionBody){this.tolerateError(a.Messages.IllegalReturn)}var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10;var r=t?this.parseExpression():null;this.consumeSemicolon();return this.finalize(e,new u.ReturnStatement(r))};Parser.prototype.parseWithStatement=function(){if(this.context.strict){this.tolerateError(a.Messages.StrictModeWith)}var e=this.createNode();var t;this.expectKeyword("with");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");t=this.parseStatement()}return this.finalize(e,new u.WithStatement(r,t))};Parser.prototype.parseSwitchCase=function(){var e=this.createNode();var t;if(this.matchKeyword("default")){this.nextToken();t=null}else{this.expectKeyword("case");t=this.parseExpression()}this.expect(":");var r=[];while(true){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case")){break}r.push(this.parseStatementListItem())}return this.finalize(e,new u.SwitchCase(t,r))};Parser.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch");this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=true;var i=[];var n=false;this.expect("{");while(true){if(this.match("}")){break}var s=this.parseSwitchCase();if(s.test===null){if(n){this.throwError(a.Messages.MultipleDefaultsInSwitch)}n=true}i.push(s)}this.expect("}");this.context.inSwitch=r;return this.finalize(e,new u.SwitchStatement(t,i))};Parser.prototype.parseLabelledStatement=function(){var e=this.createNode();var t=this.parseExpression();var r;if(t.type===o.Syntax.Identifier&&this.match(":")){this.nextToken();var i=t;var n="$"+i.name;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,n)){this.throwError(a.Messages.Redeclaration,"Label",i.name)}this.context.labelSet[n]=true;var s=void 0;if(this.matchKeyword("class")){this.tolerateUnexpectedToken(this.lookahead);s=this.parseClassDeclaration()}else if(this.matchKeyword("function")){var l=this.lookahead;var f=this.parseFunctionDeclaration();if(this.context.strict){this.tolerateUnexpectedToken(l,a.Messages.StrictFunction)}else if(f.generator){this.tolerateUnexpectedToken(l,a.Messages.GeneratorInLegacyContext)}s=f}else{s=this.parseStatement()}delete this.context.labelSet[n];r=new u.LabeledStatement(i,s)}else{this.consumeSemicolon();r=new u.ExpressionStatement(t)}return this.finalize(e,r)};Parser.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw");if(this.hasLineTerminator){this.throwError(a.Messages.NewlineAfterThrow)}var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new u.ThrowStatement(t))};Parser.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch");this.expect("(");if(this.match(")")){this.throwUnexpectedToken(this.lookahead)}var t=[];var r=this.parsePattern(t);var i={};for(var n=0;n0){this.tolerateError(a.Messages.BadGetterArity)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseSetterMethod=function(){var e=this.createNode();var t=false;var r=this.context.allowYield;this.context.allowYield=!t;var i=this.parseFormalParameters();if(i.params.length!==1){this.tolerateError(a.Messages.BadSetterArity)}else if(i.params[0]instanceof u.RestElement){this.tolerateError(a.Messages.BadSetterRestParameter)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseGeneratorMethod=function(){var e=this.createNode();var t=true;var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();this.context.allowYield=false;var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.isStartOfExpression=function(){var e=true;var t=this.lookahead.value;switch(this.lookahead.type){case 7:e=t==="["||t==="("||t==="{"||t==="+"||t==="-"||t==="!"||t==="~"||t==="++"||t==="--"||t==="/"||t==="/=";break;case 4:e=t==="class"||t==="delete"||t==="function"||t==="let"||t==="new"||t==="super"||t==="this"||t==="typeof"||t==="void"||t==="yield";break;default:break}return e};Parser.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null;var r=false;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=false;r=this.match("*");if(r){this.nextToken();t=this.parseAssignmentExpression()}else if(this.isStartOfExpression()){t=this.parseAssignmentExpression()}this.context.allowYield=i}return this.finalize(e,new u.YieldExpression(t,r))};Parser.prototype.parseClassElement=function(e){var t=this.lookahead;var r=this.createNode();var i="";var n=null;var s=null;var o=false;var l=false;var f=false;var c=false;if(this.match("*")){this.nextToken()}else{o=this.match("[");n=this.parseObjectPropertyKey();var h=n;if(h.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))){t=this.lookahead;f=true;o=this.match("[");if(this.match("*")){this.nextToken()}else{n=this.parseObjectPropertyKey()}}if(t.type===3&&!this.hasLineTerminator&&t.value==="async"){var p=this.lookahead.value;if(p!==":"&&p!=="("&&p!=="*"){c=true;t=this.lookahead;n=this.parseObjectPropertyKey();if(t.type===3&&t.value==="constructor"){this.tolerateUnexpectedToken(t,a.Messages.ConstructorIsAsync)}}}}var v=this.qualifiedPropertyName(this.lookahead);if(t.type===3){if(t.value==="get"&&v){i="get";o=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;s=this.parseGetterMethod()}else if(t.value==="set"&&v){i="set";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseSetterMethod()}}else if(t.type===7&&t.value==="*"&&v){i="init";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseGeneratorMethod();l=true}if(!i&&n&&this.match("(")){i="init";s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();l=true}if(!i){this.throwUnexpectedToken(this.lookahead)}if(i==="init"){i="method"}if(!o){if(f&&this.isPropertyKey(n,"prototype")){this.throwUnexpectedToken(t,a.Messages.StaticPrototype)}if(!f&&this.isPropertyKey(n,"constructor")){if(i!=="method"||!l||s&&s.generator){this.throwUnexpectedToken(t,a.Messages.ConstructorSpecialMethod)}if(e.value){this.throwUnexpectedToken(t,a.Messages.DuplicateConstructor)}else{e.value=true}i="constructor"}}return this.finalize(r,new u.MethodDefinition(n,o,s,i,f))};Parser.prototype.parseClassElementList=function(){var e=[];var t={value:false};this.expect("{");while(!this.match("}")){if(this.match(";")){this.nextToken()}else{e.push(this.parseClassElement(t))}}this.expect("}");return e};Parser.prototype.parseClassBody=function(){var e=this.createNode();var t=this.parseClassElementList();return this.finalize(e,new u.ClassBody(t))};Parser.prototype.parseClassDeclaration=function(e){var t=this.createNode();var r=this.context.strict;this.context.strict=true;this.expectKeyword("class");var i=e&&this.lookahead.type!==3?null:this.parseVariableIdentifier();var n=null;if(this.matchKeyword("extends")){this.nextToken();n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var a=this.parseClassBody();this.context.strict=r;return this.finalize(t,new u.ClassDeclaration(i,n,a))};Parser.prototype.parseClassExpression=function(){var e=this.createNode();var t=this.context.strict;this.context.strict=true;this.expectKeyword("class");var r=this.lookahead.type===3?this.parseVariableIdentifier():null;var i=null;if(this.matchKeyword("extends")){this.nextToken();i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var n=this.parseClassBody();this.context.strict=t;return this.finalize(e,new u.ClassExpression(r,i,n))};Parser.prototype.parseModule=function(){this.context.strict=true;this.context.isModule=true;this.scanner.isModule=true;var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new u.Module(t))};Parser.prototype.parseScript=function(){var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new u.Script(t))};Parser.prototype.parseModuleSpecifier=function(){var e=this.createNode();if(this.lookahead.type!==8){this.throwError(a.Messages.InvalidModuleSpecifier)}var t=this.nextToken();var r=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,r))};Parser.prototype.parseImportSpecifier=function(){var e=this.createNode();var t;var r;if(this.lookahead.type===3){t=this.parseVariableIdentifier();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}}else{t=this.parseIdentifierName();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(e,new u.ImportSpecifier(r,t))};Parser.prototype.parseNamedImports=function(){this.expect("{");var e=[];while(!this.match("}")){e.push(this.parseImportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");return e};Parser.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();return this.finalize(e,new u.ImportDefaultSpecifier(t))};Parser.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*");if(!this.matchContextualKeyword("as")){this.throwError(a.Messages.NoAsAfterImportNamespace)}this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new u.ImportNamespaceSpecifier(t))};Parser.prototype.parseImportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalImportDeclaration)}var e=this.createNode();this.expectKeyword("import");var t;var r=[];if(this.lookahead.type===8){t=this.parseModuleSpecifier()}else{if(this.match("{")){r=r.concat(this.parseNamedImports())}else if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")){r.push(this.parseImportDefaultSpecifier());if(this.match(",")){this.nextToken();if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.match("{")){r=r.concat(this.parseNamedImports())}else{this.throwUnexpectedToken(this.lookahead)}}}else{this.throwUnexpectedToken(this.nextToken())}if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();t=this.parseModuleSpecifier()}this.consumeSemicolon();return this.finalize(e,new u.ImportDeclaration(r,t))};Parser.prototype.parseExportSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();var r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseIdentifierName()}return this.finalize(e,new u.ExportSpecifier(t,r))};Parser.prototype.parseExportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalExportDeclaration)}var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default")){this.nextToken();if(this.matchKeyword("function")){var r=this.parseFunctionDeclaration(true);t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else if(this.matchKeyword("class")){var r=this.parseClassDeclaration(true);t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else if(this.matchContextualKeyword("async")){var r=this.matchAsyncFunction()?this.parseFunctionDeclaration(true):this.parseAssignmentExpression();t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else{if(this.matchContextualKeyword("from")){this.throwError(a.Messages.UnexpectedToken,this.lookahead.value)}var r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon();t=this.finalize(e,new u.ExportDefaultDeclaration(r))}}else if(this.match("*")){this.nextToken();if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var n=this.parseModuleSpecifier();this.consumeSemicolon();t=this.finalize(e,new u.ExportAllDeclaration(n))}else if(this.lookahead.type===4){var r=void 0;switch(this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:false});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new u.ExportNamedDeclaration(r,[],null))}else if(this.matchAsyncFunction()){var r=this.parseFunctionDeclaration();t=this.finalize(e,new u.ExportNamedDeclaration(r,[],null))}else{var s=[];var o=null;var l=false;this.expect("{");while(!this.match("}")){l=l||this.matchKeyword("default");s.push(this.parseExportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");if(this.matchContextualKeyword("from")){this.nextToken();o=this.parseModuleSpecifier();this.consumeSemicolon()}else if(l){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}else{this.consumeSemicolon()}t=this.finalize(e,new u.ExportNamedDeclaration(null,s,o))}return t};return Parser}();t.Parser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function assert(e,t){if(!e){throw new Error("ASSERT: "+t)}}t.assert=assert},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=function(){function ErrorHandler(){this.errors=[];this.tolerant=false}ErrorHandler.prototype.recordError=function(e){this.errors.push(e)};ErrorHandler.prototype.tolerate=function(e){if(this.tolerant){this.recordError(e)}else{throw e}};ErrorHandler.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){if(Object.create&&Object.defineProperty){r=Object.create(e);Object.defineProperty(r,"column",{value:t})}}return r};ErrorHandler.prototype.createError=function(e,t,r,i){var n="Line "+t+": "+i;var a=this.constructError(n,r);a.index=e;a.lineNumber=t;a.description=i;return a};ErrorHandler.prototype.throwError=function(e,t,r,i){throw this.createError(e,t,r,i)};ErrorHandler.prototype.tolerateError=function(e,t,r,i){var n=this.createError(e,t,r,i);if(this.tolerant){this.recordError(n)}else{throw n}};return ErrorHandler}();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(4);var a=r(11);function hexValue(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function octalValue(e){return"01234567".indexOf(e)}var u=function(){function Scanner(e,t){this.source=e;this.errorHandler=t;this.trackComment=false;this.isModule=false;this.length=e.length;this.index=0;this.lineNumber=e.length>0?1:0;this.lineStart=0;this.curlyStack=[]}Scanner.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}};Scanner.prototype.restoreState=function(e){this.index=e.index;this.lineNumber=e.lineNumber;this.lineStart=e.lineStart};Scanner.prototype.eof=function(){return this.index>=this.length};Scanner.prototype.throwUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.tolerateUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.skipSingleLineComment=function(e){var t=[];var r,i;if(this.trackComment){t=[];r=this.index-e;i={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}}}while(!this.eof()){var a=this.source.charCodeAt(this.index);++this.index;if(n.Character.isLineTerminator(a)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var u={multiLine:false,slice:[r+e,this.index-1],range:[r,this.index-1],loc:i};t.push(u)}if(a===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;return t}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:false,slice:[r+e,this.index],range:[r,this.index],loc:i};t.push(u)}return t};Scanner.prototype.skipMultiLineComment=function(){var e=[];var t,r;if(this.trackComment){e=[];t=this.index-2;r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}}}while(!this.eof()){var i=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(i)){if(i===13&&this.source.charCodeAt(this.index+1)===10){++this.index}++this.lineNumber;++this.index;this.lineStart=this.index}else if(i===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2;if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(a)}return e}++this.index}else{++this.index}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(a)}this.tolerateUnexpectedToken();return e};Scanner.prototype.scanComments=function(){var e;if(this.trackComment){e=[]}var t=this.index===0;while(!this.eof()){var r=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(r)){++this.index}else if(n.Character.isLineTerminator(r)){++this.index;if(r===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;t=true}else if(r===47){r=this.source.charCodeAt(this.index+1);if(r===47){this.index+=2;var i=this.skipSingleLineComment(2);if(this.trackComment){e=e.concat(i)}t=true}else if(r===42){this.index+=2;var i=this.skipMultiLineComment();if(this.trackComment){e=e.concat(i)}}else{break}}else if(t&&r===45){if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var i=this.skipSingleLineComment(3);if(this.trackComment){e=e.concat(i)}}else{break}}else if(r===60&&!this.isModule){if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var i=this.skipSingleLineComment(4);if(this.trackComment){e=e.concat(i)}}else{break}}else{break}}return e};Scanner.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return true;default:return false}};Scanner.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}};Scanner.prototype.isRestrictedWord=function(e){return e==="eval"||e==="arguments"};Scanner.prototype.isKeyword=function(e){switch(e.length){case 2:return e==="if"||e==="in"||e==="do";case 3:return e==="var"||e==="for"||e==="new"||e==="try"||e==="let";case 4:return e==="this"||e==="else"||e==="case"||e==="void"||e==="with"||e==="enum";case 5:return e==="while"||e==="break"||e==="catch"||e==="throw"||e==="const"||e==="yield"||e==="class"||e==="super";case 6:return e==="return"||e==="typeof"||e==="delete"||e==="switch"||e==="export"||e==="import";case 7:return e==="default"||e==="finally"||e==="extends";case 8:return e==="function"||e==="continue"||e==="debugger";case 10:return e==="instanceof";default:return false}};Scanner.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){var i=t;t=(i-55296)*1024+r-56320+65536}}return t};Scanner.prototype.scanHexEscape=function(e){var t=e==="u"?4:2;var r=0;for(var i=0;i1114111||e!=="}"){this.throwUnexpectedToken()}return n.Character.fromCodePoint(t)};Scanner.prototype.getIdentifier=function(){var e=this.index++;while(!this.eof()){var t=this.source.charCodeAt(this.index);if(t===92){this.index=e;return this.getComplexIdentifier()}else if(t>=55296&&t<57343){this.index=e;return this.getComplexIdentifier()}if(n.Character.isIdentifierPart(t)){++this.index}else{break}}return this.source.slice(e,this.index)};Scanner.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index);var t=n.Character.fromCodePoint(e);this.index+=t.length;var r;if(e===92){if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierStart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t=r}while(!this.eof()){e=this.codePointAt(this.index);if(!n.Character.isIdentifierPart(e)){break}r=n.Character.fromCodePoint(e);t+=r;this.index+=r.length;if(e===92){t=t.substr(0,t.length-1);if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierPart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t+=r}}return t};Scanner.prototype.octalToDecimal=function(e){var t=e!=="0";var r=octalValue(e);if(!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){t=true;r=r*8+octalValue(this.source[this.index++]);if("0123".indexOf(e)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){r=r*8+octalValue(this.source[this.index++])}}return{code:r,octal:t}};Scanner.prototype.scanIdentifier=function(){var e;var t=this.index;var r=this.source.charCodeAt(t)===92?this.getComplexIdentifier():this.getIdentifier();if(r.length===1){e=3}else if(this.isKeyword(r)){e=4}else if(r==="null"){e=5}else if(r==="true"||r==="false"){e=1}else{e=3}if(e!==3&&t+r.length!==this.index){var i=this.index;this.index=t;this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord);this.index=i}return{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanPunctuator=function(){var e=this.index;var t=this.source[this.index];switch(t){case"(":case"{":if(t==="{"){this.curlyStack.push("{")}++this.index;break;case".":++this.index;if(this.source[this.index]==="."&&this.source[this.index+1]==="."){this.index+=2;t="..."}break;case"}":++this.index;this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4);if(t===">>>="){this.index+=4}else{t=t.substr(0,3);if(t==="==="||t==="!=="||t===">>>"||t==="<<="||t===">>="||t==="**="){this.index+=3}else{t=t.substr(0,2);if(t==="&&"||t==="||"||t==="=="||t==="!="||t==="+="||t==="-="||t==="*="||t==="/="||t==="++"||t==="--"||t==="<<"||t===">>"||t==="&="||t==="|="||t==="^="||t==="%="||t==="<="||t===">="||t==="=>"||t==="**"){this.index+=2}else{t=this.source[this.index];if("<>=!+-*%&|^/".indexOf(t)>=0){++this.index}}}}}if(this.index===e){this.throwUnexpectedToken()}return{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanHexLiteral=function(e){var t="";while(!this.eof()){if(!n.Character.isHexDigit(this.source.charCodeAt(this.index))){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanBinaryLiteral=function(e){var t="";var r;while(!this.eof()){r=this.source[this.index];if(r!=="0"&&r!=="1"){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(!this.eof()){r=this.source.charCodeAt(this.index);if(n.Character.isIdentifierStart(r)||n.Character.isDecimalDigit(r)){this.throwUnexpectedToken()}}return{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanOctalLiteral=function(e,t){var r="";var i=false;if(n.Character.isOctalDigit(e.charCodeAt(0))){i=true;r="0"+this.source[this.index++]}else{++this.index}while(!this.eof()){if(!n.Character.isOctalDigit(this.source.charCodeAt(this.index))){break}r+=this.source[this.index++]}if(!i&&r.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt(r,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0){i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,i){var u=parseInt(t||i,16);if(u>1114111){n.throwUnexpectedToken(a.Messages.InvalidRegExp)}if(u<=65535){return String.fromCharCode(u)}return r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r)}try{RegExp(i)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}};Scanner.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert(e==="/","Regular expression literal must start with a slash");var t=this.source[this.index++];var r=false;var u=false;while(!this.eof()){e=this.source[this.index++];t+=e;if(e==="\\"){e=this.source[this.index++];if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}t+=e}else if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}else if(r){if(e==="]"){r=false}}else{if(e==="/"){u=true;break}else if(e==="["){r=true}}}if(!u){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}return t.substr(1,t.length-2)};Scanner.prototype.scanRegExpFlags=function(){var e="";var t="";while(!this.eof()){var r=this.source[this.index];if(!n.Character.isIdentifierPart(r.charCodeAt(0))){break}++this.index;if(r==="\\"&&!this.eof()){r=this.source[this.index];if(r==="u"){++this.index;var i=this.index;var a=this.scanHexEscape("u");if(a!==null){t+=a;for(e+="\\u";i=55296&&e<57343){if(n.Character.isIdentifierStart(this.codePointAt(this.index))){return this.scanIdentifier()}}return this.scanPunctuator()};return Scanner}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TokenName={};t.TokenName[1]="Boolean";t.TokenName[2]="";t.TokenName[3]="Identifier";t.TokenName[4]="Keyword";t.TokenName[5]="Null";t.TokenName[6]="Numeric";t.TokenName[7]="Punctuator";t.TokenName[8]="String";t.TokenName[9]="RegularExpression";t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(10);var n=r(12);var a=r(13);var u=function(){function Reader(){this.values=[];this.curly=this.paren=-1}Reader.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0};Reader.prototype.isRegexStart=function(){var e=this.values[this.values.length-1];var t=e!==null;switch(e){case"this":case"]":t=false;break;case")":var r=this.values[this.paren-1];t=r==="if"||r==="while"||r==="for"||r==="with";break;case"}":t=false;if(this.values[this.curly-3]==="function"){var i=this.values[this.curly-4];t=i?!this.beforeFunctionExpression(i):false}else if(this.values[this.curly-4]==="function"){var i=this.values[this.curly-5];t=i?!this.beforeFunctionExpression(i):true}break;default:break}return t};Reader.prototype.push=function(e){if(e.type===7||e.type===4){if(e.value==="{"){this.curly=this.values.length}else if(e.value==="("){this.paren=this.values.length}this.values.push(e.value)}else{this.values.push(null)}};return Reader}();var s=function(){function Tokenizer(e,t){this.errorHandler=new i.ErrorHandler;this.errorHandler.tolerant=t?typeof t.tolerant==="boolean"&&t.tolerant:false;this.scanner=new n.Scanner(e,this.errorHandler);this.scanner.trackComment=t?typeof t.comment==="boolean"&&t.comment:false;this.trackRange=t?typeof t.range==="boolean"&&t.range:false;this.trackLoc=t?typeof t.loc==="boolean"&&t.loc:false;this.buffer=[];this.reader=new u}Tokenizer.prototype.errors=function(){return this.errorHandler.errors};Tokenizer.prototype.getNextToken=function(){if(this.buffer.length===0){var e=this.scanner.scanComments();if(this.scanner.trackComment){for(var t=0;tt){if(e.charAt(r-1)!==" "){break}r--}return r}},,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:stringify");var n=r(928);var a=r(212);e.exports=stringify;function stringify(e,t){var r=e.processor;var u=e.tree;var s;if(n(t).fatal){i("Not compiling failed document");return}if(!e.output&&!e.out&&!e.alwaysStringify){i("Not compiling document without output settings");return}i("Compiling `%s`",t.path);if(e.inspect){if(t.path){t.extname=".txt"}s=a[e.color?"color":"noColor"](u)+"\n"}else if(e.treeOut){if(t.path){t.extname=".json"}s=JSON.stringify(u,null,2)+"\n"}else{s=r.stringify(u,t)}t.contents=s;i("Compiled document")}},,,function(e,t,r){"use strict";const i=r(624);e.exports=(e=>typeof e==="string"?e.replace(i(),""):e)},,function(e,t,r){"use strict";var i=r(260);function Mark(e,t,r,i,n){this.name=e;this.buffer=t;this.position=r;this.line=i;this.column=n}Mark.prototype.getSnippet=function getSnippet(e,t){var r,n,a,u,s;if(!this.buffer)return null;e=e||4;t=t||75;r="";n=this.position;while(n>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(n-1))===-1){n-=1;if(this.position-n>t/2-1){r=" ... ";n+=5;break}}a="";u=this.position;while(ut/2-1){a=" ... ";u-=5;break}}s=this.buffer.slice(n,u);return i.repeat(" ",e)+r+s+a+"\n"+i.repeat(" ",e+this.position-n+r.length)+"^"};Mark.prototype.toString=function toString(e){var t,r="";if(this.name){r+='in "'+this.name+'" '}r+="at line "+(this.line+1)+", column "+(this.column+1);if(!e){t=this.getSnippet();if(t){r+=":\n"+t}}return r};e.exports=Mark},function(e,t,r){var i=r(148);var n=function(){};var a=r(405);e.exports=wrapped;function wrapped(e){function wrap(){var t=i(arguments);var r=t[t.length-1];var u=this;var s=typeof r=="function"?t.pop():n;if(!e){return s.apply(u,[null].concat(t))}if(generator(e)){return a(e).apply(u,t.concat(s))}if(e.length>t.length){try{return e.apply(u,t.concat(s))}catch(e){return s(e)}}return sync(e,s).apply(u,t)}return wrap}function sync(e,t){return function(){var r;try{r=e.apply(this,arguments)}catch(e){return t(e)}if(promise(r)){r.then(function(e){t(null,e)},t)}else{r instanceof Error?t(r):t(null,r)}}}function generator(e){return e&&e.constructor&&"GeneratorFunction"==e.constructor.name}function promise(e){return e&&"function"==typeof e.then}},,,,,,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:no-file-name-articles",noFileNameArticles);function noFileNameArticles(e,t){var r=t.stem&&t.stem.match(/^(the|teh|an?)\b/i);if(r){t.message("Do not start file names with `"+r[0]+"`")}}},,,function(e,t,r){"use strict";var i=r(171);e.exports=newline;var n="\n";function newline(e,t,r){var a=t.charAt(0);var u;var s;var o;var l;if(a!==n){return}if(r){return true}l=1;u=t.length;s=a;o="";while(l{if(typeof e!=="string"||e.length===0){return 0}e=i(e);let t=0;for(let r=0;r=127&&i<=159){continue}if(i>=768&&i<=879){continue}if(i>65535){r++}t+=n(i)?2:1}return t})},,,,function(e){e.exports=require("stream")},,,,function(e){"use strict";e.exports=function isObject(e){return typeof e==="object"&&e!==null}},,function(e,t,r){"use strict";e.exports={position:true,gfm:true,commonmark:false,footnotes:false,pedantic:false,blocks:r(676)}},,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var t,r,i,a,u,s=e;u=new Array(s.length);for(t=0,r=s.length;t=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}else if(t.indexOf(":")>=0){t.split(":").forEach(function(e){n.unshift(parseFloat(e,10))});t=0;i=1;n.forEach(function(e){t+=e*i;i*=60});return r*t}return r*parseFloat(t,10)}var u=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(i.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return u.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||i.isNegativeZero(e))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},,function(e,t,r){"use strict";const i=r(947);e.exports=((e,t,r)=>{if(typeof t==="number"){r=t}if(i.has(e.toLowerCase())){t=i.get(e.toLowerCase());const r=e.charAt(0);const n=r===r.toUpperCase();if(n){t=r.toUpperCase()+t.slice(1)}const a=e===e.toUpperCase();if(a){t=t.toUpperCase()}}else if(typeof t!=="string"){t=(e.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,t=>{const r=e.slice(-1)===e.slice(-1).toLowerCase();return r?t.toLowerCase():t.toUpperCase()})}return Math.abs(r)===1?e:t})},function(e,t,r){"use strict";var i=r(814);e.exports=pad;var n="\n";var a=" ";var u=4;function pad(e,t){var r=e.split(n);var s=r.length;var o=i(a,t*u);while(s--){if(r[s].length!==0){r[s]=o+r[s]}}return r.join(n)}},,,,function(e){e.exports=function(e,t){return e.replace(/(\\*)(\$([_a-z0-9]+)|\${([_a-z0-9]+)})/gi,function(e,r,i,n,a){if(!(r.length%2)){return r.substring(Math.ceil(r.length/2))+(t[n||a]||"")}else{return r.substring(1)+i}})}},,,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var t,r=e;for(t in r){if(n.call(r,t)){if(r[t]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},function(e){if(typeof Object.create==="function"){e.exports=function inherits(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}else{e.exports=function inherits(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}},,,,,function(e){var t=Object.prototype.toString;var r=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return t.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,t,i){t>>>=0;var n=e.byteLength-t;if(n<0){throw new RangeError("'offset' is out of bounds")}if(i===undefined){i=n}else{i>>>=0;if(i>n){throw new RangeError("'length' is out of bounds")}}return r?Buffer.from(e.slice(t,t+i)):new Buffer(new Uint8Array(e.slice(t,t+i)))}function fromString(e,t){if(typeof t!=="string"||t===""){t="utf8"}if(!Buffer.isEncoding(t)){throw new TypeError('"encoding" must be a valid string encoding')}return r?Buffer.from(e,t):new Buffer(e,t)}function bufferFrom(e,t,i){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,t,i)}if(typeof e==="string"){return fromString(e,t)}return r?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},,function(e){e.exports={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t,r){const i=r(287);const n=r(809);const a={parse:i,stringify:n};e.exports=a},,function(e){"use strict";e.exports=interrupt;function interrupt(e,t,r,i){var n=e.length;var a=-1;var u;var s;while(++a>0},ToUint32:function(e){return e>>>0}}}();var u=Math.LN2,s=Math.abs,o=Math.floor,l=Math.log,f=Math.min,c=Math.pow,h=Math.round;function configureProperties(e){if(v&&p){var t=v(e),r;for(r=0;rn)throw new RangeError("Array too large for polyfill");function makeArrayAccessor(t){p(e,t,{get:function(){return e._getter(t)},set:function(r){e._setter(t,r)},enumerable:true,configurable:false})}var t;for(t=0;t>r}function as_unsigned(e,t){var r=32-t;return e<>>r}function packI8(e){return[e&255]}function unpackI8(e){return as_signed(e[0],8)}function packU8(e){return[e&255]}function unpackU8(e){return as_unsigned(e[0],8)}function packU8Clamped(e){e=h(Number(e));return[e<0?0:e>255?255:e&255]}function packI16(e){return[e>>8&255,e&255]}function unpackI16(e){return as_signed(e[0]<<8|e[1],16)}function packU16(e){return[e>>8&255,e&255]}function unpackU16(e){return as_unsigned(e[0]<<8|e[1],16)}function packI32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackI32(e){return as_signed(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packU32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackU32(e){return as_unsigned(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packIEEE754(e,t,r){var i=(1<.5)return t+1;return t%2?t+1:t}if(e!==e){a=(1<=c(2,1-i)){a=f(o(l(e)/u),1023);h=roundToEven(e/c(2,a)*c(2,r));if(h/c(2,r)>=2){a=a+1;h=1}if(a>i){a=(1<>1}}i.reverse();s=i.join("");o=(1<0){return l*c(2,f-o)*(1+h/c(2,r))}else if(h!==0){return l*c(2,-(o-1))*(h/c(2,r))}else{return l<0?-0:0}}function unpackF64(e){return unpackIEEE754(e,11,52)}function packF64(e){return packIEEE754(e,11,52)}function unpackF32(e){return unpackIEEE754(e,8,23)}function packF32(e){return packIEEE754(e,8,23)}(function(){var e=function ArrayBuffer(e){e=a.ToInt32(e);if(e<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=e;this._bytes=[];this._bytes.length=e;var t;for(t=0;tthis.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(this.byteOffset%this.BYTES_PER_ELEMENT){throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset;if(this.byteLength%this.BYTES_PER_ELEMENT){throw new RangeError("length of buffer minus byteOffset not a multiple of the element size")}this.length=this.byteLength/this.BYTES_PER_ELEMENT}else{this.length=a.ToUint32(i);this.byteLength=this.length*this.BYTES_PER_ELEMENT}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}}else{throw new TypeError("Unexpected argument type(s)")}this.constructor=s;configureProperties(this);makeArrayAccessors(this)};s.prototype=new r;s.prototype.BYTES_PER_ELEMENT=t;s.prototype._pack=n;s.prototype._unpack=u;s.BYTES_PER_ELEMENT=t;s.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");e=a.ToUint32(e);if(e>=this.length){return i}var t=[],r,n;for(r=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;r=this.length){return i}var r=this._pack(t),n,u;for(n=0,u=this.byteOffset+e*this.BYTES_PER_ELEMENT;nthis.length){throw new RangeError("Offset plus length of array is out of range")}f=this.byteOffset+n*this.BYTES_PER_ELEMENT;c=r.length*this.BYTES_PER_ELEMENT;if(r.buffer===this.buffer){h=[];for(s=0,o=r.byteOffset;sthis.length){throw new RangeError("Offset plus length of array is out of range")}for(s=0;sr?r:e}e=a.ToInt32(e);t=a.ToInt32(t);if(arguments.length<1){e=0}if(arguments.length<2){t=this.length}if(e<0){e=this.length+e}if(t<0){t=this.length+t}e=clamp(e,0,this.length);t=clamp(t,0,this.length);var r=t-e;if(r<0){r=0}return new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,r)};return s}var n=makeConstructor(1,packI8,unpackI8);var u=makeConstructor(1,packU8,unpackU8);var s=makeConstructor(1,packU8Clamped,unpackU8);var o=makeConstructor(2,packI16,unpackI16);var l=makeConstructor(2,packU16,unpackU16);var f=makeConstructor(4,packI32,unpackI32);var c=makeConstructor(4,packU32,unpackU32);var h=makeConstructor(4,packF32,unpackF32);var p=makeConstructor(8,packF64,unpackF64);t.Int8Array=t.Int8Array||n;t.Uint8Array=t.Uint8Array||u;t.Uint8ClampedArray=t.Uint8ClampedArray||s;t.Int16Array=t.Int16Array||o;t.Uint16Array=t.Uint16Array||l;t.Int32Array=t.Int32Array||f;t.Uint32Array=t.Uint32Array||c;t.Float32Array=t.Float32Array||h;t.Float64Array=t.Float64Array||p})();(function(){function r(e,t){return a.IsCallable(e.get)?e.get(t):e[t]}var e=function(){var e=new t.Uint16Array([4660]),i=new t.Uint8Array(e.buffer);return r(i,0)===18}();var i=function DataView(e,r,i){if(arguments.length===0){e=new t.ArrayBuffer(0)}else if(!(e instanceof t.ArrayBuffer||a.Class(e)==="ArrayBuffer")){throw new TypeError("TypeError")}this.buffer=e||new t.ArrayBuffer(0);this.byteOffset=a.ToUint32(r);if(this.byteOffset>this.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset}else{this.byteLength=a.ToUint32(i)}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}configureProperties(this)};function makeGetter(i){return function(n,u){n=a.ToUint32(n);if(n+i.BYTES_PER_ELEMENT>this.byteLength){throw new RangeError("Array index out of range")}n+=this.byteOffset;var s=new t.Uint8Array(this.buffer,n,i.BYTES_PER_ELEMENT),o=[],l;for(l=0;lthis.byteLength){throw new RangeError("Array index out of range")}var o=new i([u]),l=new t.Uint8Array(o.buffer),f=[],c,h;for(c=0;c=e.length?e.length:n+r;t.message+=` while parsing near '${i===0?"":"..."}${e.slice(i,a)}${a===e.length?"":"..."}'`}else{t.message+=` while parsing '${e.slice(0,r*2)}'`}throw t}}},,function(e){"use strict";e.exports=function isArrayish(e){if(!e){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&e.splice instanceof Function}},,,function(e){"use strict";e.exports=strikethrough;var t="~";var r=t+t;function strikethrough(e){return r+this.all(e).join("")+r}},,function(e,t,r){"use strict";var i=r(495);var n=r(704);var a=r(682);var u=r(839);var s=r(526);e.exports=i("remark-lint:no-heading-indent",noHeadingIndent);var o=u.start;function noHeadingIndent(e,t){var r=String(t);var i=r.length;a(e,"heading",visitor);function visitor(e){var a;var u;var l;var f;var c;if(s(e)){return}a=o(e);u=a.offset;l=u-1;while(++l-1&&r.charAt(i)!=="\n"){t.message("Missing newline character at end of file")}}},,,function(e,t,r){"use strict";var i=r(171);var n=r(111);e.exports=strikethrough;strikethrough.locator=n;var a="~";var u="~~";function strikethrough(e,t,r){var n=this;var s="";var o="";var l="";var f="";var c;var h;var p;if(!n.options.gfm||t.charAt(0)!==a||t.charAt(1)!==a||i(t.charAt(2))){return}c=1;h=t.length;p=e.now();p.column+=2;p.offset+=2;while(++c?@[\\\]^`{|}~_]/;function copy(e,t){var r=e.length;var u=t.length;var s=[];var o=0;var l=0;var f;while(l0){r=Math.min(10,Math.floor(r));o=" ".substr(0,r)}}else if(typeof r==="string"){o=r.substr(0,10)}return serializeProperty("",{"":e});function serializeProperty(e,t){let r=t[e];if(r!=null){if(typeof r.toJSON5==="function"){r=r.toJSON5(e)}else if(typeof r.toJSON==="function"){r=r.toJSON(e)}}if(s){r=s.call(t,e,r)}if(r instanceof Number){r=Number(r)}else if(r instanceof String){r=String(r)}else if(r instanceof Boolean){r=r.valueOf()}switch(r){case null:return"null";case true:return"true";case false:return"false"}if(typeof r==="string"){return quoteString(r,false)}if(typeof r==="number"){return String(r)}if(typeof r==="object"){return Array.isArray(r)?serializeArray(r):serializeObject(r)}return undefined}function quoteString(e){const t={"'":.1,'"':.2};const r={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let i="";for(const n of e){switch(n){case"'":case'"':t[n]++;i+=n;continue}if(r[n]){i+=r[n];continue}if(n<" "){let e=n.charCodeAt(0).toString(16);i+="\\x"+("00"+e).substring(e.length);continue}i+=n}const n=l||Object.keys(t).reduce((e,r)=>t[e]=0){throw TypeError("Converting circular structure to JSON5")}n.push(e);let t=a;a=a+o;let r=u||Object.keys(e);let i=[];for(const t of r){const r=serializeProperty(t,e);if(r!==undefined){let e=serializeKey(t)+":";if(o!==""){e+=" "}e+=r;i.push(e)}}let s;if(i.length===0){s="{}"}else{let e;if(o===""){e=i.join(",");s="{"+e+"}"}else{let r=",\n"+a;e=i.join(r);s="{\n"+a+e+",\n"+t+"}"}}n.pop();a=t;return s}function serializeKey(e){if(e.length===0){return quoteString(e,true)}const t=String.fromCodePoint(e.codePointAt(0));if(!i.isIdStartChar(t)){return quoteString(e,true)}for(let r=t.length;r=0){throw TypeError("Converting circular structure to JSON5")}n.push(e);let t=a;a=a+o;let r=[];for(let t=0;t=n){return t.substr(0,n)}while(n>t.length&&i>1){if(i&1){t+=e}i>>=1;e+=e}t+=e;t=t.substr(0,n);return t}},,function(e,t,r){"use strict";var i=r(495);var n=r(839);var a=r(526);var u=r(135);var s=r(682);e.exports=i("remark-lint:no-duplicate-definitions",noDuplicateDefinitions);var o="Do not use definitions with the same identifier";function noDuplicateDefinitions(e,t){var r={};s(e,["definition","footnoteDefinition"],validate);function validate(e){var i;var s;if(!a(e)){i=e.identifier;s=r[i];if(s&&s.type){t.message(o+" ("+u(n.start(s))+")",e)}r[i]=e}}}},function(e){"use strict";e.exports=is;function is(e,t,r,i,n){var a=i!==null&&i!==undefined;var u=r!==null&&r!==undefined;var s=convert(e);if(u&&(typeof r!=="number"||r<0||r===Infinity)){throw new Error("Expected positive finite index or child node")}if(a&&(!is(null,i)||!i.children)){throw new Error("Expected parent node")}if(!t||!t.type||typeof t.type!=="string"){return false}if(a!==u){throw new Error("Expected both parent and index")}return Boolean(s.call(n,t,r,i))}function convert(e){if(typeof e==="string"){return typeFactory(e)}if(e===null||e===undefined){return ok}if(typeof e==="object"){return("length"in e?anyFactory:matchesFactory)(e)}if(typeof e==="function"){return e}throw new Error("Expected function, string, or object as test")}function convertAll(e){var t=[];var r=e.length;var i=-1;while(++i=u){v--;break}d+=g}D="";m="";while(++v{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const i=t.indexOf(r+e);const n=t.indexOf("--");return i!==-1&&(n===-1?true:ie[r])e[r]=i});return e},[]);var u=map(e,function(e){return map(e,function(e,t){var r=String(e);if(i[t]==="."){var u=dotindex(r);var s=a[t]+(/\./.test(r)?1:2)-(n(r)-u);return r+Array(s).join(" ")}else return r})});var s=reduce(u,function(e,t){forEach(t,function(t,r){var i=n(t);if(!e[r]||i>e[r])e[r]=i});return e},[]);return map(u,function(e){return map(e,function(e,t){var r=s[t]-n(e)||0;var a=Array(Math.max(r+1,1)).join(" ");if(i[t]==="r"||i[t]==="."){return a+e}if(i[t]==="c"){return Array(Math.ceil(r/2+1)).join(" ")+e+Array(Math.floor(r/2+1)).join(" ")}return e+a}).join(r).replace(/\s+$/,"")}).join("\n")};function dotindex(e){var t=/\.[^.]*$/.exec(e);return t?t.index+1:e.length}function reduce(e,t,r){if(e.reduce)return e.reduce(t,r);var i=0;var n=arguments.length>=3?r:e[i++];for(;ir&&a0?"add":"remove")+" "+Math.abs(h)+" "+n("space",h);t.message(p,s)}}}}},,,,,function(e,t,r){"use strict";var i=r(721);e.exports=decodeEntity;var n={}.hasOwnProperty;function decodeEntity(e){return n.call(i,e)?i[e]:false}},,function(e,t,r){"use strict";var i=r(336);var n=r(780);e.exports=unherit;function unherit(e){var t;var r;var a;n(Of,e);n(From,Of);t=Of.prototype;for(r in t){a=t[r];if(a&&typeof a==="object"){t[r]="concat"in a?a.concat():i(a)}}return Of;function From(t){return e.apply(this,t)}function Of(){if(!(this instanceof Of)){return new From(arguments)}return e.apply(this,arguments)}}},function(e){"use strict";const t=e=>{let t=false;let r=false;let i=false;for(let n=0;n{if(!(typeof e==="string"||Array.isArray(e))){throw new TypeError("Expected the input to be `string | string[]`")}r=Object.assign({pascalCase:false},r);const i=e=>r.pascalCase?e.charAt(0).toUpperCase()+e.slice(1):e;if(Array.isArray(e)){e=e.map(e=>e.trim()).filter(e=>e.length).join("-")}else{e=e.trim()}if(e.length===0){return""}if(e.length===1){return r.pascalCase?e.toUpperCase():e.toLowerCase()}const n=e!==e.toLowerCase();if(n){e=t(e)}e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,t)=>t.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase());return i(e)};e.exports=r;e.exports.default=r},,function(e,t,r){"use strict";var i=r(211);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},function(e){"use strict";e.exports={gfm:true,commonmark:false,pedantic:false,entities:"false",setext:false,closeAtx:false,looseTable:false,spacedTable:true,paddedTable:true,stringLength:stringLength,incrementListMarker:true,fences:false,fence:"`",bullet:"-",listItemIndent:"tab",rule:"*",ruleSpaces:true,ruleRepetition:3,strong:"*",emphasis:"_"};function stringLength(e){return e.length}},function(e,t,r){"use strict";var i=r(197);var n=r(520);var a=r(439);var u=r(25);var s=r(908);var o=r(895);e.exports=parseEntities;var l={}.hasOwnProperty;var f=String.fromCharCode;var c=Function.prototype;var h={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:false,nonTerminated:true};var p="named";var v="hexadecimal";var d="decimal";var D={};D[v]=16;D[d]=10;var m={};m[p]=s;m[d]=a;m[v]=u;var g=1;var E=2;var A=3;var C=4;var y=5;var w=6;var x=7;var b={};b[g]="Named character references must be terminated by a semicolon";b[E]="Numeric character references must be terminated by a semicolon";b[A]="Named character references cannot be empty";b[C]="Numeric character references cannot be empty";b[y]="Named character references must be known";b[w]="Numeric character references cannot be disallowed";b[x]="Numeric character references cannot be outside the permissible Unicode range";function parseEntities(e,t){var r={};var i;var n;if(!t){t={}}for(n in h){i=t[n];r[n]=i===null||i===undefined?h[n]:i}if(r.position.indent||r.position.start){r.indent=r.position.indent||[];r.position=r.position.start}return parse(e,r)}function parse(e,t){var r=t.additional;var a=t.nonTerminated;var u=t.text;var h=t.reference;var F=t.warning;var S=t.textContext;var B=t.referenceContext;var k=t.warningContext;var O=t.position;var P=t.indent||[];var T=e.length;var I=0;var M=-1;var L=O.column||1;var j=O.line||1;var R="";var U=[];var N;var J;var z;var X;var G;var q;var W;var _;var V;var Y;var H;var $;var Z;var Q;var K;var ee;var te;var re;var ie;ee=now();_=F?parseError:c;I--;T++;while(++I65535){q-=65536;Y+=f(q>>>(10&1023)|55296);q=56320|q&1023}q=Y+f(q)}}if(!q){X=e.slice(Z-1,ie);R+=X;L+=X.length;I=ie-1}else{flush();ee=now();I=ie-1;L+=ie-Z+1;U.push(q);te=now();te.offset++;if(h){h.call(B,q,{start:ee,end:te},e.slice(Z-1,ie))}ee=te}}}return U.join("");function now(){return{line:j,column:L,offset:I+(O.offset||0)}}function parseError(e,t){var r=now();r.column+=t;r.offset+=t;F.call(k,b[e],r,e)}function at(t){return e.charAt(t)}function flush(){if(R){U.push(R);if(u){u.call(S,R,{start:ee,end:now()})}R=""}}}function prohibited(e){return e>=55296&&e<=57343||e>1114111}function disallowed(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}},,,function(e,t,r){"use strict";var i=r(36);var n=r(116);var a=r(171);var u=r(82);e.exports=emphasis;emphasis.locator=u;var s="*";var o="_";var l="\\";function emphasis(e,t,r){var u=this;var f=0;var c=t.charAt(f);var h;var p;var v;var d;var D;var m;var g;if(c!==s&&c!==o){return}p=u.options.pedantic;D=c;v=c;m=t.length;f++;d="";c="";if(p&&a(t.charAt(f))){return}while(f0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==l.prototype){t=_uint8ArrayToBuffer(t)}if(i){if(a.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,a,t,true)}else if(a.ended){e.emit("error",new Error("stream.push() after EOF"))}else{a.reading=false;if(a.decoder&&!r){t=a.decoder.write(t);if(a.objectMode||t.length!==0)addChunk(e,a,t,false);else maybeReadMore(e,a)}else{addChunk(e,a,t,false)}}}else if(!i){a.reading=false}}return needMoreData(a)}function addChunk(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=g){e=g}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){p("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){p("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var i=t.needReadable;p("need readable",i);if(t.length===0||t.length-e0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){p("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)i.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){p("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;i.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length1&&indexOf(n.pipes,e)!==-1)&&!l){p("false write response, pause",r._readableState.awaitDrain);r._readableState.awaitDrain++;f=true}r.pause()}}function onerror(t){p("onerror",t);unpipe();e.removeListener("error",onerror);if(s(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){p("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){p("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!n.flowing){p("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var i=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var a=0;a=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.head.data;else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=fromListPartial(e,t.buffer,t.decoder)}return r}function fromListPartial(e,t,r){var i;if(ea.length?a.length:e;if(u===a.length)n+=a;else n+=a.slice(0,e);e-=u;if(e===0){if(u===a.length){++i;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=a.slice(u)}break}++i}t.length-=i;return n}function copyFromBuffer(e,t){var r=l.allocUnsafe(e);var i=t.head;var n=1;i.data.copy(r);e-=i.data.length;while(i=i.next){var a=i.data;var u=e>a.length?a.length:e;a.copy(r,r.length-e,0,u);e-=u;if(e===0){if(u===a.length){++n;if(i.next)t.head=i.next;else t.head=t.tail=null}else{t.head=i;i.data=a.slice(u)}break}++n}t.length-=n;return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;i.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var r=0,i=e.length;r=f){continue}y="";while(v=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()});var i=process.env[t];if(/^(yes|on|true|enabled)$/i.test(i)){i=true}else if(/^(no|off|false|disabled)$/i.test(i)){i=false}else if(i==="null"){i=null}else{i=Number(i)}e[r]=i;return e},{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):i.isatty(process.stderr.fd)}function formatArgs(t){var r=this.namespace,i=this.useColors;if(i){var n=this.color;var a="[3"+(n<8?n:"8;5;"+n);var u=" ".concat(a,";1m").concat(r," ");t[0]=u+t[0].split("\n").join("\n"+u);t.push(a+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(){return process.stderr.write(n.format.apply(n,arguments)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};var r=Object.keys(t.inspectOpts);for(var i=0;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},,,function(e){"use strict";e.exports=locate;function locate(e,t){var r=e.indexOf("[",t);var i=e.indexOf("![",t);if(i===-1){return r}return r Date: Sun, 7 Jul 2019 22:15:01 -0700 Subject: [PATCH 061/162] doc: edit stream module introduction Edit the stream module introduction for concision and simplicity. PR-URL: https://github.com/nodejs/node/pull/28595 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Yongsheng Zhang Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- doc/api/stream.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 471a0cdda49942..6f43d83fc31fa4 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -5,8 +5,7 @@ > Stability: 2 - Stable A stream is an abstract interface for working with streaming data in Node.js. -The `stream` module provides a base API that makes it easy to build objects -that implement the stream interface. +The `stream` module provides an API for implementing the stream interface. There are many stream objects provided by Node.js. For instance, a [request to an HTTP server][http-incoming-message] and [`process.stdout`][] @@ -15,16 +14,14 @@ are both stream instances. Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`][]. -The `stream` module can be accessed using: +To access the `stream` module: ```js const stream = require('stream'); ``` -While it is important to understand how streams work, the `stream` module itself -is most useful for developers that are creating new types of stream instances. -Developers who are primarily *consuming* stream objects will rarely need to use -the `stream` module directly. +The `stream` module is useful for creating new types of stream instances. It is +usually not necessary to use the `stream` module to consume streams. ## Organization of this Document From 871a60cd12f6d032ae36fdbd75dbc96be7e1b7bc Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 7 Jul 2019 20:56:12 +0300 Subject: [PATCH 062/162] doc: fix nits in stream.md * Unify periods and upper case in comments. * Add missing parentheses for methods. * Add missing backticks. * Fix sorting position of `writable.writableFinished` section. * Replace a one-letter variable with a more readable one. * `catch(console.log)` -> `catch(console.error)`. * Document missing `emitClose` option in `new stream.Readable()` section mentioned in https://nodejs.org/api/stream.html#stream_event_close_1 and https://nodejs.org/api/stream.html#stream_readable_destroy_error copying from the `new stream.Writable()` section. Refs: https://github.com/nodejs/node/blob/36fdf1aa6c87ccfaebabb8f9c8004baab0549b0b/lib/_stream_readable.js#L121 PR-URL: https://github.com/nodejs/node/pull/28591 Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott Reviewed-By: Matteo Collina Reviewed-By: Trivikram Kamat --- doc/api/stream.md | 112 +++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 55 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 6f43d83fc31fa4..4a041e63ecc703 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -115,20 +115,20 @@ 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. // If an encoding is not set, Buffer objects will be received. req.setEncoding('utf8'); - // Readable streams emit 'data' events once a listener is added + // Readable streams emit 'data' events once a listener is added. req.on('data', (chunk) => { body += chunk; }); - // The 'end' event indicates that the entire body has been received + // The 'end' event indicates that the entire body has been received. req.on('end', () => { try { const data = JSON.parse(body); @@ -250,7 +250,7 @@ function writeOneMillionTimes(writer, data, encoding, callback) { do { i--; if (i === 0) { - // last time! + // Last time! writer.write(data, encoding, callback); } else { // See if we should continue, or wait. @@ -259,8 +259,8 @@ function writeOneMillionTimes(writer, data, encoding, callback) { } } while (i > 0 && ok); if (i > 0) { - // had to stop early! - // write some more once it drains + // Had to stop early! + // Write some more once it drains. writer.once('drain', write); } } @@ -410,7 +410,7 @@ Calling the [`stream.write()`][stream-write] method after calling [`stream.end()`][stream-end] will raise an error. ```js -// Write 'hello, ' and then end with 'world!' +// Write 'hello, ' and then end with 'world!'. const fs = require('fs'); const file = fs.createWriteStream('example.txt'); file.write('hello, '); @@ -480,6 +480,15 @@ added: v11.4.0 Is `true` if it is safe to call [`writable.write()`][stream-write]. +##### writable.writableFinished + + +* {boolean} + +Is `true` if after the [`'finish'`][] event has been emitted. + ##### writable.writableHighWaterMark - -* {boolean} - -Is `true` if all data has been flushed to the underlying system. After -the [`'finish'`][] event has been emitted. - ##### writable.writableObjectMode +* {number} + This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`. @@ -513,6 +515,8 @@ the status of the `highWaterMark`. added: v12.3.0 --> +* {boolean} + Getter for the property `objectMode` of a given `Writable` stream. ##### writable.write(chunk[, encoding][, callback]) @@ -1107,6 +1111,8 @@ the status of the `highWaterMark`. added: v12.3.0 --> +* {boolean} + Getter for the property `objectMode` of a given `Readable` stream. ##### readable.resume() From 35e3f1f449d39253afe6b7075194876541948e52 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Wed, 10 Jul 2019 13:27:44 -0700 Subject: [PATCH 069/162] report: modify getReport() to return an Object It's likely that anyone using `process.report.getReport()` will be processing the return value thereafter (e.g., filtering fields or redacting secrets). This change eliminates boilerplate by calling `JSON.parse()` on the return value. Also modified the `validateContent()` and `validate()` test helpers in `test/common/report.js` to be somewhat more obvious and helpful. Of note, a report failing validation will now be easier (though still not _easy_) to read when prepended to the stack trace. - Refs: https://github.com/nodejs/diagnostics/issues/315 PR-URL: https://github.com/nodejs/node/pull/28630 Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Jiawen Geng Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott --- doc/api/process.md | 13 +++++++++---- doc/api/report.md | 11 +++++++---- lib/internal/process/report.js | 3 ++- test/addons/worker-addon/test.js | 2 +- test/common/README.md | 13 +++++++------ test/common/report.js | 26 +++++++++++++++++--------- test/report/test-report-uv-handles.js | 2 +- 7 files changed, 44 insertions(+), 26 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index 9bf2b7dc235df1..c5833e5bf44ad2 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1726,14 +1726,19 @@ added: v11.8.0 --> * `err` {Error} A custom error used for reporting the JavaScript stack. -* Returns: {string} +* Returns: {Object} -Returns a JSON-formatted diagnostic report for the running process. The report's -JavaScript stack trace is taken from `err`, if present. +Returns a JavaScript Object representation of a diagnostic report for the +running process. The report's JavaScript stack trace is taken from `err`, if +present. ```js const data = process.report.getReport(); -console.log(data); +console.log(data.header.nodeJsVersion); + +// Similar to process.report.writeReport() +const fs = require('fs'); +fs.writeFileSync(util.inspect(data), 'my-report.log', 'utf8'); ``` Additional documentation is available in the [report documentation][]. diff --git a/doc/api/report.md b/doc/api/report.md index 268caf64160a7d..08a0f602abda3a 100644 --- a/doc/api/report.md +++ b/doc/api/report.md @@ -463,12 +463,15 @@ try { // Any other code ``` -The content of the diagnostic report can be returned as a JSON-compatible object +The content of the diagnostic report can be returned as a JavaScript Object via an API call from a JavaScript application: ```js const report = process.report.getReport(); -console.log(report); +console.log(typeof report === 'object'); // true + +// Similar to process.report.writeReport() output +console.log(JSON.stringify(report, null, 2)); ``` This function takes an optional additional argument `err` - an `Error` object @@ -476,7 +479,7 @@ that will be used as the context for the JavaScript stack printed in the report. ```js const report = process.report.getReport(new Error('custom error')); -console.log(report); +console.log(typeof report === 'object'); // true ``` The API versions are useful when inspecting the runtime state from within @@ -498,7 +501,7 @@ Node.js report completed > ``` -When a report is triggered, start and end messages are issued to stderr +When a report is written, start and end messages are issued to stderr and the filename of the report is returned to the caller. The default filename includes the date, time, PID and a sequence number. The sequence number helps in associating the report dump with the runtime state if generated multiple diff --git a/lib/internal/process/report.js b/lib/internal/process/report.js index 251c32a109d55a..cc78aebbdaa358 100644 --- a/lib/internal/process/report.js +++ b/lib/internal/process/report.js @@ -5,6 +5,7 @@ const { } = require('internal/errors').codes; const { validateSignalName, validateString } = require('internal/validators'); const nr = internalBinding('report'); +const { JSON } = primordials; const report = { writeReport(file, err) { if (typeof file === 'object' && file !== null) { @@ -26,7 +27,7 @@ const report = { else if (err === null || typeof err !== 'object') throw new ERR_INVALID_ARG_TYPE('err', 'Object', err); - return nr.getReport(err.stack); + return JSON.parse(nr.getReport(err.stack)); }, get directory() { return nr.getDirectory(); diff --git a/test/addons/worker-addon/test.js b/test/addons/worker-addon/test.js index ef158e98b14469..85a5e2701609fd 100644 --- a/test/addons/worker-addon/test.js +++ b/test/addons/worker-addon/test.js @@ -31,7 +31,7 @@ switch (process.argv[2]) { } // Use process.report to figure out if we might be running under musl libc. -const glibc = JSON.parse(process.report.getReport()).header.glibcVersionRuntime; +const glibc = process.report.getReport().header.glibcVersionRuntime; assert(typeof glibc === 'string' || glibc === undefined, glibc); const libcMayBeMusl = common.isLinux && glibc === undefined; diff --git a/test/common/README.md b/test/common/README.md index 2b8f852a3b74dd..0fd03ce767265a 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -859,19 +859,20 @@ functionality. Returns an array of diagnotic report file names found in `dir`. The files should have been generated by a process whose PID matches `pid`. -### validate(report) +### validate(filepath) -* `report` [<string>] Diagnostic report file name to validate. +* `filepath` [<string>] Diagnostic report filepath to validate. Validates the schema of a diagnostic report file whose path is specified in -`report`. If the report fails validation, an exception is thrown. +`filepath`. If the report fails validation, an exception is thrown. -### validateContent(data) +### validateContent(report) -* `data` [<string>] Contents of a diagnostic report file. +* `report` [<Object|string>] JSON contents of a diagnostic report file, the +parsed Object thereof, or the result of `process.report.getReport()`. Validates the schema of a diagnostic report whose content is specified in -`data`. If the report fails validation, an exception is thrown. +`report`. If the report fails validation, an exception is thrown. ## tick Module diff --git a/test/common/report.js b/test/common/report.js index 7637e5ed956044..eda3ad4ae2471e 100644 --- a/test/common/report.js +++ b/test/common/report.js @@ -4,6 +4,7 @@ const assert = require('assert'); const fs = require('fs'); const os = require('os'); const path = require('path'); +const util = require('util'); function findReports(pid, dir) { // Default filenames are of the form @@ -21,24 +22,31 @@ function findReports(pid, dir) { return results; } -function validate(report) { - const data = fs.readFileSync(report, 'utf8'); - - validateContent(data); +function validate(filepath) { + validateContent(JSON.parse(fs.readFileSync(filepath, 'utf8'))); } -function validateContent(data) { +function validateContent(report) { + if (typeof report === 'string') { + try { + report = JSON.parse(report); + } catch { + throw new TypeError( + 'validateContent() expects a JSON string or JavaScript Object'); + } + } try { - _validateContent(data); + _validateContent(report); } catch (err) { - err.stack += `\n------\nFailing Report:\n${data}`; + try { + err.stack += util.format('\n------\nFailing Report:\n%O', report); + } catch {} throw err; } } -function _validateContent(data) { +function _validateContent(report) { const isWindows = process.platform === 'win32'; - const report = JSON.parse(data); // Verify that all sections are present as own properties of the report. const sections = ['header', 'javascriptStack', 'nativeStack', diff --git a/test/report/test-report-uv-handles.js b/test/report/test-report-uv-handles.js index 20619204325f41..4d9bb12b44ff03 100644 --- a/test/report/test-report-uv-handles.js +++ b/test/report/test-report-uv-handles.js @@ -43,7 +43,7 @@ if (process.argv[2] === 'child') { const server = http.createServer((req, res) => { req.on('end', () => { // Generate the report while the connection is active. - console.log(process.report.getReport()); + console.log(JSON.stringify(process.report.getReport(), null, 2)); child_process.kill(); res.writeHead(200, { 'Content-Type': 'text/plain' }); From c50e2359476e78853e2cd4824f9195e2a47c2e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Arboleda?= Date: Tue, 9 Jul 2019 13:44:33 -0500 Subject: [PATCH 070/162] src: replace already elevated Object, Local v8 namespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/28611 Reviewed-By: Michaël Zasso Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater --- src/async_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/async_wrap.cc b/src/async_wrap.cc index e11ce076819c6c..b7da5565a3a8b1 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -586,7 +586,7 @@ AsyncWrap::AsyncWrap(Environment* env, AsyncReset(execution_async_id, silent); } -AsyncWrap::AsyncWrap(Environment* env, v8::Local object) +AsyncWrap::AsyncWrap(Environment* env, Local object) : BaseObject(env, object), provider_type_(PROVIDER_NONE) { CHECK_GE(object->InternalFieldCount(), 1); From d34c2567c9f5167248c9f486d22d94625582cbb7 Mon Sep 17 00:00:00 2001 From: GauthamBanasandra Date: Sat, 6 Jul 2019 19:24:26 +0530 Subject: [PATCH 071/162] src, tools: replace raw ptr with smart ptr NodeMainInstance::Create will now returrn an instance of NodeMainInstance in a unique_ptr. PR-URL: https://github.com/nodejs/node/pull/28577 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott --- src/node_main_instance.cc | 6 +++--- src/node_main_instance.h | 16 ++++++++++------ tools/snapshot/snapshot_builder.cc | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/node_main_instance.cc b/src/node_main_instance.cc index f49b9fbb4d3f30..5d5a48cc36a54b 100644 --- a/src/node_main_instance.cc +++ b/src/node_main_instance.cc @@ -30,13 +30,14 @@ NodeMainInstance::NodeMainInstance(Isolate* isolate, SetIsolateUpForNode(isolate_, IsolateSettingCategories::kMisc); } -NodeMainInstance* NodeMainInstance::Create( +std::unique_ptr NodeMainInstance::Create( Isolate* isolate, uv_loop_t* event_loop, MultiIsolatePlatform* platform, const std::vector& args, const std::vector& exec_args) { - return new NodeMainInstance(isolate, event_loop, platform, args, exec_args); + return std::unique_ptr( + new NodeMainInstance(isolate, event_loop, platform, args, exec_args)); } NodeMainInstance::NodeMainInstance( @@ -81,7 +82,6 @@ NodeMainInstance::NodeMainInstance( void NodeMainInstance::Dispose() { CHECK(!owns_isolate_); platform_->DrainTasks(isolate_); - delete this; } NodeMainInstance::~NodeMainInstance() { diff --git a/src/node_main_instance.h b/src/node_main_instance.h index a971c899b81438..5bc18cb3de63c0 100644 --- a/src/node_main_instance.h +++ b/src/node_main_instance.h @@ -4,6 +4,8 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include +#include + #include "node.h" #include "util.h" #include "uv.h" @@ -22,7 +24,7 @@ class NodeMainInstance { // platform->RegisterIsolate(isolate, loop); // isolate->Initialize(...); // isolate->Enter(); - // NodeMainInstance* main_instance = + // std::unique_ptr main_instance = // NodeMainInstance::Create(isolate, loop, args, exec_args); // // When tearing it down: @@ -33,11 +35,13 @@ class NodeMainInstance { // platform->UnregisterIsolate(isolate); // // After calling Dispose() the main_instance is no longer accessible. - static NodeMainInstance* Create(v8::Isolate* isolate, - uv_loop_t* event_loop, - MultiIsolatePlatform* platform, - const std::vector& args, - const std::vector& exec_args); + static std::unique_ptr Create( + v8::Isolate* isolate, + uv_loop_t* event_loop, + MultiIsolatePlatform* platform, + const std::vector& args, + const std::vector& exec_args); + void Dispose(); // Create a main instance that owns the isolate diff --git a/tools/snapshot/snapshot_builder.cc b/tools/snapshot/snapshot_builder.cc index 8cf4cad8d0bdf0..7f409a8fcd2482 100644 --- a/tools/snapshot/snapshot_builder.cc +++ b/tools/snapshot/snapshot_builder.cc @@ -70,7 +70,7 @@ std::string SnapshotBuilder::Generate( Isolate* isolate = Isolate::Allocate(); per_process::v8_platform.Platform()->RegisterIsolate(isolate, uv_default_loop()); - NodeMainInstance* main_instance = nullptr; + std::unique_ptr main_instance; std::string result; { From d7c7023503bffa31f31988b2c7826ebe10866770 Mon Sep 17 00:00:00 2001 From: Walle Cyril Date: Wed, 19 Jun 2019 01:21:23 +0200 Subject: [PATCH 072/162] doc: add example on how to create __filename, __dirname for esm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/28282 Fixes: https://github.com/nodejs/node/issues/28114 Reviewed-By: Anna Henningsen Reviewed-By: Franziska Hinkelmann Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat Reviewed-By: Guy Bedford Reviewed-By: James M Snell Reviewed-By: Rich Trott --- doc/api/esm.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index c4edc523571336..8b7b632f1cdad7 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -278,7 +278,16 @@ These CommonJS variables are not available in ES modules. `require` can be imported into an ES module using [`module.createRequire()`][]. -An equivalent for `__filename` and `__dirname` is [`import.meta.url`][]. +An equivalent for variable `__filename` and `__dirname` can be created inside +each file with [`import.meta.url`][]. + +```js +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +``` ### No require.extensions From 29fda66ca6a75eba46a3089575a80db4a9ac762f Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 9 Jul 2019 17:11:32 -0400 Subject: [PATCH 073/162] src: simplify --debug flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Any use of --debug, --debug=, --debug-brk, or --debug-brk= now triggers an error. That means we can eliminate their aliases with --inspect counterparts and simplify the code. PR-URL: https://github.com/nodejs/node/pull/28615 Reviewed-By: Michaël Zasso Reviewed-By: Jeremiah Senkpiel --- src/node_options.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/node_options.cc b/src/node_options.cc index 8666de948b6b3a..53a4171edaa399 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -270,7 +270,9 @@ DebugOptionsParser::DebugOptionsParser() { AddAlias("--inspect=", { "--inspect-port", "--inspect" }); AddOption("--debug", "", &DebugOptions::deprecated_debug); - AddAlias("--debug=", { "--inspect-port", "--debug" }); + AddAlias("--debug=", "--debug"); + AddOption("--debug-brk", "", &DebugOptions::deprecated_debug); + AddAlias("--debug-brk=", "--debug-brk"); AddOption("--inspect-brk", "activate inspector on host:port and break at start of user script", @@ -283,10 +285,6 @@ DebugOptionsParser::DebugOptionsParser() { Implies("--inspect-brk-node", "--inspect"); AddAlias("--inspect-brk-node=", { "--inspect-port", "--inspect-brk-node" }); - AddOption("--debug-brk", "", &DebugOptions::break_first_line); - Implies("--debug-brk", "--debug"); - AddAlias("--debug-brk=", { "--inspect-port", "--debug-brk" }); - AddOption("--inspect-publish-uid", "comma separated list of destinations for inspector uid" "(default: stderr,http)", From f688122dff4f0726cd4fc89f2551b6949f86d23a Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 9 Jul 2019 18:57:17 -0400 Subject: [PATCH 074/162] doc: drop 'for more details' in deprecations The deprecations documentation links to the GitHub issue tracker in several places. This commit makes the text around those links consistent. PR-URL: https://github.com/nodejs/node/pull/28617 Reviewed-By: Franziska Hinkelmann Reviewed-By: Trivikram Kamat Reviewed-By: Jiawen Geng Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater --- doc/api/deprecations.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index cad264c6c06705..9284ec99652073 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -339,7 +339,7 @@ changes: Type: End-of-Life Calling an asynchronous function without a callback throws a `TypeError` -in Node.js 10.0.0 onwards. (See .) +in Node.js 10.0.0 onwards. See . ### DEP0014: fs.read legacy String interface @@ -1754,8 +1754,8 @@ changes: Type: End-of-Life The AsyncHooks Sensitive API was never documented and had various minor issues. -(See .) Use the `AsyncResource` -API instead. +Use the `AsyncResource` API instead. See +. ### DEP0086: Remove runInAsyncIdScope @@ -1774,8 +1774,7 @@ changes: Type: End-of-Life `runInAsyncIdScope` doesn't emit the `'before'` or `'after'` event and can thus -cause a lot of issues. See for -more details. +cause a lot of issues. See . ### DEP0089: require('assert') @@ -1937,7 +1936,7 @@ to unrecoverable errors. Use [`asyncResource.runInAsyncScope()`][] API instead which provides a much safer, and more convenient, alternative. See - for more details. +. ### DEP0099: async context-unaware node::MakeCallback C++ APIs From e0c5e7a9395042df5198fb75b13bbbbeb63f1a03 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 11 Jul 2019 09:31:30 -0400 Subject: [PATCH 075/162] readline: use named constant for surrogate checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit defines a named constant instead of using a mix of 2 ** 16 and 0x10000 throughout the code. PR-URL: https://github.com/nodejs/node/pull/28638 Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Jeremiah Senkpiel --- lib/internal/readline.js | 5 +++-- lib/readline.js | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/internal/readline.js b/lib/internal/readline.js index a5611942977df8..c3f40c4fc4b6b8 100644 --- a/lib/internal/readline.js +++ b/lib/internal/readline.js @@ -8,7 +8,7 @@ const ansi = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; /* eslint-enable no-control-regex */ - +const kUTF16SurrogateThreshold = 0x10000; // 2 ** 16 const kEscape = '\x1b'; let getStringWidth; @@ -63,7 +63,7 @@ if (internalBinding('config').hasIntl) { for (var i = 0; i < str.length; i++) { const code = str.codePointAt(i); - if (code >= 0x10000) { // surrogates + if (code >= kUTF16SurrogateThreshold) { // Surrogates. i++; } @@ -434,6 +434,7 @@ module.exports = { emitKeys, getStringWidth, isFullWidthCodePoint, + kUTF16SurrogateThreshold, stripVTControlCharacters, CSI }; diff --git a/lib/readline.js b/lib/readline.js index 2c29eafc945461..670559f82bb0f4 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -41,6 +41,7 @@ const { emitKeys, getStringWidth, isFullWidthCodePoint, + kUTF16SurrogateThreshold, stripVTControlCharacters } = require('internal/readline'); @@ -600,8 +601,8 @@ Interface.prototype._wordRight = function() { function charLengthLeft(str, i) { if (i <= 0) return 0; - if (i > 1 && str.codePointAt(i - 2) >= 2 ** 16 || - str.codePointAt(i - 1) >= 2 ** 16) { + if (i > 1 && str.codePointAt(i - 2) >= kUTF16SurrogateThreshold || + str.codePointAt(i - 1) >= kUTF16SurrogateThreshold) { return 2; } return 1; @@ -610,7 +611,7 @@ function charLengthLeft(str, i) { function charLengthAt(str, i) { if (str.length <= i) return 0; - return str.codePointAt(i) >= 2 ** 16 ? 2 : 1; + return str.codePointAt(i) >= kUTF16SurrogateThreshold ? 2 : 1; } Interface.prototype._deleteLeft = function() { @@ -728,7 +729,7 @@ Interface.prototype._getDisplayPos = function(str) { str = stripVTControlCharacters(str); for (var i = 0, len = str.length; i < len; i++) { code = str.codePointAt(i); - if (code >= 0x10000) { // surrogates + if (code >= kUTF16SurrogateThreshold) { // Surrogates. i++; } if (code === 0x0a) { // new line \n From dc734030fc8c1a0e34dc0ec20a475cb8806e4492 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 11 Jul 2019 09:52:25 -0400 Subject: [PATCH 076/162] readline: remove IIFE in SIGCONT handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes an IIFE in the readline SIGCONT handler that was previously being used to bind `this`. PR-URL: https://github.com/nodejs/node/pull/28639 Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Michaël Zasso Reviewed-By: Jeremiah Senkpiel --- lib/readline.js | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/lib/readline.js b/lib/readline.js index 670559f82bb0f4..b480a31baec7d9 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -939,22 +939,20 @@ Interface.prototype._ttyWrite = function(s, key) { if (this.listenerCount('SIGTSTP') > 0) { this.emit('SIGTSTP'); } else { - process.once('SIGCONT', (function continueProcess(self) { - return function() { - // Don't raise events if stream has already been abandoned. - if (!self.paused) { - // Stream must be paused and resumed after SIGCONT to catch - // SIGINT, SIGTSTP, and EOF. - self.pause(); - self.emit('SIGCONT'); - } - // Explicitly re-enable "raw mode" and move the cursor to - // the correct position. - // See https://github.com/joyent/node/issues/3295. - self._setRawMode(true); - self._refreshLine(); - }; - })(this)); + process.once('SIGCONT', () => { + // Don't raise events if stream has already been abandoned. + if (!this.paused) { + // Stream must be paused and resumed after SIGCONT to catch + // SIGINT, SIGTSTP, and EOF. + this.pause(); + this.emit('SIGCONT'); + } + // Explicitly re-enable "raw mode" and move the cursor to + // the correct position. + // See https://github.com/joyent/node/issues/3295. + this._setRawMode(true); + this._refreshLine(); + }); this._setRawMode(false); process.kill(process.pid, 'SIGTSTP'); } From 0383947ed7bd44fd4a80ef955ab70ef32363a634 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 11 Jul 2019 10:38:51 -0400 Subject: [PATCH 077/162] readline: simplify isFullWidthCodePoint() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The non-ICU-based isFullWidthCodePoint() can be simplified to a single `return` statement. This commit removes the extra branching logic. PR-URL: https://github.com/nodejs/node/pull/28640 Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott Reviewed-By: Michaël Zasso Reviewed-By: Jeremiah Senkpiel Reviewed-By: Benjamin Gruenbaum Reviewed-By: Tobias Nießen --- lib/internal/readline.js | 70 +++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/lib/internal/readline.js b/lib/internal/readline.js index c3f40c4fc4b6b8..c6cd13a6bd19eb 100644 --- a/lib/internal/readline.js +++ b/lib/internal/readline.js @@ -82,48 +82,38 @@ if (internalBinding('config').hasIntl) { * Unicode code point is full-width. Otherwise returns false. */ isFullWidthCodePoint = function isFullWidthCodePoint(code) { - if (!Number.isInteger(code)) { - return false; - } - // Code points are derived from: // http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt - if ( - code >= 0x1100 && ( - code <= 0x115f || // Hangul Jamo - code === 0x2329 || // LEFT-POINTING ANGLE BRACKET - code === 0x232a || // RIGHT-POINTING ANGLE BRACKET - // CJK Radicals Supplement .. Enclosed CJK Letters and Months - code >= 0x2e80 && code <= 0x3247 && code !== 0x303f || - // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - code >= 0x3250 && code <= 0x4dbf || - // CJK Unified Ideographs .. Yi Radicals - code >= 0x4e00 && code <= 0xa4c6 || - // Hangul Jamo Extended-A - code >= 0xa960 && code <= 0xa97c || - // Hangul Syllables - code >= 0xac00 && code <= 0xd7a3 || - // CJK Compatibility Ideographs - code >= 0xf900 && code <= 0xfaff || - // Vertical Forms - code >= 0xfe10 && code <= 0xfe19 || - // CJK Compatibility Forms .. Small Form Variants - code >= 0xfe30 && code <= 0xfe6b || - // Halfwidth and Fullwidth Forms - code >= 0xff01 && code <= 0xff60 || - code >= 0xffe0 && code <= 0xffe6 || - // Kana Supplement - code >= 0x1b000 && code <= 0x1b001 || - // Enclosed Ideographic Supplement - code >= 0x1f200 && code <= 0x1f251 || - // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - code >= 0x20000 && code <= 0x3fffd - ) - ) { - return true; - } - - return false; + return Number.isInteger(code) && code >= 0x1100 && ( + code <= 0x115f || // Hangul Jamo + code === 0x2329 || // LEFT-POINTING ANGLE BRACKET + code === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + code >= 0x2e80 && code <= 0x3247 && code !== 0x303f || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + code >= 0x3250 && code <= 0x4dbf || + // CJK Unified Ideographs .. Yi Radicals + code >= 0x4e00 && code <= 0xa4c6 || + // Hangul Jamo Extended-A + code >= 0xa960 && code <= 0xa97c || + // Hangul Syllables + code >= 0xac00 && code <= 0xd7a3 || + // CJK Compatibility Ideographs + code >= 0xf900 && code <= 0xfaff || + // Vertical Forms + code >= 0xfe10 && code <= 0xfe19 || + // CJK Compatibility Forms .. Small Form Variants + code >= 0xfe30 && code <= 0xfe6b || + // Halfwidth and Fullwidth Forms + code >= 0xff01 && code <= 0xff60 || + code >= 0xffe0 && code <= 0xffe6 || + // Kana Supplement + code >= 0x1b000 && code <= 0x1b001 || + // Enclosed Ideographic Supplement + code >= 0x1f200 && code <= 0x1f251 || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + code >= 0x20000 && code <= 0x3fffd + ); }; } From 3f65b91eb93ed4d1dfaf82086e5a42f0e75c3bf6 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 15 Jun 2019 10:36:51 -0700 Subject: [PATCH 078/162] doc: remove superfluous MDN link in assert.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/28246 Reviewed-By: Michaël Zasso Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Yongsheng Zhang Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater --- doc/api/assert.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/api/assert.md b/doc/api/assert.md index cc65dbcf6e379a..39d93a3d805350 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -8,9 +8,6 @@ The `assert` module provides a set of assertion functions for verifying invariants. The module provides a recommended [`strict` mode][] and a more lenient legacy mode. -For more information about the used equality comparisons see -[MDN's guide on equality comparisons and sameness][mdn-equality-guide]. - ## Class: assert.AssertionError A subclass of `Error` that indicates the failure of an assertion. All errors @@ -1289,5 +1286,4 @@ second argument. This might lead to difficult-to-spot errors. [SameValue Comparison]: https://tc39.github.io/ecma262/#sec-samevalue [Strict Equality Comparison]: https://tc39.github.io/ecma262/#sec-strict-equality-comparison [enumerable "own" properties]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties -[mdn-equality-guide]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness [prototype-spec]: https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots From 17df75f5c961bfbaddf8f18359ccc7d18092c5c2 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 11 Jul 2019 12:35:34 -0400 Subject: [PATCH 079/162] readline: expose stream API in clearScreenDown() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds an optional callback to clearScreenDown(), which is passed to the stream's write() method. It also exposes the return value of write(). PR-URL: https://github.com/nodejs/node/pull/28641 Reviewed-By: Michaël Zasso Reviewed-By: Anna Henningsen --- doc/api/readline.md | 10 +++++++++- lib/readline.js | 15 +++++++++++---- test/parallel/test-readline-csi.js | 13 ++++++++++++- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index 8f372a8473e06d..b295ace5b3f00b 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -360,12 +360,20 @@ added: v0.7.7 The `readline.clearLine()` method clears current line of given [TTY][] stream in a specified direction identified by `dir`. -## readline.clearScreenDown(stream) +## readline.clearScreenDown(stream[, callback]) * `stream` {stream.Writable} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for + the `'drain'` event to be emitted before continuing to write additional data; + otherwise `true`. The `readline.clearScreenDown()` method clears the given [TTY][] stream from the current position of the cursor down. diff --git a/lib/readline.js b/lib/readline.js index b480a31baec7d9..fe0c093a5624a7 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -30,6 +30,7 @@ const { Math, Object } = primordials; const { + ERR_INVALID_CALLBACK, ERR_INVALID_CURSOR_POS, ERR_INVALID_OPT_VALUE } = require('internal/errors').codes; @@ -1253,11 +1254,17 @@ function clearLine(stream, dir) { * clears the screen from the current position of the cursor down */ -function clearScreenDown(stream) { - if (stream === null || stream === undefined) - return; +function clearScreenDown(stream, callback) { + if (callback !== undefined && typeof callback !== 'function') + throw new ERR_INVALID_CALLBACK(callback); + + if (stream === null || stream === undefined) { + if (typeof callback === 'function') + process.nextTick(callback); + return true; + } - stream.write(kClearScreenDown); + return stream.write(kClearScreenDown, callback); } module.exports = { diff --git a/test/parallel/test-readline-csi.js b/test/parallel/test-readline-csi.js index 25d5a5eb6e79d7..c753c5d93c26ec 100644 --- a/test/parallel/test-readline-csi.js +++ b/test/parallel/test-readline-csi.js @@ -29,8 +29,19 @@ class TestWritable extends Writable { const writable = new TestWritable(); -readline.clearScreenDown(writable); +assert.strictEqual(readline.clearScreenDown(writable), true); assert.deepStrictEqual(writable.data, CSI.kClearScreenDown); +assert.strictEqual(readline.clearScreenDown(writable, common.mustCall()), true); + +// Verify that clearScreenDown() throws on invalid callback. +assert.throws(() => { + readline.clearScreenDown(writable, null); +}, /ERR_INVALID_CALLBACK/); + +// Verify that clearScreenDown() does not throw on null or undefined stream. +assert.strictEqual(readline.clearScreenDown(null, common.mustCall()), true); +assert.strictEqual(readline.clearScreenDown(undefined, common.mustCall()), + true); writable.data = ''; readline.clearLine(writable, -1); From 18c56df9281ac804ad642bd47134ae57e0a3357a Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 5 Jul 2019 13:49:40 +0200 Subject: [PATCH 080/162] path: using .relative() should not return a trailing slash Resolving a path against root with `path.relative()` should not include a trailing slash. Fixes: https://github.com/nodejs/node/issues/28549 PR-URL: https://github.com/nodejs/node/pull/28556 Reviewed-By: Rich Trott Reviewed-By: Weijia Wang Reviewed-By: Anna Henningsen Reviewed-By: Jiawen Geng Reviewed-By: Yongsheng Zhang --- lib/path.js | 15 ++++++++++----- test/parallel/test-path-relative.js | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/path.js b/lib/path.js index 2301a6ebb8321f..f7a8612933ad76 100644 --- a/lib/path.js +++ b/lib/path.js @@ -1090,11 +1090,16 @@ const posix = { // For example: from='/'; to='/foo' return to.slice(toStart + i); } - } else if (fromLen > length && - from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) { - // We get here if `to` is the exact base path for `from`. - // For example: from='/foo/bar/baz'; to='/foo/bar' - lastCommonSep = i; + } else if (fromLen > length) { + if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) { + // We get here if `to` is the exact base path for `from`. + // For example: from='/foo/bar/baz'; to='/foo/bar' + lastCommonSep = i; + } else if (i === 0) { + // We get here if `to` is the root. + // For example: from='/foo/bar'; to='/' + lastCommonSep = 0; + } } } diff --git a/test/parallel/test-path-relative.js b/test/parallel/test-path-relative.js index 599381cdccfcb9..72f862b6df764e 100644 --- a/test/parallel/test-path-relative.js +++ b/test/parallel/test-path-relative.js @@ -47,7 +47,8 @@ const relativeTests = [ ['/foo/bar/baz-quux', '/foo/bar/baz', '../baz'], ['/foo/bar/baz', '/foo/bar/baz-quux', '../baz-quux'], ['/baz-quux', '/baz', '../baz'], - ['/baz', '/baz-quux', '../baz-quux'] + ['/baz', '/baz-quux', '../baz-quux'], + ['/page1/page2/foo', '/', '../../..'] ] ] ]; From 5b5c8196c3f8dcfd216fd4fdef42fe100d9b7275 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 5 Jul 2019 14:34:25 +0200 Subject: [PATCH 081/162] path: move branch to the correct location This code branch only makes sense when i === length. Otherwise it'll already be handled. PR-URL: https://github.com/nodejs/node/pull/28556 Fixes: https://github.com/nodejs/node/issues/28549 Reviewed-By: Rich Trott Reviewed-By: Weijia Wang Reviewed-By: Anna Henningsen Reviewed-By: Jiawen Geng Reviewed-By: Yongsheng Zhang --- lib/path.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/path.js b/lib/path.js index f7a8612933ad76..e278c891482070 100644 --- a/lib/path.js +++ b/lib/path.js @@ -518,11 +518,11 @@ const win32 = { lastCommonSep = 3; } } + if (lastCommonSep === -1) + lastCommonSep = 0; } let out = ''; - if (lastCommonSep === -1) - lastCommonSep = 0; // Generate the relative path based on the path difference between `to` and // `from` for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { From 7a4062ab88747ca2367ed7b39d31b78630586a30 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 12 Jul 2019 08:57:40 -0400 Subject: [PATCH 082/162] doc: mark process.report as experimental MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Everything under process.report is experimental. This commit adds the missing stability index entries. PR-URL: https://github.com/nodejs/node/pull/28653 Reviewed-By: Richard Lau Reviewed-By: Gireesh Punathil Reviewed-By: Jeremiah Senkpiel Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Benjamin Gruenbaum Reviewed-By: Ruben Bridgewater Reviewed-By: Tobias Nießen --- doc/api/process.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/api/process.md b/doc/api/process.md index c5833e5bf44ad2..826877381ceeb8 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1684,6 +1684,8 @@ relied upon to exist. added: v11.8.0 --> +> Stability: 1 - Experimental + * {Object} `process.report` is an object whose methods are used to generate diagnostic @@ -1695,6 +1697,8 @@ reports for the current process. Additional documentation is available in the added: v11.12.0 --> +> Stability: 1 - Experimental + * {string} Directory where the report is written. The default value is the empty string, @@ -1710,6 +1714,8 @@ console.log(`Report directory is ${process.report.directory}`); added: v11.12.0 --> +> Stability: 1 - Experimental + * {string} Filename where the report is written. If set to the empty string, the output @@ -1725,6 +1731,8 @@ console.log(`Report filename is ${process.report.filename}`); added: v11.8.0 --> +> Stability: 1 - Experimental + * `err` {Error} A custom error used for reporting the JavaScript stack. * Returns: {Object} @@ -1748,6 +1756,8 @@ Additional documentation is available in the [report documentation][]. added: v11.12.0 --> +> Stability: 1 - Experimental + * {boolean} If `true`, a diagnostic report is generated on fatal errors, such as out of @@ -1762,6 +1772,8 @@ console.log(`Report on fatal error: ${process.report.reportOnFatalError}`); added: v11.12.0 --> +> Stability: 1 - Experimental + * {boolean} If `true`, a diagnostic report is generated when the process receives the @@ -1776,6 +1788,8 @@ console.log(`Report on signal: ${process.report.reportOnSignal}`); added: v11.12.0 --> +> Stability: 1 - Experimental + * {boolean} If `true`, a diagnostic report is generated on uncaught exception. @@ -1789,6 +1803,8 @@ console.log(`Report on exception: ${process.report.reportOnUncaughtException}`); added: v11.12.0 --> +> Stability: 1 - Experimental + * {string} The signal used to trigger the creation of a diagnostic report. Defaults to @@ -1803,6 +1819,8 @@ console.log(`Report signal: ${process.report.signal}`); added: v11.8.0 --> +> Stability: 1 - Experimental + * `filename` {string} Name of the file where the report is written. This should be a relative path, that will be appended to the directory specified in `process.report.directory`, or the current working directory of the Node.js From aee86940f9ca31d09389579b2b2e5fac292e192a Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Thu, 11 Jul 2019 10:05:06 -0700 Subject: [PATCH 083/162] doc: mark N-API thread-safe function stable The various TSFN APIs are marked as stable, but the TSFN heading itself is still marked as experimental. PR-URL: https://github.com/nodejs/node/pull/28643 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- doc/api/n-api.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 74019852ff292b..fe5a3961957050 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -4542,8 +4542,6 @@ NAPI_EXTERN napi_status napi_get_uv_event_loop(napi_env env, ## Asynchronous Thread-safe Function Calls -> Stability: 1 - Experimental - JavaScript functions can normally only be called from a native addon's main thread. If an addon creates additional threads, then N-API functions that require a `napi_env`, `napi_value`, or `napi_ref` must not be called from those From 03de3062817dcf826d65a0242cf50adc04255c3c Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 3 Jul 2019 12:38:05 +0200 Subject: [PATCH 084/162] zlib: do not coalesce multiple `.flush()` calls This is an approach to address the issue linked below. Previously, when `.write()` and `.flush()` calls to a zlib stream were interleaved synchronously (i.e. without waiting for these operations to finish), multiple flush calls would have been coalesced into a single flushing operation. This patch changes behaviour so that each `.flush()` all corresponds to one flushing operation on the underlying zlib resource, and the order of operations is as if the `.flush()` call were a `.write()` call. One test had to be removed because it specifically tested the previous behaviour. As a drive-by fix, this also makes sure that all flush callbacks are called. Previously, that was not the case. Fixes: https://github.com/nodejs/node/issues/28478 PR-URL: https://github.com/nodejs/node/pull/28520 Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca --- lib/zlib.js | 35 +++++++----- .../test-zlib-flush-multiple-scheduled.js | 39 ------------- .../test-zlib-flush-write-sync-interleaved.js | 57 +++++++++++++++++++ test/parallel/test-zlib-write-after-flush.js | 1 - 4 files changed, 79 insertions(+), 53 deletions(-) delete mode 100644 test/parallel/test-zlib-flush-multiple-scheduled.js create mode 100644 test/parallel/test-zlib-flush-write-sync-interleaved.js diff --git a/lib/zlib.js b/lib/zlib.js index a8a1e09a7068e1..72144cdc01db16 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -49,6 +49,8 @@ const { } = require('buffer'); const { owner_symbol } = require('internal/async_hooks').symbols; +const kFlushFlag = Symbol('kFlushFlag'); + const constants = internalBinding('constants').zlib; const { // Zlib flush levels @@ -261,7 +263,6 @@ function ZlibBase(opts, mode, handle, { flush, finishFlush, fullFlush }) { this._chunkSize = chunkSize; this._defaultFlushFlag = flush; this._finishFlushFlag = finishFlush; - this._nextFlush = -1; this._defaultFullFlushFlag = fullFlush; this.once('end', this.close); this._info = opts && opts.info; @@ -308,13 +309,16 @@ ZlibBase.prototype._flush = function(callback) { // If a flush is scheduled while another flush is still pending, a way to figure // out which one is the "stronger" flush is needed. +// This is currently only used to figure out which flush flag to use for the +// last chunk. // Roughly, the following holds: // Z_NO_FLUSH (< Z_TREES) < Z_BLOCK < Z_PARTIAL_FLUSH < // Z_SYNC_FLUSH < Z_FULL_FLUSH < Z_FINISH const flushiness = []; let i = 0; -for (const flushFlag of [Z_NO_FLUSH, Z_BLOCK, Z_PARTIAL_FLUSH, - Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH]) { +const kFlushFlagList = [Z_NO_FLUSH, Z_BLOCK, Z_PARTIAL_FLUSH, + Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH]; +for (const flushFlag of kFlushFlagList) { flushiness[flushFlag] = i++; } @@ -322,7 +326,18 @@ function maxFlush(a, b) { return flushiness[a] > flushiness[b] ? a : b; } -const flushBuffer = Buffer.alloc(0); +// Set up a list of 'special' buffers that can be written using .write() +// from the .flush() code as a way of introducing flushing operations into the +// write sequence. +const kFlushBuffers = []; +{ + const dummyArrayBuffer = new ArrayBuffer(); + for (const flushFlag of kFlushFlagList) { + kFlushBuffers[flushFlag] = Buffer.from(dummyArrayBuffer); + kFlushBuffers[flushFlag][kFlushFlag] = flushFlag; + } +} + ZlibBase.prototype.flush = function(kind, callback) { const ws = this._writableState; @@ -337,13 +352,8 @@ ZlibBase.prototype.flush = function(kind, callback) { } else if (ws.ending) { if (callback) this.once('end', callback); - } else if (this._nextFlush !== -1) { - // This means that there is a flush currently in the write queue. - // We currently coalesce this flush into the pending one. - this._nextFlush = maxFlush(this._nextFlush, kind); } else { - this._nextFlush = kind; - this.write(flushBuffer, '', callback); + this.write(kFlushBuffers[kind], '', callback); } }; @@ -361,9 +371,8 @@ ZlibBase.prototype._transform = function(chunk, encoding, cb) { var flushFlag = this._defaultFlushFlag; // We use a 'fake' zero-length chunk to carry information about flushes from // the public API to the actual stream implementation. - if (chunk === flushBuffer) { - flushFlag = this._nextFlush; - this._nextFlush = -1; + if (typeof chunk[kFlushFlag] === 'number') { + flushFlag = chunk[kFlushFlag]; } // For the last chunk, also apply `_finishFlushFlag`. diff --git a/test/parallel/test-zlib-flush-multiple-scheduled.js b/test/parallel/test-zlib-flush-multiple-scheduled.js deleted file mode 100644 index 0b752557e441bc..00000000000000 --- a/test/parallel/test-zlib-flush-multiple-scheduled.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const common = require('../common'); -const assert = require('assert'); -const zlib = require('zlib'); - -const { - Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH -} = zlib.constants; - -async function getOutput(...sequenceOfFlushes) { - const zipper = zlib.createGzip({ highWaterMark: 16384 }); - - zipper.write('A'.repeat(17000)); - for (const flush of sequenceOfFlushes) { - zipper.flush(flush); - } - - const data = []; - - return new Promise((resolve) => { - zipper.on('data', common.mustCall((d) => { - data.push(d); - if (data.length === 2) resolve(Buffer.concat(data)); - }, 2)); - }); -} - -(async function() { - assert.deepStrictEqual(await getOutput(Z_SYNC_FLUSH), - await getOutput(Z_SYNC_FLUSH, Z_PARTIAL_FLUSH)); - assert.deepStrictEqual(await getOutput(Z_SYNC_FLUSH), - await getOutput(Z_PARTIAL_FLUSH, Z_SYNC_FLUSH)); - - assert.deepStrictEqual(await getOutput(Z_FINISH), - await getOutput(Z_FULL_FLUSH, Z_FINISH)); - assert.deepStrictEqual(await getOutput(Z_FINISH), - await getOutput(Z_SYNC_FLUSH, Z_FINISH)); -})(); diff --git a/test/parallel/test-zlib-flush-write-sync-interleaved.js b/test/parallel/test-zlib-flush-write-sync-interleaved.js new file mode 100644 index 00000000000000..9fed592a34bb1b --- /dev/null +++ b/test/parallel/test-zlib-flush-write-sync-interleaved.js @@ -0,0 +1,57 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { createGzip, createGunzip, Z_PARTIAL_FLUSH } = require('zlib'); + +// Verify that .flush() behaves like .write() in terms of ordering, e.g. in +// a sequence like .write() + .flush() + .write() + .flush() each .flush() call +// only affects the data written before it. +// Refs: https://github.com/nodejs/node/issues/28478 + +const compress = createGzip(); +const decompress = createGunzip(); +decompress.setEncoding('utf8'); + +const events = []; +const compressedChunks = []; + +for (const chunk of ['abc', 'def', 'ghi']) { + compress.write(chunk, common.mustCall(() => events.push({ written: chunk }))); + compress.flush(Z_PARTIAL_FLUSH, common.mustCall(() => { + events.push('flushed'); + const chunk = compress.read(); + if (chunk !== null) + compressedChunks.push(chunk); + })); +} + +compress.end(common.mustCall(() => { + events.push('compress end'); + writeToDecompress(); +})); + +function writeToDecompress() { + // Write the compressed chunks to a decompressor, one by one, in order to + // verify that the flushes actually worked. + const chunk = compressedChunks.shift(); + if (chunk === undefined) return decompress.end(); + decompress.write(chunk, common.mustCall(() => { + events.push({ read: decompress.read() }); + writeToDecompress(); + })); +} + +process.on('exit', () => { + assert.deepStrictEqual(events, [ + { written: 'abc' }, + 'flushed', + { written: 'def' }, + 'flushed', + { written: 'ghi' }, + 'flushed', + 'compress end', + { read: 'abc' }, + { read: 'def' }, + { read: 'ghi' } + ]); +}); diff --git a/test/parallel/test-zlib-write-after-flush.js b/test/parallel/test-zlib-write-after-flush.js index 2fcae2a2139768..6edcae2e2f18bf 100644 --- a/test/parallel/test-zlib-write-after-flush.js +++ b/test/parallel/test-zlib-write-after-flush.js @@ -39,7 +39,6 @@ for (const [ createCompress, createDecompress ] of [ gunz.on('data', (c) => output += c); gunz.on('end', common.mustCall(() => { assert.strictEqual(output, input); - assert.strictEqual(gzip._nextFlush, -1); })); // Make sure that flush/write doesn't trigger an assert failure From 5c1d5958e03941b37662bbd4704ff82af565eb46 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 11 Jul 2019 00:12:02 +0200 Subject: [PATCH 085/162] src: add cleanup hook for ContextifyContext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise there’s a memory leak left by the context when the Isolate tears down without having run the weak callback. PR-URL: https://github.com/nodejs/node/pull/28631 Reviewed-By: Colin Ihrig Reviewed-By: Jeremiah Senkpiel --- src/node_contextify.cc | 13 +++++++++++++ src/node_contextify.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index c6b9dc18de9bd0..5be774fb91af0c 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -114,6 +114,19 @@ ContextifyContext::ContextifyContext( context_.Reset(env->isolate(), v8_context.ToLocalChecked()); context_.SetWeak(this, WeakCallback, WeakCallbackType::kParameter); + env->AddCleanupHook(CleanupHook, this); +} + + +ContextifyContext::~ContextifyContext() { + env()->RemoveCleanupHook(CleanupHook, this); +} + + +void ContextifyContext::CleanupHook(void* arg) { + ContextifyContext* self = static_cast(arg); + self->context_.Reset(); + delete self; } diff --git a/src/node_contextify.h b/src/node_contextify.h index d04bf9ea28efb2..288b51ef56ac11 100644 --- a/src/node_contextify.h +++ b/src/node_contextify.h @@ -22,6 +22,8 @@ class ContextifyContext { ContextifyContext(Environment* env, v8::Local sandbox_obj, const ContextOptions& options); + ~ContextifyContext(); + static void CleanupHook(void* arg); v8::MaybeLocal CreateDataWrapper(Environment* env); v8::MaybeLocal CreateV8Context(Environment* env, From c7cb70ce5ec109814544c9cb1862b273a3e5c86f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 12 Jul 2019 08:53:01 +0200 Subject: [PATCH 086/162] deps: update acorn to 6.2.0 Includes support for bigint syntax so we can remove the acorn-bigint plugin. PR-URL: https://github.com/nodejs/node/pull/28649 Reviewed-By: Ruben Bridgewater Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Yongsheng Zhang --- deps/acorn-plugins/acorn-bigint/CHANGELOG.md | 21 - deps/acorn-plugins/acorn-bigint/LICENSE | 19 - deps/acorn-plugins/acorn-bigint/README.md | 21 - deps/acorn-plugins/acorn-bigint/index.js | 59 - deps/acorn-plugins/acorn-bigint/package.json | 65 - deps/acorn/acorn-walk/CHANGELOG.md | 6 + deps/acorn/acorn-walk/README.md | 2 +- deps/acorn/acorn-walk/dist/walk.js | 864 +- deps/acorn/acorn-walk/package.json | 2 +- deps/acorn/acorn/CHANGELOG.md | 22 + deps/acorn/acorn/README.md | 11 +- deps/acorn/acorn/dist/acorn.js | 9386 +++++++++--------- deps/acorn/acorn/package.json | 2 +- lib/assert.js | 4 +- lib/internal/repl/await.js | 4 +- lib/internal/repl/utils.js | 4 +- node.gyp | 1 - tools/license-builder.sh | 2 +- 18 files changed, 5138 insertions(+), 5357 deletions(-) delete mode 100644 deps/acorn-plugins/acorn-bigint/CHANGELOG.md delete mode 100644 deps/acorn-plugins/acorn-bigint/LICENSE delete mode 100644 deps/acorn-plugins/acorn-bigint/README.md delete mode 100644 deps/acorn-plugins/acorn-bigint/index.js delete mode 100644 deps/acorn-plugins/acorn-bigint/package.json diff --git a/deps/acorn-plugins/acorn-bigint/CHANGELOG.md b/deps/acorn-plugins/acorn-bigint/CHANGELOG.md deleted file mode 100644 index 1d12d708f2cb75..00000000000000 --- a/deps/acorn-plugins/acorn-bigint/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -## 0.4.0 (2019-04-04) - -* Make compatible with acorn-numeric-separator - -## 0.3.1 (2018-10-06) - -* Fix creation of BigInt values everywhere (Thanks, Gus Caplan!) - -## 0.3.0 (2018-09-14) - -* Update to new acorn 6 interface -* Actually support creating BigInt values in AST in Chrome -* Change license to MIT - -## 0.2.0 (2017-12-20) - -* Emit BigInt values in AST if supported by runtime engine - -## 0.1.0 (2017-12-19) - -Initial release diff --git a/deps/acorn-plugins/acorn-bigint/LICENSE b/deps/acorn-plugins/acorn-bigint/LICENSE deleted file mode 100644 index 7c2b27a19c033c..00000000000000 --- a/deps/acorn-plugins/acorn-bigint/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2017-2018 by Adrian Heine - -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. diff --git a/deps/acorn-plugins/acorn-bigint/README.md b/deps/acorn-plugins/acorn-bigint/README.md deleted file mode 100644 index b0b6bb55543a58..00000000000000 --- a/deps/acorn-plugins/acorn-bigint/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# BigInt support for Acorn - -[![NPM version](https://img.shields.io/npm/v/acorn-bigint.svg)](https://www.npmjs.org/package/acorn-bigint) - -This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript. - -It implements support for arbitrary precision integers as defined in the stage 3 proposal [BigInt: Arbitrary precision integers in JavaScript](https://github.com/tc39/proposal-bigint). The emitted AST follows [an ESTree proposal](https://github.com/estree/estree/blob/132be9b9ec376adbc082dd5f6ba78aefd7a1a864/experimental/bigint.md). - -## Usage - -This module provides a plugin that can be used to extend the Acorn `Parser` class: - -```javascript -const {Parser} = require('acorn'); -const bigInt = require('acorn-bigint'); -Parser.extend(bigInt).parse('100n'); -``` - -## License - -This plugin is released under an [MIT License](./LICENSE). diff --git a/deps/acorn-plugins/acorn-bigint/index.js b/deps/acorn-plugins/acorn-bigint/index.js deleted file mode 100644 index 8e63515e11bbc5..00000000000000 --- a/deps/acorn-plugins/acorn-bigint/index.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict" - -const acorn = require('internal/deps/acorn/acorn/dist/acorn') -const tt = acorn.tokTypes -const isIdentifierStart = acorn.isIdentifierStart - -module.exports = function(Parser) { - return class extends Parser { - parseLiteral(value) { - const node = super.parseLiteral(value) - if (node.raw.charCodeAt(node.raw.length - 1) == 110) node.bigint = this.getNumberInput(node.start, node.end) - return node - } - - readRadixNumber(radix) { - let start = this.pos - this.pos += 2 // 0x - let val = this.readInt(radix) - if (val === null) this.raise(this.start + 2, `Expected number in radix ${radix}`) - if (this.input.charCodeAt(this.pos) == 110) { - let str = this.getNumberInput(start, this.pos) - val = typeof BigInt !== "undefined" ? BigInt(str) : null - ++this.pos - } else if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number") - return this.finishToken(tt.num, val) - } - - readNumber(startsWithDot) { - let start = this.pos - - // Not an int - if (startsWithDot) return super.readNumber(startsWithDot) - - // Legacy octal - if (this.input.charCodeAt(start) === 48 && this.input.charCodeAt(start + 1) !== 110) { - return super.readNumber(startsWithDot) - } - - if (this.readInt(10) === null) this.raise(start, "Invalid number") - - // Not a BigInt, reset and parse again - if (this.input.charCodeAt(this.pos) != 110) { - this.pos = start - return super.readNumber(startsWithDot) - } - - let str = this.getNumberInput(start, this.pos) - let val = typeof BigInt !== "undefined" ? BigInt(str) : null - ++this.pos - return this.finishToken(tt.num, val) - } - - // This is basically a hook for acorn-numeric-separator - getNumberInput(start, end) { - if (super.getNumberInput) return super.getNumberInput(start, end) - return this.input.slice(start, end) - } - } -} diff --git a/deps/acorn-plugins/acorn-bigint/package.json b/deps/acorn-plugins/acorn-bigint/package.json deleted file mode 100644 index 073cdfb86c309d..00000000000000 --- a/deps/acorn-plugins/acorn-bigint/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "acorn-bigint", - "_id": "acorn-bigint@0.4.0", - "_inBundle": false, - "_integrity": "sha512-W9iaqWzqFo7ZBLmI9dMjHYGrN0Nm/ZgToqhvd3RELJux7RsX6k1/80h+bD9TtTpeKky/kYNbr3+vHWqI3hdyfA==", - "_location": "/acorn-bigint", - "_phantomChildren": {}, - "_requested": { - "type": "tag", - "registry": true, - "raw": "acorn-bigint", - "name": "acorn-bigint", - "escapedName": "acorn-bigint", - "rawSpec": "", - "saveSpec": null, - "fetchSpec": "latest" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/acorn-bigint/-/acorn-bigint-0.4.0.tgz", - "_shasum": "af3245ed8a7c3747387fca4680ae1960f617c4cd", - "_spec": "acorn-bigint", - "_where": "/home/ruben/repos/node/node", - "bugs": { - "url": "https://github.com/acornjs/acorn-bigint/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Adrian Heine", - "email": "mail@adrianheine.de" - } - ], - "deprecated": false, - "description": "Support for BigInt in acorn", - "devDependencies": { - "acorn": "^6.1.1", - "eslint": "^5.16.0", - "eslint-plugin-node": "^8.0.1", - "mocha": "^6.0.2", - "test262": "git+https://github.com/tc39/test262.git#611919174ffe060503691a0c7e3eb2a65b646124", - "test262-parser-runner": "^0.5.0" - }, - "engines": { - "node": ">=4.8.2" - }, - "homepage": "https://github.com/acornjs/acorn-bigint", - "license": "MIT", - "name": "acorn-bigint", - "peerDependencies": { - "acorn": "^6.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/acornjs/acorn-bigint.git" - }, - "scripts": { - "lint": "eslint -c .eslintrc.json .", - "test": "mocha", - "test:test262": "node run_test262.js" - }, - "version": "0.4.0" -} diff --git a/deps/acorn/acorn-walk/CHANGELOG.md b/deps/acorn/acorn-walk/CHANGELOG.md index 525950b5183bcf..c02dbd7dda8417 100644 --- a/deps/acorn/acorn-walk/CHANGELOG.md +++ b/deps/acorn/acorn-walk/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.2.0 (2017-07-04) + +### New features + +Add support for `Import` nodes. + ## 6.1.0 (2018-09-28) ### New features diff --git a/deps/acorn/acorn-walk/README.md b/deps/acorn/acorn-walk/README.md index 2b94bec31eccfb..e192baced005ac 100644 --- a/deps/acorn/acorn-walk/README.md +++ b/deps/acorn/acorn-walk/README.md @@ -6,7 +6,7 @@ An abstract syntax tree walker for the ## Community Acorn is open source software released under an -[MIT license](https://github.com/acornjs/acorn/blob/master/LICENSE). +[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-walk/LICENSE). You are welcome to [report bugs](https://github.com/acornjs/acorn/issues) or create pull diff --git a/deps/acorn/acorn-walk/dist/walk.js b/deps/acorn/acorn-walk/dist/walk.js index 322a58d9fabcb3..398a0032f4bb65 100644 --- a/deps/acorn/acorn-walk/dist/walk.js +++ b/deps/acorn/acorn-walk/dist/walk.js @@ -1,456 +1,458 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.acorn = global.acorn || {}, global.acorn.walk = {}))); -}(this, (function (exports) { 'use strict'; - -// AST walker module for Mozilla Parser API compatible trees - -// A simple walk is one where you simply specify callbacks to be -// called on specific nodes. The last two arguments are optional. A -// simple use would be -// -// walk.simple(myTree, { -// Expression: function(node) { ... } -// }); -// -// to do something with all expressions. All Parser API node types -// can be used to identify node types, as well as Expression and -// Statement, which denote categories of nodes. -// -// The base argument can be used to pass a custom (recursive) -// walker, and state can be used to give this walked an initial -// state. - -function simple(node, visitors, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - baseVisitor[type](node, st, c); - if (found) { found(node, st); } - })(node, state, override); -} - -// An ancestor walk keeps an array of ancestor nodes (including the -// current node) and passes them to the callback as third parameter -// (and also as state parameter when no other state is present). -function ancestor(node, visitors, baseVisitor, state) { - var ancestors = []; - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (found) { found(node, st || ancestors, ancestors); } - if (isNew) { ancestors.pop(); } - })(node, state); -} - -// A recursive walk is one where your functions override the default -// walkers. They can modify and replace the state parameter that's -// threaded through the walk, and can opt how and whether to walk -// their child nodes (by calling their third argument on these -// nodes). -function recursive(node, state, funcs, baseVisitor, override) { - var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor;(function c(node, st, override) { - visitor[override || node.type](node, st, c); - })(node, state, override); -} - -function makeTest(test) { - if (typeof test === "string") - { return function (type) { return type === test; } } - else if (!test) - { return function () { return true; } } - else - { return test } -} - -var Found = function Found(node, state) { this.node = node; this.state = state; }; - -// A full walk triggers the callback on each node -function full(node, callback, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type; - baseVisitor[type](node, st, c); - if (!override) { callback(node, st, type); } - })(node, state, override); -} - -// An fullAncestor walk is like an ancestor walk, but triggers -// the callback on each node -function fullAncestor(node, callback, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - var ancestors = [];(function c(node, st, override) { - var type = override || node.type; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (!override) { callback(node, st || ancestors, ancestors, type); } - if (isNew) { ancestors.pop(); } - })(node, state); -} - -// Find a node with a given start, end, and type (all are optional, -// null can be used as wildcard). Returns a {node, state} object, or -// undefined when it doesn't find a matching node. -function findNodeAt(node, start, end, test, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - test = makeTest(test); - try { - (function c(node, st, override) { - var type = override || node.type; - if ((start == null || node.start <= start) && - (end == null || node.end >= end)) - { baseVisitor[type](node, st, c); } - if ((start == null || node.start === start) && - (end == null || node.end === end) && - test(type, node)) - { throw new Found(node, st) } + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {}))); +}(this, function (exports) { 'use strict'; + + // AST walker module for Mozilla Parser API compatible trees + + // A simple walk is one where you simply specify callbacks to be + // called on specific nodes. The last two arguments are optional. A + // simple use would be + // + // walk.simple(myTree, { + // Expression: function(node) { ... } + // }); + // + // to do something with all expressions. All Parser API node types + // can be used to identify node types, as well as Expression and + // Statement, which denote categories of nodes. + // + // The base argument can be used to pass a custom (recursive) + // walker, and state can be used to give this walked an initial + // state. + + function simple(node, visitors, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type, found = visitors[type]; + baseVisitor[type](node, st, c); + if (found) { found(node, st); } + })(node, state, override); + } + + // An ancestor walk keeps an array of ancestor nodes (including the + // current node) and passes them to the callback as third parameter + // (and also as state parameter when no other state is present). + function ancestor(node, visitors, baseVisitor, state) { + var ancestors = []; + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type, found = visitors[type]; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (found) { found(node, st || ancestors, ancestors); } + if (isNew) { ancestors.pop(); } })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e } -} - -// Find the innermost node of a given type that contains the given -// position. Interface similar to findNodeAt. -function findNodeAround(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { + + // A recursive walk is one where your functions override the default + // walkers. They can modify and replace the state parameter that's + // threaded through the walk, and can opt how and whether to walk + // their child nodes (by calling their third argument on these + // nodes). + function recursive(node, state, funcs, baseVisitor, override) { + var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor + ;(function c(node, st, override) { + visitor[override || node.type](node, st, c); + })(node, state, override); + } + + function makeTest(test) { + if (typeof test === "string") + { return function (type) { return type === test; } } + else if (!test) + { return function () { return true; } } + else + { return test } + } + + var Found = function Found(node, state) { this.node = node; this.state = state; }; + + // A full walk triggers the callback on each node + function full(node, callback, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { var type = override || node.type; - if (node.start > pos || node.end < pos) { return } baseVisitor[type](node, st, c); - if (test(type, node)) { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e + if (!override) { callback(node, st, type); } + })(node, state, override); } -} - -// Find the outermost matching node after a given position. -function findNodeAfter(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - if (node.end < pos) { return } + + // An fullAncestor walk is like an ancestor walk, but triggers + // the callback on each node + function fullAncestor(node, callback, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + var ancestors = [] + ;(function c(node, st, override) { var type = override || node.type; - if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } baseVisitor[type](node, st, c); + if (!override) { callback(node, st || ancestors, ancestors, type); } + if (isNew) { ancestors.pop(); } })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e } -} - -// Find the outermost matching node before a given position. -function findNodeBefore(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - var max;(function c(node, st, override) { - if (node.start > pos) { return } - var type = override || node.type; - if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) - { max = new Found(node, st); } - baseVisitor[type](node, st, c); - })(node, state); - return max -} - -// Fallback to an Object.create polyfill for older environments. -var create = Object.create || function(proto) { - function Ctor() {} - Ctor.prototype = proto; - return new Ctor -}; - -// Used to create a custom walker. Will fill in all missing node -// type properties with the defaults. -function make(funcs, baseVisitor) { - var visitor = create(baseVisitor || base); - for (var type in funcs) { visitor[type] = funcs[type]; } - return visitor -} - -function skipThrough(node, st, c) { c(node, st); } -function ignore(_node, _st, _c) {} - -// Node walkers. - -var base = {}; - -base.Program = base.BlockStatement = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var stmt = list[i]; - - c(stmt, st, "Statement"); - } -}; -base.Statement = skipThrough; -base.EmptyStatement = ignore; -base.ExpressionStatement = base.ParenthesizedExpression = - function (node, st, c) { return c(node.expression, st, "Expression"); }; -base.IfStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Statement"); - if (node.alternate) { c(node.alternate, st, "Statement"); } -}; -base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; -base.BreakStatement = base.ContinueStatement = ignore; -base.WithStatement = function (node, st, c) { - c(node.object, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.SwitchStatement = function (node, st, c) { - c(node.discriminant, st, "Expression"); - for (var i = 0, list = node.cases; i < list.length; i += 1) { - var cs = list[i]; - - if (cs.test) { c(cs.test, st, "Expression"); } - for (var i$1 = 0, list$1 = cs.consequent; i$1 < list$1.length; i$1 += 1) - { - var cons = list$1[i$1]; - c(cons, st, "Statement"); + // Find a node with a given start, end, and type (all are optional, + // null can be used as wildcard). Returns a {node, state} object, or + // undefined when it doesn't find a matching node. + function findNodeAt(node, start, end, test, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + test = makeTest(test); + try { + (function c(node, st, override) { + var type = override || node.type; + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + { baseVisitor[type](node, st, c); } + if ((start == null || node.start === start) && + (end == null || node.end === end) && + test(type, node)) + { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e } } -}; -base.SwitchCase = function (node, st, c) { - if (node.test) { c(node.test, st, "Expression"); } - for (var i = 0, list = node.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); + + // Find the innermost node of a given type that contains the given + // position. Interface similar to findNodeAt. + function findNodeAround(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + var type = override || node.type; + if (node.start > pos || node.end < pos) { return } + baseVisitor[type](node, st, c); + if (test(type, node)) { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } } -}; -base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { - if (node.argument) { c(node.argument, st, "Expression"); } -}; -base.ThrowStatement = base.SpreadElement = - function (node, st, c) { return c(node.argument, st, "Expression"); }; -base.TryStatement = function (node, st, c) { - c(node.block, st, "Statement"); - if (node.handler) { c(node.handler, st); } - if (node.finalizer) { c(node.finalizer, st, "Statement"); } -}; -base.CatchClause = function (node, st, c) { - if (node.param) { c(node.param, st, "Pattern"); } - c(node.body, st, "Statement"); -}; -base.WhileStatement = base.DoWhileStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForStatement = function (node, st, c) { - if (node.init) { c(node.init, st, "ForInit"); } - if (node.test) { c(node.test, st, "Expression"); } - if (node.update) { c(node.update, st, "Expression"); } - c(node.body, st, "Statement"); -}; -base.ForInStatement = base.ForOfStatement = function (node, st, c) { - c(node.left, st, "ForInit"); - c(node.right, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForInit = function (node, st, c) { - if (node.type === "VariableDeclaration") { c(node, st); } - else { c(node, st, "Expression"); } -}; -base.DebuggerStatement = ignore; - -base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; -base.VariableDeclaration = function (node, st, c) { - for (var i = 0, list = node.declarations; i < list.length; i += 1) - { - var decl = list[i]; - - c(decl, st); + + // Find the outermost matching node after a given position. + function findNodeAfter(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + if (node.end < pos) { return } + var type = override || node.type; + if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + baseVisitor[type](node, st, c); + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } } -}; -base.VariableDeclarator = function (node, st, c) { - c(node.id, st, "Pattern"); - if (node.init) { c(node.init, st, "Expression"); } -}; - -base.Function = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - c(param, st, "Pattern"); + + // Find the outermost matching node before a given position. + function findNodeBefore(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + var max + ;(function c(node, st, override) { + if (node.start > pos) { return } + var type = override || node.type; + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + { max = new Found(node, st); } + baseVisitor[type](node, st, c); + })(node, state); + return max } - c(node.body, st, node.expression ? "Expression" : "Statement"); -}; - -base.Pattern = function (node, st, c) { - if (node.type === "Identifier") - { c(node, st, "VariablePattern"); } - else if (node.type === "MemberExpression") - { c(node, st, "MemberPattern"); } - else - { c(node, st); } -}; -base.VariablePattern = ignore; -base.MemberPattern = skipThrough; -base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; -base.ArrayPattern = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Pattern"); } + + // Fallback to an Object.create polyfill for older environments. + var create = Object.create || function(proto) { + function Ctor() {} + Ctor.prototype = proto; + return new Ctor + }; + + // Used to create a custom walker. Will fill in all missing node + // type properties with the defaults. + function make(funcs, baseVisitor) { + var visitor = create(baseVisitor || base); + for (var type in funcs) { visitor[type] = funcs[type]; } + return visitor } -}; -base.ObjectPattern = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - if (prop.type === "Property") { - if (prop.computed) { c(prop.key, st, "Expression"); } - c(prop.value, st, "Pattern"); - } else if (prop.type === "RestElement") { - c(prop.argument, st, "Pattern"); + + function skipThrough(node, st, c) { c(node, st); } + function ignore(_node, _st, _c) {} + + // Node walkers. + + var base = {}; + + base.Program = base.BlockStatement = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var stmt = list[i]; + + c(stmt, st, "Statement"); } - } -}; + }; + base.Statement = skipThrough; + base.EmptyStatement = ignore; + base.ExpressionStatement = base.ParenthesizedExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); }; + base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Statement"); + if (node.alternate) { c(node.alternate, st, "Statement"); } + }; + base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; + base.BreakStatement = base.ContinueStatement = ignore; + base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression"); + for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { + var cs = list$1[i$1]; + + if (cs.test) { c(cs.test, st, "Expression"); } + for (var i = 0, list = cs.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } + } + }; + base.SwitchCase = function (node, st, c) { + if (node.test) { c(node.test, st, "Expression"); } + for (var i = 0, list = node.consequent; i < list.length; i += 1) + { + var cons = list[i]; -base.Expression = skipThrough; -base.ThisExpression = base.Super = base.MetaProperty = ignore; -base.ArrayExpression = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; + c(cons, st, "Statement"); + } + }; + base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { + if (node.argument) { c(node.argument, st, "Expression"); } + }; + base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); }; + base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement"); + if (node.handler) { c(node.handler, st); } + if (node.finalizer) { c(node.finalizer, st, "Statement"); } + }; + base.CatchClause = function (node, st, c) { + if (node.param) { c(node.param, st, "Pattern"); } + c(node.body, st, "Statement"); + }; + base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.ForStatement = function (node, st, c) { + if (node.init) { c(node.init, st, "ForInit"); } + if (node.test) { c(node.test, st, "Expression"); } + if (node.update) { c(node.update, st, "Expression"); } + c(node.body, st, "Statement"); + }; + base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit"); + c(node.right, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.ForInit = function (node, st, c) { + if (node.type === "VariableDeclaration") { c(node, st); } + else { c(node, st, "Expression"); } + }; + base.DebuggerStatement = ignore; + + base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; + base.VariableDeclaration = function (node, st, c) { + for (var i = 0, list = node.declarations; i < list.length; i += 1) + { + var decl = list[i]; - if (elt) { c(elt, st, "Expression"); } - } -}; -base.ObjectExpression = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) - { - var prop = list[i]; + c(decl, st); + } + }; + base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern"); + if (node.init) { c(node.init, st, "Expression"); } + }; + + base.Function = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; - c(prop, st); - } -}; -base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; -base.SequenceExpression = function (node, st, c) { - for (var i = 0, list = node.expressions; i < list.length; i += 1) - { - var expr = list[i]; - - c(expr, st, "Expression"); - } -}; -base.TemplateLiteral = function (node, st, c) { - for (var i = 0, list = node.quasis; i < list.length; i += 1) - { - var quasi = list[i]; + c(param, st, "Pattern"); + } + c(node.body, st, node.expression ? "Expression" : "Statement"); + }; + + base.Pattern = function (node, st, c) { + if (node.type === "Identifier") + { c(node, st, "VariablePattern"); } + else if (node.type === "MemberExpression") + { c(node, st, "MemberPattern"); } + else + { c(node, st); } + }; + base.VariablePattern = ignore; + base.MemberPattern = skipThrough; + base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; + base.ArrayPattern = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Pattern"); } + } + }; + base.ObjectPattern = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + if (prop.type === "Property") { + if (prop.computed) { c(prop.key, st, "Expression"); } + c(prop.value, st, "Pattern"); + } else if (prop.type === "RestElement") { + c(prop.argument, st, "Pattern"); + } + } + }; - c(quasi, st); - } + base.Expression = skipThrough; + base.ThisExpression = base.Super = base.MetaProperty = ignore; + base.ArrayExpression = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; - for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) - { - var expr = list$1[i$1]; + if (elt) { c(elt, st, "Expression"); } + } + }; + base.ObjectExpression = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) + { + var prop = list[i]; - c(expr, st, "Expression"); - } -}; -base.TemplateElement = ignore; -base.UnaryExpression = base.UpdateExpression = function (node, st, c) { - c(node.argument, st, "Expression"); -}; -base.BinaryExpression = base.LogicalExpression = function (node, st, c) { - c(node.left, st, "Expression"); - c(node.right, st, "Expression"); -}; -base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { - c(node.left, st, "Pattern"); - c(node.right, st, "Expression"); -}; -base.ConditionalExpression = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Expression"); - c(node.alternate, st, "Expression"); -}; -base.NewExpression = base.CallExpression = function (node, st, c) { - c(node.callee, st, "Expression"); - if (node.arguments) - { for (var i = 0, list = node.arguments; i < list.length; i += 1) + c(prop, st); + } + }; + base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; + base.SequenceExpression = function (node, st, c) { + for (var i = 0, list = node.expressions; i < list.length; i += 1) { - var arg = list[i]; - - c(arg, st, "Expression"); - } } -}; -base.MemberExpression = function (node, st, c) { - c(node.object, st, "Expression"); - if (node.computed) { c(node.property, st, "Expression"); } -}; -base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { - if (node.declaration) - { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } - if (node.source) { c(node.source, st, "Expression"); } -}; -base.ExportAllDeclaration = function (node, st, c) { - c(node.source, st, "Expression"); -}; -base.ImportDeclaration = function (node, st, c) { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) - { - var spec = list[i]; - - c(spec, st); - } - c(node.source, st, "Expression"); -}; -base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore; - -base.TaggedTemplateExpression = function (node, st, c) { - c(node.tag, st, "Expression"); - c(node.quasi, st, "Expression"); -}; -base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; -base.Class = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - if (node.superClass) { c(node.superClass, st, "Expression"); } - c(node.body, st); -}; -base.ClassBody = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var elt = list[i]; - - c(elt, st); - } -}; -base.MethodDefinition = base.Property = function (node, st, c) { - if (node.computed) { c(node.key, st, "Expression"); } - c(node.value, st, "Expression"); -}; - -exports.simple = simple; -exports.ancestor = ancestor; -exports.recursive = recursive; -exports.full = full; -exports.fullAncestor = fullAncestor; -exports.findNodeAt = findNodeAt; -exports.findNodeAround = findNodeAround; -exports.findNodeAfter = findNodeAfter; -exports.findNodeBefore = findNodeBefore; -exports.make = make; -exports.base = base; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); -//# sourceMappingURL=walk.js.map + var expr = list[i]; + + c(expr, st, "Expression"); + } + }; + base.TemplateLiteral = function (node, st, c) { + for (var i = 0, list = node.quasis; i < list.length; i += 1) + { + var quasi = list[i]; + + c(quasi, st); + } + + for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) + { + var expr = list$1[i$1]; + + c(expr, st, "Expression"); + } + }; + base.TemplateElement = ignore; + base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression"); + }; + base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression"); + c(node.right, st, "Expression"); + }; + base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern"); + c(node.right, st, "Expression"); + }; + base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Expression"); + c(node.alternate, st, "Expression"); + }; + base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression"); + if (node.arguments) + { for (var i = 0, list = node.arguments; i < list.length; i += 1) + { + var arg = list[i]; + + c(arg, st, "Expression"); + } } + }; + base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression"); + if (node.computed) { c(node.property, st, "Expression"); } + }; + base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } + if (node.source) { c(node.source, st, "Expression"); } + }; + base.ExportAllDeclaration = function (node, st, c) { + c(node.source, st, "Expression"); + }; + base.ImportDeclaration = function (node, st, c) { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) + { + var spec = list[i]; + + c(spec, st); + } + c(node.source, st, "Expression"); + }; + base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = base.Import = ignore; + + base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression"); + c(node.quasi, st, "Expression"); + }; + base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; + base.Class = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + if (node.superClass) { c(node.superClass, st, "Expression"); } + c(node.body, st); + }; + base.ClassBody = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var elt = list[i]; + + c(elt, st); + } + }; + base.MethodDefinition = base.Property = function (node, st, c) { + if (node.computed) { c(node.key, st, "Expression"); } + c(node.value, st, "Expression"); + }; + + exports.ancestor = ancestor; + exports.base = base; + exports.findNodeAfter = findNodeAfter; + exports.findNodeAround = findNodeAround; + exports.findNodeAt = findNodeAt; + exports.findNodeBefore = findNodeBefore; + exports.full = full; + exports.fullAncestor = fullAncestor; + exports.make = make; + exports.recursive = recursive; + exports.simple = simple; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); diff --git a/deps/acorn/acorn-walk/package.json b/deps/acorn/acorn-walk/package.json index aee3f2584d2de2..239e6c729aedfe 100644 --- a/deps/acorn/acorn-walk/package.json +++ b/deps/acorn/acorn-walk/package.json @@ -4,7 +4,7 @@ "homepage": "https://github.com/acornjs/acorn", "main": "dist/walk.js", "module": "dist/walk.mjs", - "version": "6.1.1", + "version": "6.2.0", "engines": {"node": ">=0.4.0"}, "maintainers": [ { diff --git a/deps/acorn/acorn/CHANGELOG.md b/deps/acorn/acorn/CHANGELOG.md index 430b0b5cd14247..f94f23ccf295b0 100644 --- a/deps/acorn/acorn/CHANGELOG.md +++ b/deps/acorn/acorn/CHANGELOG.md @@ -1,3 +1,25 @@ +## 6.2.0 (2019-07-04) + +### Bug fixes + +Improve valid assignment checking in `for`/`in` and `for`/`of` loops. + +Disallow binding `let` in patterns. + +### New features + +Support bigint syntax with `ecmaVersion` >= 10. + +Support dynamic `import` syntax with `ecmaVersion` >= 10. + +Upgrade to Unicode version 12. + +## 6.1.1 (2019-02-27) + +### Bug fixes + +Fix bug that caused parsing default exports of with names to fail. + ## 6.1.0 (2019-02-08) ### Bug fixes diff --git a/deps/acorn/acorn/README.md b/deps/acorn/acorn/README.md index 9ffacdbc9e9552..fa372ee6821bab 100644 --- a/deps/acorn/acorn/README.md +++ b/deps/acorn/acorn/README.md @@ -54,7 +54,7 @@ an object containing any of these fields: - **ecmaVersion**: Indicates the ECMAScript version to parse. Must be either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018) or 10 (2019, partial support). This influences support for strict mode, the set of - reserved words, and support for new syntax features. Default is 7. + reserved words, and support for new syntax features. Default is 9. **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being implemented by Acorn. Other proposed new features can be implemented @@ -86,7 +86,7 @@ an object containing any of these fields: - **allowImportExportEverywhere**: By default, `import` and `export` declarations can only appear at a program's top level. Setting this option to `true` allows them anywhere where a statement is allowed. - + - **allowAwaitOutsideFunction**: By default, `await` expressions can only appear inside `async` functions. Setting this option to `true` allows to have top-level `await` expressions. They are @@ -256,14 +256,11 @@ The utility spits out the syntax tree as JSON data. ## Existing plugins - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) - + Plugins for ECMAScript proposals: - + - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: - - [`acorn-async-iteration`](https://github.com/acornjs/acorn-async-iteration): Parse [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - - [`acorn-bigint`](https://github.com/acornjs/acorn-bigint): Parse [BigInt proposal](https://github.com/tc39/proposal-bigint) - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields) - - [`acorn-dynamic-import`](https://github.com/kesne/acorn-dynamic-import): Parse [import() proposal](https://github.com/tc39/proposal-dynamic-import) - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) - [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator) - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n diff --git a/deps/acorn/acorn/dist/acorn.js b/deps/acorn/acorn/dist/acorn.js index 44d95c5fae74db..dcb091fd4fe3d9 100644 --- a/deps/acorn/acorn/dist/acorn.js +++ b/deps/acorn/acorn/dist/acorn.js @@ -1,5018 +1,4964 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.acorn = {}))); -}(this, (function (exports) { 'use strict'; - -// Reserved word lists for various dialects of the language - -var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" -}; - -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: ecma5AndLessKeywords, - 6: ecma5AndLessKeywords + " const class extends export import super" -}; - -var keywordRelationalOperator = /^in(stanceof)?$/; - -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `bin/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7b9\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; -var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by bin/generate-identifier-regex.js - -// eslint-disable-next-line comma-spacing -var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; - -// eslint-disable-next-line comma-spacing -var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { return false } - pos += set[i + 1]; - if (pos >= code) { return true } - } -} - -// Test whether a given character code starts an identifier. - -function isIdentifierStart(code, astral) { - if (code < 65) { return code === 36 } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) -} - -// Test whether a given character is part of an identifier. - -function isIdentifierChar(code, astral) { - if (code < 48) { return code === 36 } - if (code < 58) { return true } - if (code < 65) { return false } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) -} - -// ## Token types - -// The assignment of fine-grained, information-carrying type objects -// allows the tokenizer to store the information it has about a -// token in a way that is very cheap for the parser to look up. - -// All token type variables start with an underscore, to make them -// easy to recognize. - -// The `beforeExpr` property is used to disambiguate between regular -// expressions and divisions. It is set on all token types that can -// be followed by an expression (thus, a slash after them would be a -// regular expression). -// -// The `startsExpr` property is used to check if the token ends a -// `yield` expression. It is set on all token types that either can -// directly start an expression (like a quotation mark) or can -// continue an expression (like the body of a string). -// -// `isLoop` marks a keyword as starting a loop, which is important -// to know when parsing a label, in order to allow or disallow -// continue jumps to that label. - -var TokenType = function TokenType(label, conf) { - if ( conf === void 0 ) conf = {}; - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; -}; - -function binop(name, prec) { - return new TokenType(name, {beforeExpr: true, binop: prec}) -} -var beforeExpr = {beforeExpr: true}; -var startsExpr = {startsExpr: true}; - -// Map keyword names to token types. - -var keywords$1 = {}; - -// Succinct definitions of keyword token types -function kw(name, options) { - if ( options === void 0 ) options = {}; - - options.keyword = name; - return keywords$1[name] = new TokenType(name, options) -} - -var types = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), - bracketR: new TokenType("]"), - braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), - braceR: new TokenType("}"), - parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - invalidTemplate: new TokenType("invalidTemplate"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", {beforeExpr: true, isAssign: true}), - assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), - incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), - prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=/===/!==", 6), - relational: binop("/<=/>=", 7), - bitShift: binop("<>/>>>", 8), - plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", {beforeExpr: true}), - - // Keyword token types. - _break: kw("break"), - _case: kw("case", beforeExpr), - _catch: kw("catch"), - _continue: kw("continue"), - _debugger: kw("debugger"), - _default: kw("default", beforeExpr), - _do: kw("do", {isLoop: true, beforeExpr: true}), - _else: kw("else", beforeExpr), - _finally: kw("finally"), - _for: kw("for", {isLoop: true}), - _function: kw("function", startsExpr), - _if: kw("if"), - _return: kw("return", beforeExpr), - _switch: kw("switch"), - _throw: kw("throw", beforeExpr), - _try: kw("try"), - _var: kw("var"), - _const: kw("const"), - _while: kw("while", {isLoop: true}), - _with: kw("with"), - _new: kw("new", {beforeExpr: true, startsExpr: true}), - _this: kw("this", startsExpr), - _super: kw("super", startsExpr), - _class: kw("class", startsExpr), - _extends: kw("extends", beforeExpr), - _export: kw("export"), - _import: kw("import"), - _null: kw("null", startsExpr), - _true: kw("true", startsExpr), - _false: kw("false", startsExpr), - _in: kw("in", {beforeExpr: true, binop: 7}), - _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), - _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), - _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), - _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) -}; - -// Matches a whole line break (where CRLF is considered a single -// line break). Used to count lines. - -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); - -function isNewLine(code, ecma2019String) { - return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) -} - -var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - -var ref = Object.prototype; -var hasOwnProperty = ref.hasOwnProperty; -var toString = ref.toString; - -// Checks if an object has a property. - -function has(obj, propName) { - return hasOwnProperty.call(obj, propName) -} - -var isArray = Array.isArray || (function (obj) { return ( - toString.call(obj) === "[object Array]" -); }); - -function wordsRegexp(words) { - return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") -} - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = function Position(line, col) { - this.line = line; - this.column = col; -}; - -Position.prototype.offset = function offset (n) { - return new Position(this.line, this.column + n) -}; - -var SourceLocation = function SourceLocation(p, start, end) { - this.start = start; - this.end = end; - if (p.sourceFile !== null) { this.source = p.sourceFile; } -}; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur) - } - } -} - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must be - // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 - // (2019). This influences support for strict mode, the set of - // reserved words, and support for new syntax features. The default - // is 9. - ecmaVersion: 9, - // `sourceType` indicates the mode the code should be parsed in. - // Can be either `"script"` or `"module"`. This influences global - // strict mode and parsing of `import` and `export` declarations. - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // the position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, await identifiers are allowed to appear at the top-level scope, - // but they are still not allowed in non-async functions. - allowAwaitOutsideFunction: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false -}; - -// Interpret and default an options object - -function getOptions(opts) { - var options = {}; - - for (var opt in defaultOptions) - { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - - if (options.ecmaVersion >= 2015) - { options.ecmaVersion -= 2009; } - - if (options.allowReserved == null) - { options.allowReserved = options.ecmaVersion < 5; } - - if (isArray(options.onToken)) { - var tokens = options.onToken; - options.onToken = function (token) { return tokens.push(token); }; - } - if (isArray(options.onComment)) - { options.onComment = pushComment(options, options.onComment); } - - return options -} - -function pushComment(options, array) { - return function(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) - { comment.loc = new SourceLocation(this, startLoc, endLoc); } - if (options.ranges) - { comment.range = [start, end]; } - array.push(comment); - } -} - -// Each scope gets a bitset that may contain these flags -var SCOPE_TOP = 1; -var SCOPE_FUNCTION = 2; -var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION; -var SCOPE_ASYNC = 4; -var SCOPE_GENERATOR = 8; -var SCOPE_ARROW = 16; -var SCOPE_SIMPLE_CATCH = 32; -var SCOPE_SUPER = 64; -var SCOPE_DIRECT_SUPER = 128; - -function functionFlags(async, generator) { - return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) -} - -// Used in checkLVal and declareName to determine the type of a binding -var BIND_NONE = 0; -var BIND_VAR = 1; -var BIND_LEXICAL = 2; -var BIND_FUNCTION = 3; -var BIND_SIMPLE_CATCH = 4; -var BIND_OUTSIDE = 5; // Special case for function names as bound inside the function - -var Parser = function Parser(options, input, startPos) { - this.options = options = getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]); - var reserved = ""; - if (!options.allowReserved) { - for (var v = options.ecmaVersion;; v--) - { if (reserved = reservedWords[v]) { break } } - if (options.sourceType === "module") { reserved += " await"; } - } - this.reservedWords = wordsRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; - this.reservedWordsStrict = wordsRegexp(reservedStrict); - this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.inModule = options.sourceType === "module"; - this.strict = this.inModule || this.strictDirective(this.pos); - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Positions to delayed-check that yield/await does not exist in default parameters. - this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; - // Labels in scope. - this.labels = []; - // Thus-far undefined exports. - this.undefinedExports = {}; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") - { this.skipLineComment(2); } - - // Scope tracking for duplicate variable names (see scope.js) - this.scopeStack = []; - this.enterScope(SCOPE_TOP); - - // For RegExp validation - this.regexpState = null; -}; - -var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - -Parser.prototype.parse = function parse () { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node) -}; - -prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; -prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; -prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; -prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; -prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; -prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - -// Switch to a getter for 7.0.0. -Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; - -Parser.extend = function extend () { - var plugins = [], len = arguments.length; - while ( len-- ) plugins[ len ] = arguments[ len ]; - - var cls = this; - for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } - return cls -}; - -Parser.parse = function parse (input, options) { - return new this(options, input).parse() -}; - -Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { - var parser = new this(options, input, pos); - parser.nextToken(); - return parser.parseExpression() -}; - -Parser.tokenizer = function tokenizer (input, options) { - return new this(options, input) -}; - -Object.defineProperties( Parser.prototype, prototypeAccessors ); - -var pp = Parser.prototype; - -// ## Parser utilities - -var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; -pp.strictDirective = function(start) { - var this$1 = this; - - for (;;) { - // Try to find string literal. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this$1.input)[0].length; - var match = literal.exec(this$1.input.slice(start)); - if (!match) { return false } - if ((match[1] || match[2]) === "use strict") { return true } - start += match[0].length; - - // Skip semicolon, if any. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this$1.input)[0].length; - if (this$1.input[start] === ";") - { start++; } - } -}; - -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.acorn = {})); +}(this, function (exports) { 'use strict'; + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }; -pp.eat = function(type) { - if (this.type === type) { - this.next(); - return true - } else { - return false - } -}; + // And the keywords -// Tests whether parsed token is a contextual keyword. + var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; -pp.isContextual = function(name) { - return this.type === types.name && this.value === name && !this.containsEsc -}; + var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " const class extends export import super" + }; -// Consumes contextual keyword if possible. + var keywordRelationalOperator = /^in(stanceof)?$/; -pp.eatContextual = function(name) { - if (!this.isContextual(name)) { return false } - this.next(); - return true -}; + // ## Character categories -// Asserts that following token is given contextual keyword. + // Big ugly regular expressions that match characters in the + // whitespace, identifier, and identifier-start categories. These + // are only applied when a character is found to actually have a + // code point above 128. + // Generated by `bin/generate-identifier-regex.js`. -pp.expectContextual = function(name) { - if (!this.eatContextual(name)) { this.unexpected(); } -}; + var nonASCIIidentifierStartChars = "aab5bac0-d6d8-f6f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + var nonASCIIidentifierChars = "\u200c\u200db7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; -// Test whether a semicolon can be inserted at the current position. + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -pp.canInsertSemicolon = function() { - return this.type === types.eof || - this.type === types.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -pp.insertSemicolon = function() { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) - { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } - return true - } -}; + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. They were + // generated by bin/generate-identifier-regex.js -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. + // eslint-disable-next-line comma-spacing + var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; -pp.semicolon = function() { - if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } -}; + // eslint-disable-next-line comma-spacing + var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239]; -pp.afterTrailingComma = function(tokType, notNext) { - if (this.type === tokType) { - if (this.options.onTrailingComma) - { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } - if (!notNext) - { this.next(); } - return true - } -}; - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function(type) { - this.eat(type) || this.unexpected(); -}; - -// Raise an unexpected token error. - -pp.unexpected = function(pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; - -function DestructuringErrors() { - this.shorthandAssign = - this.trailingComma = - this.parenthesizedAssign = - this.parenthesizedBind = - this.doubleProto = - -1; -} - -pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) { return } - if (refDestructuringErrors.trailingComma > -1) - { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } - var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; - if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } -}; - -pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { - if (!refDestructuringErrors) { return false } - var shorthandAssign = refDestructuringErrors.shorthandAssign; - var doubleProto = refDestructuringErrors.doubleProto; - if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } - if (shorthandAssign >= 0) - { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } - if (doubleProto >= 0) - { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } -}; - -pp.checkYieldAwaitInDefaultParams = function() { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) - { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } - if (this.awaitPos) - { this.raise(this.awaitPos, "Await expression cannot be a default value"); } -}; - -pp.isSimpleAssignTarget = function(expr) { - if (expr.type === "ParenthesizedExpression") - { return this.isSimpleAssignTarget(expr.expression) } - return expr.type === "Identifier" || expr.type === "MemberExpression" -}; - -var pp$1 = Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp$1.parseTopLevel = function(node) { - var this$1 = this; - - var exports = {}; - if (!node.body) { node.body = []; } - while (this.type !== types.eof) { - var stmt = this$1.parseStatement(null, true, exports); - node.body.push(stmt); + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { return false } + pos += set[i + 1]; + if (pos >= code) { return true } + } } - if (this.inModule) - { for (var i = 0, list = Object.keys(this$1.undefinedExports); i < list.length; i += 1) - { - var name = list[i]; - this$1.raiseRecoverable(this$1.undefinedExports[name].start, ("Export '" + name + "' is not defined")); - } } - this.adaptDirectivePrologue(node.body); - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program") -}; - -var loopLabel = {kind: "loop"}; -var switchLabel = {kind: "switch"}; - -pp$1.isLet = function(context) { - if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - // For ambiguous cases, determine if a LexicalDeclaration (or only a - // Statement) is allowed here. If context is not empty then only a Statement - // is allowed. However, `let [` is an explicit negative lookahead for - // ExpressionStatement, so special-case it first. - if (nextCh === 91) { return true } // '[' - if (context) { return false } - - if (nextCh === 123) { return true } // '{' - if (isIdentifierStart(nextCh, true)) { - var pos = next + 1; - while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } - var ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) { return true } - } - return false -}; - -// check 'async [no LineTerminator here] function' -// - 'async /*foo*/ function' is OK. -// - 'async /*\n*/ function' is invalid. -pp$1.isAsyncFunction = function() { - if (this.options.ecmaVersion < 8 || !this.isContextual("async")) - { return false } - - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length; - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) -}; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp$1.parseStatement = function(context, topLevel, exports) { - var starttype = this.type, node = this.startNode(), kind; - - if (this.isLet(context)) { - starttype = types._var; - kind = "let"; + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) { return code === 36 } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) } - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) - case types._debugger: return this.parseDebuggerStatement(node) - case types._do: return this.parseDoStatement(node) - case types._for: return this.parseForStatement(node) - case types._function: - // Function as sole body of either an if statement or a labeled statement - // works, but not when it is part of a labeled statement that is the sole - // body of an if statement. - if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } - return this.parseFunctionStatement(node, false, !context) - case types._class: - if (context) { this.unexpected(); } - return this.parseClass(node, true) - case types._if: return this.parseIfStatement(node) - case types._return: return this.parseReturnStatement(node) - case types._switch: return this.parseSwitchStatement(node) - case types._throw: return this.parseThrowStatement(node) - case types._try: return this.parseTryStatement(node) - case types._const: case types._var: - kind = kind || this.value; - if (context && kind !== "var") { this.unexpected(); } - return this.parseVarStatement(node, kind) - case types._while: return this.parseWhileStatement(node) - case types._with: return this.parseWithStatement(node) - case types.braceL: return this.parseBlock(true, node) - case types.semi: return this.parseEmptyStatement(node) - case types._export: - case types._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) - { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } - if (!this.inModule) - { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } - } - return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - if (this.isAsyncFunction()) { - if (context) { this.unexpected(); } - this.next(); - return this.parseFunctionStatement(node, true, !context) - } + // Test whether a given character is part of an identifier. - var maybeName = this.value, expr = this.parseExpression(); - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) - { return this.parseLabeledStatement(node, maybeName, expr, context) } - else { return this.parseExpressionStatement(node, expr) } + function isIdentifierChar(code, astral) { + if (code < 48) { return code === 36 } + if (code < 58) { return true } + if (code < 65) { return false } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) } -}; -pp$1.parseBreakContinueStatement = function(node, keyword) { - var this$1 = this; + // ## Token types - var isBreak = keyword === "break"; - this.next(); - if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } - else if (this.type !== types.name) { this.unexpected(); } - else { - node.label = this.parseIdent(); - this.semicolon(); - } + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. - // Verify that there is an actual destination to break or - // continue to. - var i = 0; - for (; i < this.labels.length; ++i) { - var lab = this$1.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } - if (node.label && isBreak) { break } - } - } - if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") -}; - -pp$1.parseDebuggerStatement = function(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement") -}; - -pp$1.parseDoStatement = function(node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement("do"); - this.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) - { this.eat(types.semi); } - else - { this.semicolon(); } - return this.finishNode(node, "DoWhileStatement") -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp$1.parseForStatement = function(node) { - this.next(); - var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; - this.labels.push(loopLabel); - this.enterScope(0); - this.expect(types.parenL); - if (this.type === types.semi) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, null) - } - var isLet = this.isLet(); - if (this.type === types._var || this.type === types._const || isLet) { - var init$1 = this.startNode(), kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(init$1, true, kind); - this.finishNode(init$1, "VariableDeclaration"); - if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && - !(kind !== "var" && init$1.declarations[0].init)) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - return this.parseForIn(node, init$1) - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init$1) - } - var refDestructuringErrors = new DestructuringErrors; - var init = this.parseExpression(true, refDestructuringErrors); - if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - this.toAssignable(init, false, refDestructuringErrors); - this.checkLVal(init); - return this.parseForIn(node, init) - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init) -}; - -pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) -}; - -pp$1.parseIfStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - // allow function declarations in branches, but only in non-strict mode - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement") -}; - -pp$1.parseReturnStatement = function(node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) - { this.raise(this.start, "'return' outside of function"); } - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } - else { node.argument = this.parseExpression(); this.semicolon(); } - return this.finishNode(node, "ReturnStatement") -}; - -pp$1.parseSwitchStatement = function(node) { - var this$1 = this; - - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(types.braceL); - this.labels.push(switchLabel); - this.enterScope(0); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - var cur; - for (var sawDefault = false; this.type !== types.braceR;) { - if (this$1.type === types._case || this$1.type === types._default) { - var isCase = this$1.type === types._case; - if (cur) { this$1.finishNode(cur, "SwitchCase"); } - node.cases.push(cur = this$1.startNode()); - cur.consequent = []; - this$1.next(); - if (isCase) { - cur.test = this$1.parseExpression(); - } else { - if (sawDefault) { this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses"); } - sawDefault = true; - cur.test = null; - } - this$1.expect(types.colon); - } else { - if (!cur) { this$1.unexpected(); } - cur.consequent.push(this$1.parseStatement(null)); - } - } - this.exitScope(); - if (cur) { this.finishNode(cur, "SwitchCase"); } - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement") -}; - -pp$1.parseThrowStatement = function(node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) - { this.raise(this.lastTokEnd, "Illegal newline after throw"); } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement") -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp$1.parseTryStatement = function(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === types._catch) { - var clause = this.startNode(); - this.next(); - if (this.eat(types.parenL)) { - clause.param = this.parseBindingAtom(); - var simple = clause.param.type === "Identifier"; - this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); - this.expect(types.parenR); - } else { - if (this.options.ecmaVersion < 10) { this.unexpected(); } - clause.param = null; - this.enterScope(0); - } - clause.body = this.parseBlock(false); - this.exitScope(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) - { this.raise(node.start, "Missing catch or finally clause"); } - return this.finishNode(node, "TryStatement") -}; - -pp$1.parseVarStatement = function(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration") -}; - -pp$1.parseWhileStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement("while"); - this.labels.pop(); - return this.finishNode(node, "WhileStatement") -}; - -pp$1.parseWithStatement = function(node) { - if (this.strict) { this.raise(this.start, "'with' in strict mode"); } - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement("with"); - return this.finishNode(node, "WithStatement") -}; - -pp$1.parseEmptyStatement = function(node) { - this.next(); - return this.finishNode(node, "EmptyStatement") -}; - -pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { - var this$1 = this; - - for (var i$1 = 0, list = this$1.labels; i$1 < list.length; i$1 += 1) - { - var label = list[i$1]; - - if (label.name === maybeName) - { this$1.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } } - var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label$1 = this$1.labels[i]; - if (label$1.statementStart === node.start) { - // Update information about previous labels on this node - label$1.statementStart = this$1.start; - label$1.kind = kind; - } else { break } - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement") -}; - -pp$1.parseExpressionStatement = function(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement") -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp$1.parseBlock = function(createNewLexicalScope, node) { - var this$1 = this; - if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; - if ( node === void 0 ) node = this.startNode(); - - node.body = []; - this.expect(types.braceL); - if (createNewLexicalScope) { this.enterScope(0); } - while (!this.eat(types.braceR)) { - var stmt = this$1.parseStatement(null); - node.body.push(stmt); - } - if (createNewLexicalScope) { this.exitScope(); } - return this.finishNode(node, "BlockStatement") -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp$1.parseFor = function(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.type === types.semi ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.type === types.parenR ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, "ForStatement") -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp$1.parseForIn = function(node, init) { - var type = this.type === types._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - if (type === "ForInStatement") { - if (init.type === "AssignmentPattern" || - (init.type === "VariableDeclaration" && init.declarations[0].init != null && - (this.strict || init.declarations[0].id.type !== "Identifier"))) - { this.raise(init.start, "Invalid assignment in for-in loop head"); } - } - node.left = init; - node.right = type === "ForInStatement" ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, type) -}; - -// Parse a list of variable declarations. - -pp$1.parseVar = function(node, isFor, kind) { - var this$1 = this; - - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this$1.startNode(); - this$1.parseVarId(decl, kind); - if (this$1.eat(types.eq)) { - decl.init = this$1.parseMaybeAssign(isFor); - } else if (kind === "const" && !(this$1.type === types._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { - this$1.unexpected(); - } else if (decl.id.type !== "Identifier" && !(isFor && (this$1.type === types._in || this$1.isContextual("of")))) { - this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")); - if (!this$1.eat(types.comma)) { break } - } - return node -}; + // All token type variables start with an underscore, to make them + // easy to recognize. -pp$1.parseVarId = function(decl, kind) { - if ((kind === "const" || kind === "let") && this.isContextual("let")) { - this.raiseRecoverable(this.start, "let is disallowed as a lexically bound name"); - } - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); -}; - -var FUNC_STATEMENT = 1; -var FUNC_HANGING_STATEMENT = 2; -var FUNC_NULLABLE_ID = 4; - -// Parse a function declaration or literal (depending on the -// `statement & FUNC_STATEMENT`). - -// Remove `allowExpressionBody` for 7.0.0, as it is only called with false -pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { - this.initFunction(node); - if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { - if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) - { this.unexpected(); } - node.generator = this.eat(types.star); - } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - if (statement & FUNC_STATEMENT) { - node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); - if (node.id && !(statement & FUNC_HANGING_STATEMENT)) - // If it is a regular function declaration in sloppy mode, then it is - // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding - // mode depends on properties of the current scope (see - // treatFunctionsAsVar). - { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } - } + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(node.async, node.generator)); - - if (!(statement & FUNC_STATEMENT)) - { node.id = this.type === types.name ? this.parseIdent() : null; } - - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") -}; - -pp$1.parseFunctionParams = function(node) { - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp$1.parseClass = function(node, isStatement) { - var this$1 = this; - - this.next(); - - // ecma-262 14.6 Class Definitions - // A class definition is always strict mode code. - var oldStrict = this.strict; - this.strict = true; - - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - var element = this$1.parseClassElement(node.superClass !== null); - if (element) { - classBody.body.push(element); - if (element.type === "MethodDefinition" && element.kind === "constructor") { - if (hadConstructor) { this$1.raise(element.start, "Duplicate constructor in the same class"); } - hadConstructor = true; - } - } - } - node.body = this.finishNode(classBody, "ClassBody"); - this.strict = oldStrict; - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") -}; - -pp$1.parseClassElement = function(constructorAllowsSuper) { - var this$1 = this; - - if (this.eat(types.semi)) { return null } - - var method = this.startNode(); - var tryContextual = function (k, noLineBreak) { - if ( noLineBreak === void 0 ) noLineBreak = false; - - var start = this$1.start, startLoc = this$1.startLoc; - if (!this$1.eatContextual(k)) { return false } - if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } - if (method.key) { this$1.unexpected(); } - method.computed = false; - method.key = this$1.startNodeAt(start, startLoc); - method.key.name = k; - this$1.finishNode(method.key, "Identifier"); - return false + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; + + // Map keyword names to token types. + + var keywords$1 = {}; + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name; + return keywords$1[name] = new TokenType(name, options) + } + + var types = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + invalidTemplate: new TokenType("invalidTemplate"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=/===/!==", 6), + relational: binop("/<=/>=", 7), + bitShift: binop("<>/>>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class", startsExpr), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import", startsExpr), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) }; - method.kind = "method"; - method.static = tryContextual("static"); - var isGenerator = this.eat(types.star); - var isAsync = false; - if (!isGenerator) { - if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - } else if (tryContextual("get")) { - method.kind = "get"; - } else if (tryContextual("set")) { - method.kind = "set"; - } - } - if (!method.key) { this.parsePropertyName(method); } - var key = method.key; - var allowsDirectSuper = false; - if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { - if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } - if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } - if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } - method.kind = "constructor"; - allowsDirectSuper = constructorAllowsSuper; - } else if (method.static && key.type === "Identifier" && key.name === "prototype") { - this.raise(key.start, "Classes may not have a static property named prototype"); - } - this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); - if (method.kind === "get" && method.value.params.length !== 0) - { this.raiseRecoverable(method.value.start, "getter should have no params"); } - if (method.kind === "set" && method.value.params.length !== 1) - { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } - if (method.kind === "set" && method.value.params[0].type === "RestElement") - { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } - return method -}; - -pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { - method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); - return this.finishNode(method, "MethodDefinition") -}; - -pp$1.parseClassId = function(node, isStatement) { - if (this.type === types.name) { - node.id = this.parseIdent(); - if (isStatement === true) - { this.checkLVal(node.id, BIND_LEXICAL, false); } - } else { - if (isStatement === true) - { this.unexpected(); } - node.id = null; - } -}; + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. -pp$1.parseClassSuper = function(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; -}; + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); -// Parses module export declaration. + function isNewLine(code, ecma2019String) { + return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) + } -pp$1.parseExport = function(node, exports) { - var this$1 = this; + var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - this.next(); - // export * from '...' - if (this.eat(types.star)) { - this.expectContextual("from"); - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(types._default)) { // export default ... - this.checkExport(exports, "default", this.lastTokStart); - var isAsync; - if (this.type === types._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - if (isAsync) { this.next(); } - node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); - } else if (this.type === types._class) { - var cNode = this.startNode(); - node.declaration = this.parseClass(cNode, "nullableID"); - } else { - node.declaration = this.parseMaybeAssign(); - this.semicolon(); - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(null); - if (node.declaration.type === "VariableDeclaration") - { this.checkVariableExport(exports, node.declaration.declarations); } - else - { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } - node.specifiers = []; - node.source = null; - } else { // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports); - if (this.eatContextual("from")) { - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - } else { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - // check for keywords used as local names - var spec = list[i]; + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - this$1.checkUnreserved(spec.local); - // check if export is defined - this$1.checkLocalExport(spec.local); - } + var ref = Object.prototype; + var hasOwnProperty = ref.hasOwnProperty; + var toString = ref.toString; - node.source = null; - } - this.semicolon(); + // Checks if an object has a property. + + function has(obj, propName) { + return hasOwnProperty.call(obj, propName) } - return this.finishNode(node, "ExportNamedDeclaration") -}; - -pp$1.checkExport = function(exports, name, pos) { - if (!exports) { return } - if (has(exports, name)) - { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } - exports[name] = true; -}; - -pp$1.checkPatternExport = function(exports, pat) { - var this$1 = this; - - var type = pat.type; - if (type === "Identifier") - { this.checkExport(exports, pat.name, pat.start); } - else if (type === "ObjectPattern") - { for (var i = 0, list = pat.properties; i < list.length; i += 1) - { - var prop = list[i]; - this$1.checkPatternExport(exports, prop); - } } - else if (type === "ArrayPattern") - { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { - var elt = list$1[i$1]; + var isArray = Array.isArray || (function (obj) { return ( + toString.call(obj) === "[object Array]" + ); }); - if (elt) { this$1.checkPatternExport(exports, elt); } - } } - else if (type === "Property") - { this.checkPatternExport(exports, pat.value); } - else if (type === "AssignmentPattern") - { this.checkPatternExport(exports, pat.left); } - else if (type === "RestElement") - { this.checkPatternExport(exports, pat.argument); } - else if (type === "ParenthesizedExpression") - { this.checkPatternExport(exports, pat.expression); } -}; - -pp$1.checkVariableExport = function(exports, decls) { - var this$1 = this; - - if (!exports) { return } - for (var i = 0, list = decls; i < list.length; i += 1) - { - var decl = list[i]; - - this$1.checkPatternExport(exports, decl.id); - } -}; - -pp$1.shouldParseExportStatement = function() { - return this.type.keyword === "var" || - this.type.keyword === "const" || - this.type.keyword === "class" || - this.type.keyword === "function" || - this.isLet() || - this.isAsyncFunction() -}; - -// Parses a comma-separated list of module exports. - -pp$1.parseExportSpecifiers = function(exports) { - var this$1 = this; - - var nodes = [], first = true; - // export { x, y as z } [from '...'] - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node = this$1.startNode(); - node.local = this$1.parseIdent(true); - node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local; - this$1.checkExport(exports, node.exported.name, node.exported.start); - nodes.push(this$1.finishNode(node, "ExportSpecifier")); + function wordsRegexp(words) { + return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") } - return nodes -}; - -// Parses import declaration. - -pp$1.parseImport = function(node) { - this.next(); - // import '...' - if (this.type === types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration") -}; - -// Parses a comma-separated list of module imports. -pp$1.parseImportSpecifiers = function() { - var this$1 = this; + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. - var nodes = [], first = true; - if (this.type === types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, BIND_LEXICAL); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(types.comma)) { return nodes } - } - if (this.type === types.star) { - var node$1 = this.startNode(); - this.next(); - this.expectContextual("as"); - node$1.local = this.parseIdent(); - this.checkLVal(node$1.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); - return nodes - } - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node$2 = this$1.startNode(); - node$2.imported = this$1.parseIdent(true); - if (this$1.eatContextual("as")) { - node$2.local = this$1.parseIdent(); - } else { - this$1.checkUnreserved(node$2.imported); - node$2.local = node$2.imported; - } - this$1.checkLVal(node$2.local, BIND_LEXICAL); - nodes.push(this$1.finishNode(node$2, "ImportSpecifier")); - } - return nodes -}; + var Position = function Position(line, col) { + this.line = line; + this.column = col; + }; -// Set `ExpressionStatement#directive` property for directive prologues. -pp$1.adaptDirectivePrologue = function(statements) { - for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { - statements[i].directive = statements[i].expression.raw.slice(1, -1); - } -}; -pp$1.isDirectiveCandidate = function(statement) { - return ( - statement.type === "ExpressionStatement" && - statement.expression.type === "Literal" && - typeof statement.expression.value === "string" && - // Reject parenthesized strings. - (this.input[statement.start] === "\"" || this.input[statement.start] === "'") - ) -}; - -var pp$2 = Parser.prototype; - -// Convert existing expression atom to assignable pattern -// if possible. - -pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { - var this$1 = this; - - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") - { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } - break + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; - case "ObjectPattern": - case "ArrayPattern": - case "RestElement": - break + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start; + this.end = end; + if (p.sourceFile !== null) { this.source = p.sourceFile; } + }; - case "ObjectExpression": - node.type = "ObjectPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - this$1.toAssignable(prop, isBinding); - // Early error: - // AssignmentRestProperty[Yield, Await] : - // `...` DestructuringAssignmentTarget[Yield, Await] - // - // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. - if ( - prop.type === "RestElement" && - (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") - ) { - this$1.raise(prop.argument.start, "Unexpected token"); - } + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur) } - break + } + } - case "Property": - // AssignmentProperty has type === "Property" - if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } - this.toAssignable(node.value, isBinding); - break + // A second optional argument can be given to further configure + // the parser process. These options are recognized: + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 + // (2019). This influences support for strict mode, the set of + // reserved words, and support for new syntax features. The default + // is 9. + ecmaVersion: 9, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // the position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; - case "ArrayExpression": - node.type = "ArrayPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - this.toAssignableList(node.elements, isBinding); - break + // Interpret and default an options object - case "SpreadElement": - node.type = "RestElement"; - this.toAssignable(node.argument, isBinding); - if (node.argument.type === "AssignmentPattern") - { this.raise(node.argument.start, "Rest elements cannot have a default value"); } - break + function getOptions(opts) { + var options = {}; - case "AssignmentExpression": - if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isBinding); - // falls through to AssignmentPattern + for (var opt in defaultOptions) + { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - case "AssignmentPattern": - break + if (options.ecmaVersion >= 2015) + { options.ecmaVersion -= 2009; } - case "ParenthesizedExpression": - this.toAssignable(node.expression, isBinding, refDestructuringErrors); - break + if (options.allowReserved == null) + { options.allowReserved = options.ecmaVersion < 5; } - case "MemberExpression": - if (!isBinding) { break } + if (isArray(options.onToken)) { + var tokens = options.onToken; + options.onToken = function (token) { return tokens.push(token); }; + } + if (isArray(options.onComment)) + { options.onComment = pushComment(options, options.onComment); } + + return options + } + + function pushComment(options, array) { + return function(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) + { comment.loc = new SourceLocation(this, startLoc, endLoc); } + if (options.ranges) + { comment.range = [start, end]; } + array.push(comment); + } + } - default: - this.raise(node.start, "Assigning to rvalue"); + // Each scope gets a bitset that may contain these flags + var + SCOPE_TOP = 1, + SCOPE_FUNCTION = 2, + SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128; + + function functionFlags(async, generator) { + return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) + } + + // Used in checkLVal and declareName to determine the type of a binding + var + BIND_NONE = 0, // Not a binding + BIND_VAR = 1, // Var-style binding + BIND_LEXICAL = 2, // Let- or const-style binding + BIND_FUNCTION = 3, // Function declaration + BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding + BIND_OUTSIDE = 5; // Special case for function names as bound inside the function + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]); + var reserved = ""; + if (!options.allowReserved) { + for (var v = options.ecmaVersion;; v--) + { if (reserved = reservedWords[v]) { break } } + if (options.sourceType === "module") { reserved += " await"; } + } + this.reservedWords = wordsRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; + this.reservedWordsStrict = wordsRegexp(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; } - } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - return node -}; -// Convert list of expression atoms to binding list. + // Properties of the current token: + // Its type + this.type = types.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; -pp$2.toAssignableList = function(exprList, isBinding) { - var this$1 = this; + // Figure out if it's a module code. + this.inModule = options.sourceType === "module"; + this.strict = this.inModule || this.strictDirective(this.pos); - var end = exprList.length; - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) { this$1.toAssignable(elt, isBinding); } - } - if (end) { - var last = exprList[end - 1]; - if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") - { this.unexpected(last.argument.start); } - } - return exprList -}; + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; -// Parses spread element. + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + // Labels in scope. + this.labels = []; + // Thus-far undefined exports. + this.undefinedExports = {}; -pp$2.parseSpread = function(refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refDestructuringErrors); - return this.finishNode(node, "SpreadElement") -}; + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") + { this.skipLineComment(2); } -pp$2.parseRestBinding = function() { - var node = this.startNode(); - this.next(); + // Scope tracking for duplicate variable names (see scope.js) + this.scopeStack = []; + this.enterScope(SCOPE_TOP); - // RestElement inside of a function parameter must be an identifier - if (this.options.ecmaVersion === 6 && this.type !== types.name) - { this.unexpected(); } + // For RegExp validation + this.regexpState = null; + }; - node.argument = this.parseBindingAtom(); + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - return this.finishNode(node, "RestElement") -}; + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node) + }; -// Parses lvalue (assignable) atom. + prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; + prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; + prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; + prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; + prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; + prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; -pp$2.parseBindingAtom = function() { - if (this.options.ecmaVersion >= 6) { - switch (this.type) { - case types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern") + // Switch to a getter for 7.0.0. + Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; - case types.braceL: - return this.parseObj(true) - } - } - return this.parseIdent() -}; - -pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (first) { first = false; } - else { this$1.expect(types.comma); } - if (allowEmpty && this$1.type === types.comma) { - elts.push(null); - } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { - break - } else if (this$1.type === types.ellipsis) { - var rest = this$1.parseRestBinding(); - this$1.parseBindingListItem(rest); - elts.push(rest); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - this$1.expect(close); - break - } else { - var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc); - this$1.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts -}; - -pp$2.parseBindingListItem = function(param) { - return param -}; - -// Parses assignment pattern around given atom if possible. - -pp$2.parseMaybeDefault = function(startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern") -}; - -// Verify that a node is an lval — something that can be assigned -// to. -// bindingType can be either: -// 'var' indicating that the lval creates a 'var' binding -// 'let' indicating that the lval creates a lexical ('let' or 'const') binding -// 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references - -pp$2.checkLVal = function(expr, bindingType, checkClashes) { - var this$1 = this; - if ( bindingType === void 0 ) bindingType = BIND_NONE; - - switch (expr.type) { - case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } - if (checkClashes) { - if (has(checkClashes, expr.name)) - { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; - } - if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } - break - - case "MemberExpression": - if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } - break - - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) - { - var prop = list[i]; + Parser.extend = function extend () { + var plugins = [], len = arguments.length; + while ( len-- ) plugins[ len ] = arguments[ len ]; - this$1.checkLVal(prop, bindingType, checkClashes); - } - break + var cls = this; + for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } + return cls + }; - case "Property": - // AssignmentProperty has type === "Property" - this.checkLVal(expr.value, bindingType, checkClashes); - break + Parser.parse = function parse (input, options) { + return new this(options, input).parse() + }; - case "ArrayPattern": - for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { - var elem = list$1[i$1]; + Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { + var parser = new this(options, input, pos); + parser.nextToken(); + return parser.parseExpression() + }; - if (elem) { this$1.checkLVal(elem, bindingType, checkClashes); } - } - break + Parser.tokenizer = function tokenizer (input, options) { + return new this(options, input) + }; - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes); - break + Object.defineProperties( Parser.prototype, prototypeAccessors ); - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes); - break + var pp = Parser.prototype; - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes); - break + // ## Parser utilities - default: - this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - -var pp$3 = Parser.prototype; - -// Check if property name clashes with already added. -// Object/class getters and setters are not allowed to clash — -// either with each other or with an init property — and in -// strict mode, init properties are also not allowed to be repeated. - -pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { - if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") - { return } - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - { return } - var key = prop.key; - var name; - switch (key.type) { - case "Identifier": name = key.name; break - case "Literal": name = String(key.value); break - default: return - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) { - if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } - // Backwards-compat kludge. Can be removed in version 6.0 - else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } - } - propHash.proto = true; + var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; + pp.strictDirective = function(start) { + for (;;) { + // Try to find string literal. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) { return false } + if ((match[1] || match[2]) === "use strict") { return true } + start += match[0].length; + + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + if (this.input[start] === ";") + { start++; } } - return - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var redefinition; - if (kind === "init") { - redefinition = this.strict && other.init || other.get || other.set; - } else { - redefinition = other.init || other[kind]; - } - if (redefinition) - { this.raiseRecoverable(key.start, "Redefinition of property"); } - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp$3.parseExpression = function(noIn, refDestructuringErrors) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); - if (this.type === types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(types.comma)) { node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)); } - return this.finishNode(node, "SequenceExpression") - } - return expr -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { - if (this.isContextual("yield")) { - if (this.inGenerator) { return this.parseYield(noIn) } - // The tokenizer will assume an expression is allowed after - // `yield`, but this isn't that kind of yield - else { this.exprAllowed = false; } - } + }; - var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign; - oldTrailingComma = refDestructuringErrors.trailingComma; - oldShorthandAssign = refDestructuringErrors.shorthandAssign; - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; - } else { - refDestructuringErrors = new DestructuringErrors; - ownDestructuringErrors = true; - } + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. - var startPos = this.start, startLoc = this.startLoc; - if (this.type === types.parenL || this.type === types.name) - { this.potentialArrowAt = this.start; } - var left = this.parseMaybeConditional(noIn, refDestructuringErrors); - if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; - if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } - refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression") - } else { - if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } - } - if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } - if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } - if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } - return left -}; - -// Parse a ternary conditional (`?:`) operator. - -pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - if (this.eat(types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression") - } - return expr -}; - -// Start the precedence parser. - -pp$3.parseExprOps = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== types._in)) { - if (prec > minPrec) { - var logical = this.type === types.logicalOR || this.type === types.logicalAND; - var op = this.value; + pp.eat = function(type) { + if (this.type === type) { this.next(); - var startPos = this.start, startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) - } - } - return left -}; - -pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") -}; - -// Parse unary operators, both prefix and postfix. - -pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, expr; - if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { - expr = this.parseAwait(); - sawUnary = true; - } else if (this.type.prefix) { - var node = this.startNode(), update = this.type === types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { this.checkLVal(node.argument); } - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") - { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } - else { sawUnary = true; } - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else { - expr = this.parseExprSubscripts(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - while (this.type.postfix && !this.canInsertSemicolon()) { - var node$1 = this$1.startNodeAt(startPos, startLoc); - node$1.operator = this$1.value; - node$1.prefix = false; - node$1.argument = expr; - this$1.checkLVal(expr); - this$1.next(); - expr = this$1.finishNode(node$1, "UpdateExpression"); + return true + } else { + return false } - } + }; - if (!sawUnary && this.eat(types.starstar)) - { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } - else - { return expr } -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp$3.parseExprSubscripts = function(refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors); - var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } - var result = this.parseSubscripts(expr, startPos, startLoc); - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } - if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } - } - return result -}; - -pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { - var this$1 = this; - - var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; - while (true) { - var element = this$1.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); - if (element === base || element.type === "ArrowFunctionExpression") { return element } - base = element; - } -}; + // Tests whether parsed token is a contextual keyword. -pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { - var computed = this.eat(types.bracketL); - if (computed || this.eat(types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = computed ? this.parseExpression() : this.parseIdent(true); - node.computed = !!computed; - if (computed) { this.expect(types.bracketR); } - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(types.parenL)) { - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); - if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - if (this.awaitIdentPos > 0) - { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) - } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.callee = base; - node$1.arguments = exprList; - base = this.finishNode(node$1, "CallExpression"); - } else if (this.type === types.backQuote) { - var node$2 = this.startNodeAt(startPos, startLoc); - node$2.tag = base; - node$2.quasi = this.parseTemplate({isTagged: true}); - base = this.finishNode(node$2, "TaggedTemplateExpression"); - } - return base -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp$3.parseExprAtom = function(refDestructuringErrors) { - // If a division operator appears in an expression position, the - // tokenizer got confused, and we force it to read a regexp instead. - if (this.type === types.slash) { this.readRegexp(); } - - var node, canBeArrow = this.potentialArrowAt === this.start; - switch (this.type) { - case types._super: - if (!this.allowSuper) - { this.raise(this.start, "'super' keyword outside a method"); } - node = this.startNode(); - this.next(); - if (this.type === types.parenL && !this.allowDirectSuper) - { this.raise(node.start, "super() call outside constructor of a subclass"); } - // The `super` keyword can appear at below: - // SuperProperty: - // super [ Expression ] - // super . IdentifierName - // SuperCall: - // super Arguments - if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) - { this.unexpected(); } - return this.finishNode(node, "Super") + pp.isContextual = function(name) { + return this.type === types.name && this.value === name && !this.containsEsc + }; + + // Consumes contextual keyword if possible. - case types._this: - node = this.startNode(); + pp.eatContextual = function(name) { + if (!this.isContextual(name)) { return false } this.next(); - return this.finishNode(node, "ThisExpression") - - case types.name: - var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; - var id = this.parseIdent(false); - if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) - { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(types.arrow)) - { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { - id = this.parseIdent(false); - if (this.canInsertSemicolon() || !this.eat(types.arrow)) - { this.unexpected(); } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) - } - } - return id + return true + }; - case types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = {pattern: value.pattern, flags: value.flags}; - return node + // Asserts that following token is given contextual keyword. - case types.num: case types.string: - return this.parseLiteral(this.value) + pp.expectContextual = function(name) { + if (!this.eatContextual(name)) { this.unexpected(); } + }; - case types._null: case types._true: case types._false: - node = this.startNode(); - node.value = this.type === types._null ? null : this.type === types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal") + // Test whether a semicolon can be inserted at the current position. - case types.parenL: - var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) - { refDestructuringErrors.parenthesizedAssign = start; } - if (refDestructuringErrors.parenthesizedBind < 0) - { refDestructuringErrors.parenthesizedBind = start; } + pp.canInsertSemicolon = function() { + return this.type === types.eof || + this.type === types.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } + return true } - return expr + }; - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression") + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. - case types.braceL: - return this.parseObj(false, refDestructuringErrors) + pp.semicolon = function() { + if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } + }; - case types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, 0) + pp.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) + { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } + if (!notNext) + { this.next(); } + return true + } + }; - case types._class: - return this.parseClass(this.startNode(), false) + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. - case types._new: - return this.parseNew() + pp.expect = function(type) { + this.eat(type) || this.unexpected(); + }; - case types.backQuote: - return this.parseTemplate() + // Raise an unexpected token error. - default: - this.unexpected(); - } -}; - -pp$3.parseLiteral = function(value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal") -}; - -pp$3.parseParenExpression = function() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val -}; - -pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; - if (this.options.ecmaVersion >= 6) { - this.next(); + pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; - var innerStartPos = this.start, innerStartLoc = this.startLoc; - var exprList = [], first = true, lastIsComma = false; - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; - this.yieldPos = 0; - this.awaitPos = 0; - // Do not save awaitIdentPos to allow checking awaits nested in parameters - while (this.type !== types.parenR) { - first ? first = false : this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) { - lastIsComma = true; - break - } else if (this$1.type === types.ellipsis) { - spreadStart = this$1.start; - exprList.push(this$1.parseParenItem(this$1.parseRestBinding())); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - break - } else { - exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)); - } - } - var innerEndPos = this.start, innerEndLoc = this.startLoc; - this.expect(types.parenR); + function DestructuringErrors() { + this.shorthandAssign = + this.trailingComma = + this.parenthesizedAssign = + this.parenthesizedBind = + this.doubleProto = + -1; + } + + pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { return } + if (refDestructuringErrors.trailingComma > -1) + { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } + }; - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - return this.parseParenArrowList(startPos, startLoc, exprList) - } + pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { return false } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } + if (shorthandAssign >= 0) + { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } + if (doubleProto >= 0) + { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } + }; - if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } - if (spreadStart) { this.unexpected(spreadStart); } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; + pp.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } + if (this.awaitPos) + { this.raise(this.awaitPos, "Await expression cannot be a default value"); } + }; - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } + pp.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + { return this.isSimpleAssignTarget(expr.expression) } + return expr.type === "Identifier" || expr.type === "MemberExpression" + }; - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression") - } else { - return val - } -}; + var pp$1 = Parser.prototype; -pp$3.parseParenItem = function(item) { - return item -}; + // ### Statement parsing -pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) -}; + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. -// New's precedence is slightly tricky. It must allow its argument to -// be a `[]` or dot subscript expression, but not a call — at least, -// not without wrapping it in parentheses. Thus, it uses the noCalls -// argument to parseSubscripts to prevent it from consuming the -// argument list. + pp$1.parseTopLevel = function(node) { + var exports = {}; + if (!node.body) { node.body = []; } + while (this.type !== types.eof) { + var stmt = this.parseStatement(null, true, exports); + node.body.push(stmt); + } + if (this.inModule) + { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) + { + var name = list[i]; + + this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); + } } + this.adaptDirectivePrologue(node.body); + this.next(); + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType; + } + return this.finishNode(node, "Program") + }; + + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + pp$1.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + // For ambiguous cases, determine if a LexicalDeclaration (or only a + // Statement) is allowed here. If context is not empty then only a Statement + // is allowed. However, `let [` is an explicit negative lookahead for + // ExpressionStatement, so special-case it first. + if (nextCh === 91) { return true } // '[' + if (context) { return false } + + if (nextCh === 123) { return true } // '{' + if (isIdentifierStart(nextCh, true)) { + var pos = next + 1; + while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) { return true } + } + return false + }; + + // check 'async [no LineTerminator here] function' + // - 'async /*foo*/ function' is OK. + // - 'async /*\n*/ function' is invalid. + pp$1.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) + { return false } + + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length; + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) + }; + + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. + + pp$1.parseStatement = function(context, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind; + + if (this.isLet(context)) { + starttype = types._var; + kind = "let"; + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case types._debugger: return this.parseDebuggerStatement(node) + case types._do: return this.parseDoStatement(node) + case types._for: return this.parseForStatement(node) + case types._function: + // Function as sole body of either an if statement or a labeled statement + // works, but not when it is part of a labeled statement that is the sole + // body of an if statement. + if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } + return this.parseFunctionStatement(node, false, !context) + case types._class: + if (context) { this.unexpected(); } + return this.parseClass(node, true) + case types._if: return this.parseIfStatement(node) + case types._return: return this.parseReturnStatement(node) + case types._switch: return this.parseSwitchStatement(node) + case types._throw: return this.parseThrowStatement(node) + case types._try: return this.parseTryStatement(node) + case types._const: case types._var: + kind = kind || this.value; + if (context && kind !== "var") { this.unexpected(); } + return this.parseVarStatement(node, kind) + case types._while: return this.parseWhileStatement(node) + case types._with: return this.parseWithStatement(node) + case types.braceL: return this.parseBlock(true, node) + case types.semi: return this.parseEmptyStatement(node) + case types._export: + case types._import: + if (this.options.ecmaVersion > 10 && starttype === types._import) { + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40) // '(' + { return this.parseExpressionStatement(node, this.parseExpression()) } + } + + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } + if (!this.inModule) + { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } + } + return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { this.unexpected(); } + this.next(); + return this.parseFunctionStatement(node, true, !context) + } + + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) + { return this.parseLabeledStatement(node, maybeName, expr, context) } + else { return this.parseExpressionStatement(node, expr) } + } + }; + + pp$1.parseBreakContinueStatement = function(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } + else if (this.type !== types.name) { this.unexpected(); } + else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + var i = 0; + for (; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } + if (node.label && isBreak) { break } + } + } + if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + }; + + pp$1.parseDebuggerStatement = function(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement") + }; + + pp$1.parseDoStatement = function(node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) + { this.eat(types.semi); } + else + { this.semicolon(); } + return this.finishNode(node, "DoWhileStatement") + }; + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$1.parseForStatement = function(node) { + this.next(); + var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; + this.labels.push(loopLabel); + this.enterScope(0); + this.expect(types.parenL); + if (this.type === types.semi) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, null) + } + var isLet = this.isLet(); + if (this.type === types._var || this.type === types._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + return this.parseForIn(node, init$1) + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors; + var init = this.parseExpression(true, refDestructuringErrors); + if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLVal(init); + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init) + }; + + pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) + }; + + pp$1.parseIfStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement") + }; + + pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + { this.raise(this.start, "'return' outside of function"); } + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } + else { node.argument = this.parseExpression(); this.semicolon(); } + return this.finishNode(node, "ReturnStatement") + }; + + pp$1.parseSwitchStatement = function(node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(types.braceL); + this.labels.push(switchLabel); + this.enterScope(0); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + var cur; + for (var sawDefault = false; this.type !== types.braceR;) { + if (this.type === types._case || this.type === types._default) { + var isCase = this.type === types._case; + if (cur) { this.finishNode(cur, "SwitchCase"); } + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } + sawDefault = true; + cur.test = null; + } + this.expect(types.colon); + } else { + if (!cur) { this.unexpected(); } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { this.finishNode(cur, "SwitchCase"); } + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement") + }; + + pp$1.parseThrowStatement = function(node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + { this.raise(this.lastTokEnd, "Illegal newline after throw"); } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement") + }; + + // Reused empty array added for node fields that are always empty. + + var empty = []; + + pp$1.parseTryStatement = function(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === types._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types.parenL)) { + clause.param = this.parseBindingAtom(); + var simple = clause.param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.expect(types.parenR); + } else { + if (this.options.ecmaVersion < 10) { this.unexpected(); } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) + { this.raise(node.start, "Missing catch or finally clause"); } + return this.finishNode(node, "TryStatement") + }; + + pp$1.parseVarStatement = function(node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration") + }; + + pp$1.parseWhileStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node, "WhileStatement") + }; + + pp$1.parseWithStatement = function(node) { + if (this.strict) { this.raise(this.start, "'with' in strict mode"); } + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement("with"); + return this.finishNode(node, "WithStatement") + }; + + pp$1.parseEmptyStatement = function(node) { + this.next(); + return this.finishNode(node, "EmptyStatement") + }; + + pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { + for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) + { + var label = list[i$1]; + + if (label.name === maybeName) + { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } } + var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label$1 = this.labels[i]; + if (label$1.statementStart === node.start) { + // Update information about previous labels on this node + label$1.statementStart = this.start; + label$1.kind = kind; + } else { break } + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement") + }; + + pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement") + }; + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$1.parseBlock = function(createNewLexicalScope, node) { + if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; + if ( node === void 0 ) node = this.startNode(); + + node.body = []; + this.expect(types.braceL); + if (createNewLexicalScope) { this.enterScope(0); } + while (!this.eat(types.braceR)) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + if (createNewLexicalScope) { this.exitScope(); } + return this.finishNode(node, "BlockStatement") + }; + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$1.parseFor = function(node, init) { + node.init = init; + this.expect(types.semi); + node.test = this.type === types.semi ? null : this.parseExpression(); + this.expect(types.semi); + node.update = this.type === types.parenR ? null : this.parseExpression(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, "ForStatement") + }; + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$1.parseForIn = function(node, init) { + var isForIn = this.type === types._in; + this.next(); + + if ( + init.type === "VariableDeclaration" && + init.declarations[0].init != null && + ( + !isForIn || + this.options.ecmaVersion < 8 || + this.strict || + init.kind !== "var" || + init.declarations[0].id.type !== "Identifier" + ) + ) { + this.raise( + init.start, + ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") + ); + } else if (init.type === "AssignmentPattern") { + this.raise(init.start, "Invalid left-hand side in for-loop"); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") + }; + + // Parse a list of variable declarations. + + pp$1.parseVar = function(node, isFor, kind) { + node.declarations = []; + node.kind = kind; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === "const" && !(this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { + this.unexpected(); + } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types.comma)) { break } + } + return node + }; + + pp$1.parseVarId = function(decl, kind) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + }; + + var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; + + // Parse a function declaration or literal (depending on the + // `statement & FUNC_STATEMENT`). + + // Remove `allowExpressionBody` for 7.0.0, as it is only called with false + pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { + this.initFunction(node); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) + { this.unexpected(); } + node.generator = this.eat(types.star); + } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + if (statement & FUNC_STATEMENT) { + node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); + if (node.id && !(statement & FUNC_HANGING_STATEMENT)) + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + } + + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + + if (!(statement & FUNC_STATEMENT)) + { node.id = this.type === types.name ? this.parseIdent() : null; } + + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") + }; + + pp$1.parseFunctionParams = function(node) { + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$1.parseClass = function(node, isStatement) { + this.next(); + + // ecma-262 14.6 Class Definitions + // A class definition is always strict mode code. + var oldStrict = this.strict; + this.strict = true; + + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + var element = this.parseClassElement(node.superClass !== null); + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor") { + if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); } + hadConstructor = true; + } + } + } + node.body = this.finishNode(classBody, "ClassBody"); + this.strict = oldStrict; + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + }; + + pp$1.parseClassElement = function(constructorAllowsSuper) { + var this$1 = this; + + if (this.eat(types.semi)) { return null } + + var method = this.startNode(); + var tryContextual = function (k, noLineBreak) { + if ( noLineBreak === void 0 ) noLineBreak = false; + + var start = this$1.start, startLoc = this$1.startLoc; + if (!this$1.eatContextual(k)) { return false } + if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } + if (method.key) { this$1.unexpected(); } + method.computed = false; + method.key = this$1.startNodeAt(start, startLoc); + method.key.name = k; + this$1.finishNode(method.key, "Identifier"); + return false + }; + + method.kind = "method"; + method.static = tryContextual("static"); + var isGenerator = this.eat(types.star); + var isAsync = false; + if (!isGenerator) { + if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + } else if (tryContextual("get")) { + method.kind = "get"; + } else if (tryContextual("set")) { + method.kind = "set"; + } + } + if (!method.key) { this.parsePropertyName(method); } + var key = method.key; + var allowsDirectSuper = false; + if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } + if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } + if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } + method.kind = "constructor"; + allowsDirectSuper = constructorAllowsSuper; + } else if (method.static && key.type === "Identifier" && key.name === "prototype") { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); + if (method.kind === "get" && method.value.params.length !== 0) + { this.raiseRecoverable(method.value.start, "getter should have no params"); } + if (method.kind === "set" && method.value.params.length !== 1) + { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } + return method + }; + + pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + return this.finishNode(method, "MethodDefinition") + }; + + pp$1.parseClassId = function(node, isStatement) { + if (this.type === types.name) { + node.id = this.parseIdent(); + if (isStatement) + { this.checkLVal(node.id, BIND_LEXICAL, false); } + } else { + if (isStatement === true) + { this.unexpected(); } + node.id = null; + } + }; + + pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; + }; + + // Parses module export declaration. + + pp$1.parseExport = function(node, exports) { + this.next(); + // export * from '...' + if (this.eat(types.star)) { + this.expectContextual("from"); + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(types._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart); + var isAsync; + if (this.type === types._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { this.next(); } + node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); + } else if (this.type === types._class) { + var cNode = this.startNode(); + node.declaration = this.parseClass(cNode, "nullableID"); + } else { + node.declaration = this.parseMaybeAssign(); + this.semicolon(); + } + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(null); + if (node.declaration.type === "VariableDeclaration") + { this.checkVariableExport(exports, node.declaration.declarations); } + else + { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } + node.specifiers = []; + node.source = null; + } else { // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + } else { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) { + // check for keywords used as local names + var spec = list[i]; + + this.checkUnreserved(spec.local); + // check if export is defined + this.checkLocalExport(spec.local); + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration") + }; + + pp$1.checkExport = function(exports, name, pos) { + if (!exports) { return } + if (has(exports, name)) + { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } + exports[name] = true; + }; + + pp$1.checkPatternExport = function(exports, pat) { + var type = pat.type; + if (type === "Identifier") + { this.checkExport(exports, pat.name, pat.start); } + else if (type === "ObjectPattern") + { for (var i = 0, list = pat.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkPatternExport(exports, prop); + } } + else if (type === "ArrayPattern") + { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + + if (elt) { this.checkPatternExport(exports, elt); } + } } + else if (type === "Property") + { this.checkPatternExport(exports, pat.value); } + else if (type === "AssignmentPattern") + { this.checkPatternExport(exports, pat.left); } + else if (type === "RestElement") + { this.checkPatternExport(exports, pat.argument); } + else if (type === "ParenthesizedExpression") + { this.checkPatternExport(exports, pat.expression); } + }; + + pp$1.checkVariableExport = function(exports, decls) { + if (!exports) { return } + for (var i = 0, list = decls; i < list.length; i += 1) + { + var decl = list[i]; + + this.checkPatternExport(exports, decl.id); + } + }; + + pp$1.shouldParseExportStatement = function() { + return this.type.keyword === "var" || + this.type.keyword === "const" || + this.type.keyword === "class" || + this.type.keyword === "function" || + this.isLet() || + this.isAsyncFunction() + }; + + // Parses a comma-separated list of module exports. + + pp$1.parseExportSpecifiers = function(exports) { + var nodes = [], first = true; + // export { x, y as z } [from '...'] + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node = this.startNode(); + node.local = this.parseIdent(true); + node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; + this.checkExport(exports, node.exported.name, node.exported.start); + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + return nodes + }; + + // Parses import declaration. + + pp$1.parseImport = function(node) { + this.next(); + // import '...' + if (this.type === types.string) { + node.specifiers = empty; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration") + }; + + // Parses a comma-separated list of module imports. + + pp$1.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLVal(node.local, BIND_LEXICAL); + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); + if (!this.eat(types.comma)) { return nodes } + } + if (this.type === types.star) { + var node$1 = this.startNode(); + this.next(); + this.expectContextual("as"); + node$1.local = this.parseIdent(); + this.checkLVal(node$1.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); + return nodes + } + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node$2 = this.startNode(); + node$2.imported = this.parseIdent(true); + if (this.eatContextual("as")) { + node$2.local = this.parseIdent(); + } else { + this.checkUnreserved(node$2.imported); + node$2.local = node$2.imported; + } + this.checkLVal(node$2.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$2, "ImportSpecifier")); + } + return nodes + }; + + // Set `ExpressionStatement#directive` property for directive prologues. + pp$1.adaptDirectivePrologue = function(statements) { + for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { + statements[i].directive = statements[i].expression.raw.slice(1, -1); + } + }; + pp$1.isDirectiveCandidate = function(statement) { + return ( + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + typeof statement.expression.value === "string" && + // Reject parenthesized strings. + (this.input[statement.start] === "\"" || this.input[statement.start] === "'") + ) + }; + + var pp$2 = Parser.prototype; + + // Convert existing expression atom to assignable pattern + // if possible. + + pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } + break + + case "ObjectPattern": + case "ArrayPattern": + case "RestElement": + break + + case "ObjectExpression": + node.type = "ObjectPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.toAssignable(prop, isBinding); + // Early error: + // AssignmentRestProperty[Yield, Await] : + // `...` DestructuringAssignmentTarget[Yield, Await] + // + // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. + if ( + prop.type === "RestElement" && + (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") + ) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break + + case "Property": + // AssignmentProperty has type === "Property" + if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } + this.toAssignable(node.value, isBinding); + break + + case "ArrayExpression": + node.type = "ArrayPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + this.toAssignableList(node.elements, isBinding); + break + + case "SpreadElement": + node.type = "RestElement"; + this.toAssignable(node.argument, isBinding); + if (node.argument.type === "AssignmentPattern") + { this.raise(node.argument.start, "Rest elements cannot have a default value"); } + break + + case "AssignmentExpression": + if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isBinding); + // falls through to AssignmentPattern + + case "AssignmentPattern": + break + + case "ParenthesizedExpression": + this.toAssignable(node.expression, isBinding, refDestructuringErrors); + break + + case "MemberExpression": + if (!isBinding) { break } + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + return node + }; + + // Convert list of expression atoms to binding list. + + pp$2.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) { this.toAssignable(elt, isBinding); } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + { this.unexpected(last.argument.start); } + } + return exprList + }; + + // Parses spread element. + + pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node, "SpreadElement") + }; + + pp$2.parseRestBinding = function() { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (this.options.ecmaVersion === 6 && this.type !== types.name) + { this.unexpected(); } + + node.argument = this.parseBindingAtom(); + + return this.finishNode(node, "RestElement") + }; + + // Parses lvalue (assignable) atom. + + pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types.bracketR, true, true); + return this.finishNode(node, "ArrayPattern") + + case types.braceL: + return this.parseObj(true) + } + } + return this.parseIdent() + }; + + pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { first = false; } + else { this.expect(types.comma); } + if (allowEmpty && this.type === types.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break + } else if (this.type === types.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + this.expect(close); + break + } else { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + elts.push(elem); + } + } + return elts + }; + + pp$2.parseBindingListItem = function(param) { + return param + }; + + // Parses assignment pattern around given atom if possible. + + pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern") + }; + + // Verify that a node is an lval — something that can be assigned + // to. + // bindingType can be either: + // 'var' indicating that the lval creates a 'var' binding + // 'let' indicating that the lval creates a lexical ('let' or 'const') binding + // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references + + pp$2.checkLVal = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Identifier": + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (checkClashes) { + if (has(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + break + + case "MemberExpression": + if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } + break + + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkLVal(prop, bindingType, checkClashes); + } + break + + case "Property": + // AssignmentProperty has type === "Property" + this.checkLVal(expr.value, bindingType, checkClashes); + break + + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + + if (elem) { this.checkLVal(elem, bindingType, checkClashes); } + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, bindingType, checkClashes); + break + + case "RestElement": + this.checkLVal(expr.argument, bindingType, checkClashes); + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, bindingType, checkClashes); + break + + default: + this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); + } + }; + + // A recursive descent parser operates by defining functions for all + + var pp$3 = Parser.prototype; + + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. + + pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") + { return } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + { return } + var key = prop.key; + var name; + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } + // Backwards-compat kludge. Can be removed in version 6.0 + else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } + } + propHash.proto = true; + } + return + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) + { this.raiseRecoverable(key.start, "Redefinition of property"); } + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); + if (this.type === types.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(types.comma)) { node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); } + return this.finishNode(node, "SequenceExpression") + } + return expr + }; + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { return this.parseYield(noIn) } + // The tokenizer will assume an expression is allowed after + // `yield`, but this isn't that kind of yield + else { this.exprAllowed = false; } + } + + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldShorthandAssign = refDestructuringErrors.shorthandAssign; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; + } else { + refDestructuringErrors = new DestructuringErrors; + ownDestructuringErrors = true; + } + + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types.parenL || this.type === types.name) + { this.potentialArrowAt = this.start; } + var left = this.parseMaybeConditional(noIn, refDestructuringErrors); + if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; + if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } + refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly + this.checkLVal(left); + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } + } + if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } + if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } + if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } + return left + }; + + // Parse a ternary conditional (`?:`) operator. + + pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(noIn, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + if (this.eat(types.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression") + } + return expr + }; + + // Start the precedence parser. + + pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) + }; + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== types._in)) { + if (prec > minPrec) { + var logical = this.type === types.logicalOR || this.type === types.logicalAND; + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left + }; + + pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.operator = op; + node.right = right; + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + }; + + // Parse unary operators, both prefix and postfix. + + pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { + expr = this.parseAwait(); + sawUnary = true; + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === types.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(null, true); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { this.checkLVal(node.argument); } + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } + else { sawUnary = true; } + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } else { + expr = this.parseExprSubscripts(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + + if (!sawUnary && this.eat(types.starstar)) + { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } + else + { return expr } + }; + + // Parse call, dot, and `[]`-subscript expressions. + + pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors); + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } + var result = this.parseSubscripts(expr, startPos, startLoc); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } + if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } + } + return result + }; + + pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; + while (true) { + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); + if (element === base || element.type === "ArrowFunctionExpression") { return element } + base = element; + } + }; + + pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { + var computed = this.eat(types.bracketL); + if (computed || this.eat(types.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = computed ? this.parseExpression() : this.parseIdent(true); + node.computed = !!computed; + if (computed) { this.expect(types.bracketR); } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(types.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && base.type !== "Import", false, refDestructuringErrors); + if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (node$1.callee.type === "Import") { + if (node$1.arguments.length !== 1) { + this.raise(node$1.start, "import() requires exactly one argument"); + } + + var importArg = node$1.arguments[0]; + if (importArg && importArg.type === "SpreadElement") { + this.raise(importArg.start, "... is not allowed in import()"); + } + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types.backQuote) { + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({isTagged: true}); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base + }; + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$3.parseExprAtom = function(refDestructuringErrors) { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.type === types.slash) { this.readRegexp(); } + + var node, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types._super: + if (!this.allowSuper) + { this.raise(this.start, "'super' keyword outside a method"); } + node = this.startNode(); + this.next(); + if (this.type === types.parenL && !this.allowDirectSuper) + { this.raise(node.start, "super() call outside constructor of a subclass"); } + // The `super` keyword can appear at below: + // SuperProperty: + // super [ Expression ] + // super . IdentifierName + // SuperCall: + // super Arguments + if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) + { this.unexpected(); } + return this.finishNode(node, "Super") + + case types._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression") + + case types.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) + { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types.arrow)) + { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types.arrow)) + { this.unexpected(); } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) + } + } + return id + + case types.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = {pattern: value.pattern, flags: value.flags}; + return node + + case types.num: case types.string: + return this.parseLiteral(this.value) + + case types._null: case types._true: case types._false: + node = this.startNode(); + node.value = this.type === types._null ? null : this.type === types._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal") + + case types.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + { refDestructuringErrors.parenthesizedAssign = start; } + if (refDestructuringErrors.parenthesizedBind < 0) + { refDestructuringErrors.parenthesizedBind = start; } + } + return expr + + case types.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression") + + case types.braceL: + return this.parseObj(false, refDestructuringErrors) + + case types._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, 0) + + case types._class: + return this.parseClass(this.startNode(), false) + + case types._new: + return this.parseNew() + + case types.backQuote: + return this.parseTemplate() + + case types._import: + if (this.options.ecmaVersion > 10) { + return this.parseDynamicImport() + } else { + return this.unexpected() + } + + default: + this.unexpected(); + } + }; + + pp$3.parseDynamicImport = function() { + var node = this.startNode(); + this.next(); + if (this.type !== types.parenL) { + this.unexpected(); + } + return this.finishNode(node, "Import") + }; + + pp$3.parseLiteral = function(value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1); } + this.next(); + return this.finishNode(node, "Literal") + }; + + pp$3.parseParenExpression = function() { + this.expect(types.parenL); + var val = this.parseExpression(); + this.expect(types.parenR); + return val + }; + + pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + // Do not save awaitIdentPos to allow checking awaits nested in parameters + while (this.type !== types.parenR) { + first ? first = false : this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(types.parenR, true)) { + lastIsComma = true; + break + } else if (this.type === types.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + break + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc; + this.expect(types.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } + if (spreadStart) { this.unexpected(spreadStart); } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } + }; + + pp$3.parseParenItem = function(item) { + return item + }; + + pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) + }; + + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. + + var empty$1 = []; + + pp$3.parseNew = function() { + var node = this.startNode(); + var meta = this.parseIdent(true); + if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { + node.meta = meta; + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target" || containsEsc) + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } + if (!this.inNonArrowFunction()) + { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + if (this.options.ecmaVersion > 10 && node.callee.type === "Import") { + this.raise(node.callee.start, "Cannot use new with import(...)"); + } + if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && node.callee.type !== "Import", false); } + else { node.arguments = empty$1; } + return this.finishNode(node, "NewExpression") + }; + + // Parse template expression. + + pp$3.parseTemplateElement = function(ref) { + var isTagged = ref.isTagged; + + var elem = this.startNode(); + if (this.type === types.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value, + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types.backQuote; + return this.finishNode(elem, "TemplateElement") + }; + + pp$3.parseTemplate = function(ref) { + if ( ref === void 0 ) ref = {}; + var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; + + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement({isTagged: isTagged}); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types.eof) { this.raise(this.pos, "Unterminated template literal"); } + this.expect(types.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types.braceR); + node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); + } + this.next(); + return this.finishNode(node, "TemplateLiteral") + }; + + pp$3.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && + (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && + !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + // Parse an object literal or binding pattern. + + pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var node = this.startNode(), first = true, propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } + node.properties.push(prop); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + }; + + pp$3.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types.comma) { + this.raise(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement") + } + // To disallow parenthesized identifier via `this.toAssignable()`. + if (this.type === types.parenL && refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0) { + refDestructuringErrors.parenthesizedAssign = this.start; + } + if (refDestructuringErrors.parenthesizedBind < 0) { + refDestructuringErrors.parenthesizedBind = this.start; + } + } + // Parse argument. + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + // To disallow trailing comma via `this.toAssignable()`. + if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + // Finish + return this.finishNode(prop, "SpreadElement") + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) + { isGenerator = this.eat(types.star); } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + this.parsePropertyName(prop, refDestructuringErrors); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property") + }; + + pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types.colon) + { this.unexpected(); } + + if (this.eat(types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { + if (isPattern) { this.unexpected(); } + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (!isPattern && !containsEsc && + this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type !== types.comma && this.type !== types.braceR)) { + if (isGenerator || isAsync) { this.unexpected(); } + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start = prop.value.start; + if (prop.kind === "get") + { this.raiseRecoverable(start, "getter should have no params"); } + else + { this.raiseRecoverable(start, "setter should have exactly one param"); } + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } + } + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { this.unexpected(); } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = startPos; } + prop.kind = "init"; + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else if (this.type === types.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + { refDestructuringErrors.shorthandAssign = this.start; } + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else { + prop.value = prop.key; + } + prop.shorthand = true; + } else { this.unexpected(); } + }; + + pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types.bracketR); + return prop.key + } else { + prop.computed = false; + } + } + return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true) + }; + + // Initialize empty function node. + + pp$3.initFunction = function(node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } + if (this.options.ecmaVersion >= 8) { node.async = false; } + }; + + // Parse object or class method. + + pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.initFunction(node); + if (this.options.ecmaVersion >= 6) + { node.generator = isGenerator; } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "FunctionExpression") + }; + + // Parse arrow function expression with given parameters. + + pp$3.parseArrowExpression = function(node, params, isAsync) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node); + if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "ArrowFunctionExpression") + }; + + // Parse function body and check parameters. + + pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { + var isExpression = isArrowFunction && this.type !== types.braceL; + var oldStrict = this.strict, useStrict = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + this.checkParams(node, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { this.strict = true; } + + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); + node.body = this.parseBlock(false); + node.expression = false; + this.adaptDirectivePrologue(node.body.body); + this.labels = oldLabels; + } + this.exitScope(); + + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } + this.strict = oldStrict; + }; + + pp$3.isSimpleParamList = function(params) { + for (var i = 0, list = params; i < list.length; i += 1) + { + var param = list[i]; + + if (param.type !== "Identifier") { return false + } } + return true + }; + + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. + + pp$3.checkParams = function(node, allowDuplicates) { + var nameHash = {}; + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); + } + }; + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { break } + } else { first = false; } + + var elt = (void 0); + if (allowEmpty && this.type === types.comma) + { elt = null; } + else if (this.type === types.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types.comma && refDestructuringErrors.trailingComma < 0) + { refDestructuringErrors.trailingComma = this.start; } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts + }; + + pp$3.checkUnreserved = function(ref) { + var start = ref.start; + var end = ref.end; + var name = ref.name; + + if (this.inGenerator && name === "yield") + { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } + if (this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } + if (this.keywords.test(name)) + { this.raise(start, ("Unexpected keyword '" + name + "'")); } + if (this.options.ecmaVersion < 6 && + this.input.slice(start, end).indexOf("\\") !== -1) { return } + var re = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re.test(name)) { + if (!this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } + this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); + } + }; + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$3.parseIdent = function(liberal, isBinding) { + var node = this.startNode(); + if (liberal && this.options.allowReserved === "never") { liberal = false; } + if (this.type === types.name) { + node.name = this.value; + } else if (this.type.keyword) { + node.name = this.type.keyword; + + // To fix https://github.com/acornjs/acorn/issues/575 + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword + if ((node.name === "class" || node.name === "function") && + (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + } else { + this.unexpected(); + } + this.next(); + this.finishNode(node, "Identifier"); + if (!liberal) { + this.checkUnreserved(node); + if (node.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = node.start; } + } + return node + }; + + // Parses yield expression inside generator. + + pp$3.parseYield = function(noIn) { + if (!this.yieldPos) { this.yieldPos = this.start; } + + var node = this.startNode(); + this.next(); + if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types.star); + node.argument = this.parseMaybeAssign(noIn); + } + return this.finishNode(node, "YieldExpression") + }; + + pp$3.parseAwait = function() { + if (!this.awaitPos) { this.awaitPos = this.start; } + + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeUnary(null, true); + return this.finishNode(node, "AwaitExpression") + }; + + var pp$4 = Parser.prototype; + + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. + + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; err.loc = loc; err.raisedAt = this.pos; + throw err + }; + + pp$4.raiseRecoverable = pp$4.raise; + + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + }; + + var pp$5 = Parser.prototype; + + var Scope = function Scope(flags) { + this.flags = flags; + // A list of var-declared names in the current lexical scope + this.var = []; + // A list of lexically-declared names in the current lexical scope + this.lexical = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + this.functions = []; + }; + + // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. + + pp$5.enterScope = function(flags) { + this.scopeStack.push(new Scope(flags)); + }; + + pp$5.exitScope = function() { + this.scopeStack.pop(); + }; + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + pp$5.treatFunctionsAsVarInScope = function(scope) { + return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) + }; + + pp$5.declareName = function(name, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + if (this.inModule && (scope.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + } else if (bindingType === BIND_SIMPLE_CATCH) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) + { redeclared = scope$2.lexical.indexOf(name) > -1; } + else + { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } + scope$2.functions.push(name); + } else { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + var scope$3 = this.scopeStack[i]; + if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || + !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { + redeclared = true; + break + } + scope$3.var.push(name); + if (this.inModule && (scope$3.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + if (scope$3.flags & SCOPE_VAR) { break } + } + } + if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } + }; + + pp$5.checkLocalExport = function(id) { + // scope.functions must be empty as Module code is always strict. + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + + pp$5.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1] + }; + + pp$5.currentVarScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { return scope } + } + }; + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + pp$5.currentThisScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } + } + }; + + var Node = function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) + { this.loc = new SourceLocation(parser, loc); } + if (parser.options.directSourceFile) + { this.sourceFile = parser.options.directSourceFile; } + if (parser.options.ranges) + { this.range = [pos, 0]; } + }; + + // Start an AST node, attaching a start offset. + + var pp$6 = Parser.prototype; + + pp$6.startNode = function() { + return new Node(this, this.start, this.startLoc) + }; + + pp$6.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + }; + + // Finish an AST node, adding `type` and `end` properties. + + function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) + { node.loc.end = loc; } + if (this.options.ranges) + { node.range[1] = pos; } + return node + } + + pp$6.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + }; + + // Finish node at given position + + pp$6.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + }; + + // The algorithm used to determine whether a regexp can appear at a + + var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + + var types$1 = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", false), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), + f_stat: new TokContext("function", false), + f_expr: new TokContext("function", true), + f_expr_gen: new TokContext("function", true, false, null, true), + f_gen: new TokContext("function", false, false, null, true) + }; + + var pp$7 = Parser.prototype; + + pp$7.initialContext = function() { + return [types$1.b_stat] + }; + + pp$7.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types$1.f_expr || parent === types$1.f_stat) + { return true } + if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) + { return !parent.isExpr } + + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if (prevType === types._return || prevType === types.name && this.exprAllowed) + { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } + if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) + { return true } + if (prevType === types.braceL) + { return parent === types$1.b_stat } + if (prevType === types._var || prevType === types._const || prevType === types.name) + { return false } + return !this.exprAllowed + }; + + pp$7.inGeneratorContext = function() { + for (var i = this.context.length - 1; i >= 1; i--) { + var context = this.context[i]; + if (context.token === "function") + { return context.generator } + } + return false + }; + + pp$7.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types.dot) + { this.exprAllowed = false; } + else if (update = type.updateContext) + { update.call(this, prevType); } + else + { this.exprAllowed = type.beforeExpr; } + }; -var empty$1 = []; + // Token-specific context update code -pp$3.parseNew = function() { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { - node.meta = meta; - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "target" || containsEsc) - { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } - if (!this.inNonArrowFunction()) - { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } - return this.finishNode(node, "MetaProperty") - } - var startPos = this.start, startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); } - else { node.arguments = empty$1; } - return this.finishNode(node, "NewExpression") -}; - -// Parse template expression. - -pp$3.parseTemplateElement = function(ref) { - var isTagged = ref.isTagged; - - var elem = this.startNode(); - if (this.type === types.invalidTemplate) { - if (!isTagged) { - this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); - } - elem.value = { - raw: this.value, - cooked: null - }; - } else { - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value + types.parenR.updateContext = types.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return + } + var out = this.context.pop(); + if (out === types$1.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + + types.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); + this.exprAllowed = true; + }; + + types.dollarBraceL.updateContext = function() { + this.context.push(types$1.b_tmpl); + this.exprAllowed = true; + }; + + types.parenL.updateContext = function(prevType) { + var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); + this.exprAllowed = true; + }; + + types.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + }; + + types._function.updateContext = types._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && + !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && + !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) + { this.context.push(types$1.f_expr); } + else + { this.context.push(types$1.f_stat); } + this.exprAllowed = false; + }; + + types.backQuote.updateContext = function() { + if (this.curContext() === types$1.q_tmpl) + { this.context.pop(); } + else + { this.context.push(types$1.q_tmpl); } + this.exprAllowed = false; + }; + + types.star.updateContext = function(prevType) { + if (prevType === types._function) { + var index = this.context.length - 1; + if (this.context[index] === types$1.f_expr) + { this.context[index] = types$1.f_expr_gen; } + else + { this.context[index] = types$1.f_gen; } + } + this.exprAllowed = true; + }; + + types.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { + if (this.value === "of" && !this.exprAllowed || + this.value === "yield" && this.inGeneratorContext()) + { allowed = true; } + } + this.exprAllowed = allowed; + }; + + // This file contains Unicode properties extracted from the ECMAScript + // specification. The lists are extracted like so: + // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) + + // #table-binary-unicode-properties + var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; + var unicodeBinaryProperties = { + 9: ecma9BinaryProperties, + 10: ecma9BinaryProperties + " Extended_Pictographic" + }; + + // #table-unicode-general-category-values + var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; + + // #table-unicode-script-values + var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; + var unicodeScriptValues = { + 9: ecma9ScriptValues, + 10: ecma9ScriptValues + " Dogra Dogr Elymaic Elym Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Old_Sogdian Sogo Sogdian Sogd Wancho Wcho" + }; + + var data = {}; + function buildUnicodeData(ecmaVersion) { + var d = data[ecmaVersion] = { + binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), + nonBinary: { + General_Category: wordsRegexp(unicodeGeneralCategoryValues), + Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) + } }; - } - this.next(); - elem.tail = this.type === types.backQuote; - return this.finishNode(elem, "TemplateElement") -}; - -pp$3.parseTemplate = function(ref) { - var this$1 = this; - if ( ref === void 0 ) ref = {}; - var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; - - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement({isTagged: isTagged}); - node.quasis = [curElt]; - while (!curElt.tail) { - if (this$1.type === types.eof) { this$1.raise(this$1.pos, "Unterminated template literal"); } - this$1.expect(types.dollarBraceL); - node.expressions.push(this$1.parseExpression()); - this$1.expect(types.braceR); - node.quasis.push(curElt = this$1.parseTemplateElement({isTagged: isTagged})); - } - this.next(); - return this.finishNode(node, "TemplateLiteral") -}; - -pp$3.isAsyncProp = function(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && - (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && - !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; - -// Parse an object literal or binding pattern. - -pp$3.parseObj = function(isPattern, refDestructuringErrors) { - var this$1 = this; - - var node = this.startNode(), first = true, propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var prop = this$1.parseProperty(isPattern, refDestructuringErrors); - if (!isPattern) { this$1.checkPropClash(prop, propHash, refDestructuringErrors); } - node.properties.push(prop); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") -}; - -pp$3.parseProperty = function(isPattern, refDestructuringErrors) { - var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; - if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { - if (isPattern) { - prop.argument = this.parseIdent(false); - if (this.type === types.comma) { - this.raise(this.start, "Comma is not permitted after the rest element"); + d.nonBinary.Script_Extensions = d.nonBinary.Script; + + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + buildUnicodeData(9); + buildUnicodeData(10); + + var pp$8 = Parser.prototype; + + var RegExpValidationState = function RegExpValidationState(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); + this.unicodeProperties = data[parser.options.ecmaVersion >= 10 ? 10 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = []; + this.backReferenceNames = []; + }; + + RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { + var unicode = flags.indexOf("u") !== -1; + this.start = start | 0; + this.source = pattern + ""; + this.flags = flags; + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + }; + + RegExpValidationState.prototype.raise = function raise (message) { + this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); + }; + + // If u flag is given, this returns the code point at the index (it combines a surrogate pair). + // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). + RegExpValidationState.prototype.at = function at (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return -1 + } + var c = s.charCodeAt(i); + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return c + } + return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 + }; + + RegExpValidationState.prototype.nextIndex = function nextIndex (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return l + } + var c = s.charCodeAt(i); + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return i + 1 + } + return i + 2 + }; + + RegExpValidationState.prototype.current = function current () { + return this.at(this.pos) + }; + + RegExpValidationState.prototype.lookahead = function lookahead () { + return this.at(this.nextIndex(this.pos)) + }; + + RegExpValidationState.prototype.advance = function advance () { + this.pos = this.nextIndex(this.pos); + }; + + RegExpValidationState.prototype.eat = function eat (ch) { + if (this.current() === ch) { + this.advance(); + return true + } + return false + }; + + function codePointToString(ch) { + if (ch <= 0xFFFF) { return String.fromCharCode(ch) } + ch -= 0x10000; + return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) + } + + /** + * Validate the flags part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + + for (var i = 0; i < flags.length; i++) { + var flag = flags.charAt(i); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); } - return this.finishNode(prop, "RestElement") + if (flags.indexOf(flag, i + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + } + }; + + /** + * Validate the pattern part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + + // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of + // parsing contains a |GroupName|, reparse with the goal symbol + // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* + // exception if _P_ did not conform to the grammar, if any elements of _P_ + // were not matched by the parse, or if any Early Error conditions exist. + if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { + state.switchN = true; + this.regexp_pattern(state); } - // To disallow parenthesized identifier via `this.toAssignable()`. - if (this.type === types.parenL && refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0) { - refDestructuringErrors.parenthesizedAssign = this.start; + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern + pp$8.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames.length = 0; + state.backReferenceNames.length = 0; + + this.regexp_disjunction(state); + + if (state.pos !== state.source.length) { + // Make the same messages as V8. + if (state.eat(0x29 /* ) */)) { + state.raise("Unmatched ')'"); } - if (refDestructuringErrors.parenthesizedBind < 0) { - refDestructuringErrors.parenthesizedBind = this.start; + if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { + state.raise("Lone quantifier brackets"); } } - // Parse argument. - prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); - // To disallow trailing comma via `this.toAssignable()`. - if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); } - // Finish - return this.finishNode(prop, "SpreadElement") - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) - { isGenerator = this.eat(types.star); } - } - var containsEsc = this.containsEsc; - this.parsePropertyName(prop); - if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - this.parsePropertyName(prop, refDestructuringErrors); - } else { - isAsync = false; - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); - return this.finishNode(prop, "Property") -}; - -pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { - if ((isGenerator || isAsync) && this.type === types.colon) - { this.unexpected(); } - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { - if (isPattern) { this.unexpected(); } - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } else if (!isPattern && !containsEsc && - this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type !== types.comma && this.type !== types.braceR)) { - if (isGenerator || isAsync) { this.unexpected(); } - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") - { this.raiseRecoverable(start, "getter should have no params"); } - else - { this.raiseRecoverable(start, "setter should have exactly one param"); } - } else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") - { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (isGenerator || isAsync) { this.unexpected(); } - this.checkUnreserved(prop.key); - if (prop.key.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = startPos; } - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === types.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) - { refDestructuringErrors.shorthandAssign = this.start; } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else { this.unexpected(); } -}; - -pp$3.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - return prop.key - } else { - prop.computed = false; + for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { + var name = list[i]; + + if (state.groupNames.indexOf(name) === -1) { + state.raise("Invalid named capture referenced"); + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction + pp$8.regexp_disjunction = function(state) { + this.regexp_alternative(state); + while (state.eat(0x7C /* | */)) { + this.regexp_alternative(state); } - } - return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true) -}; - -// Initialize empty function node. - -pp$3.initFunction = function(node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } - if (this.options.ecmaVersion >= 8) { node.async = false; } -}; - -// Parse object or class method. - -pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { - var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.initFunction(node); - if (this.options.ecmaVersion >= 6) - { node.generator = isGenerator; } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBody(node, false, true); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "FunctionExpression") -}; - -// Parse arrow function expression with given parameters. - -pp$3.parseArrowExpression = function(node, params, isAsync) { - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node); - if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "ArrowFunctionExpression") -}; - -// Parse function body and check parameters. - -pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { - var isExpression = isArrowFunction && this.type !== types.braceL; - var oldStrict = this.strict, useStrict = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - this.checkParams(node, false); - } else { - var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end); - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (useStrict && nonSimple) - { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } - } - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldLabels = this.labels; - this.labels = []; - if (useStrict) { this.strict = true; } - - // Add the params to varDeclaredNames to ensure that an error is thrown - // if a let/const declaration in the function clashes with one of the params. - this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); - node.body = this.parseBlock(false); - node.expression = false; - this.adaptDirectivePrologue(node.body.body); - this.labels = oldLabels; - } - this.exitScope(); - // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' - if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } - this.strict = oldStrict; -}; + // Make the same message as V8. + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat(0x7B /* { */)) { + state.raise("Lone quantifier brackets"); + } + }; -pp$3.isSimpleParamList = function(params) { - for (var i = 0, list = params; i < list.length; i += 1) - { - var param = list[i]; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative + pp$8.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) + { } + }; - if (param.type !== "Identifier") { return false - } } - return true -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term + pp$8.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + // Handle `QuantifiableAssertion Quantifier` alternative. + // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion + // is a QuantifiableAssertion. + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + // Make the same message as V8. + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true + } -// Checks function params for various disallowed patterns such as using "eval" -// or "arguments" and duplicate parameters. + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true + } -pp$3.checkParams = function(node, allowDuplicates) { - var this$1 = this; + return false + }; - var nameHash = {}; - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion + pp$8.regexp_eatAssertion = function(state) { + var start = state.pos; + state.lastAssertionIsQuantifiable = false; - this$1.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (!first) { - this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(close)) { break } - } else { first = false; } - - var elt = (void 0); - if (allowEmpty && this$1.type === types.comma) - { elt = null; } - else if (this$1.type === types.ellipsis) { - elt = this$1.parseSpread(refDestructuringErrors); - if (refDestructuringErrors && this$1.type === types.comma && refDestructuringErrors.trailingComma < 0) - { refDestructuringErrors.trailingComma = this$1.start; } - } else { - elt = this$1.parseMaybeAssign(false, refDestructuringErrors); + // ^, $ + if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { + return true } - elts.push(elt); - } - return elts -}; - -pp$3.checkUnreserved = function(ref) { - var start = ref.start; - var end = ref.end; - var name = ref.name; - - if (this.inGenerator && name === "yield") - { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } - if (this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } - if (this.keywords.test(name)) - { this.raise(start, ("Unexpected keyword '" + name + "'")); } - if (this.options.ecmaVersion < 6 && - this.input.slice(start, end).indexOf("\\") !== -1) { return } - var re = this.strict ? this.reservedWordsStrict : this.reservedWords; - if (re.test(name)) { - if (!this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } - this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); - } -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp$3.parseIdent = function(liberal, isBinding) { - var node = this.startNode(); - if (liberal && this.options.allowReserved === "never") { liberal = false; } - if (this.type === types.name) { - node.name = this.value; - } else if (this.type.keyword) { - node.name = this.type.keyword; - - // To fix https://github.com/acornjs/acorn/issues/575 - // `class` and `function` keywords push new context into this.context. - // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. - // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword - if ((node.name === "class" || node.name === "function") && - (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { - this.context.pop(); - } - } else { - this.unexpected(); - } - this.next(); - this.finishNode(node, "Identifier"); - if (!liberal) { - this.checkUnreserved(node); - if (node.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = node.start; } - } - return node -}; - -// Parses yield expression inside generator. - -pp$3.parseYield = function(noIn) { - if (!this.yieldPos) { this.yieldPos = this.start; } - - var node = this.startNode(); - this.next(); - if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(noIn); - } - return this.finishNode(node, "YieldExpression") -}; - -pp$3.parseAwait = function() { - if (!this.awaitPos) { this.awaitPos = this.start; } - - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(null, true); - return this.finishNode(node, "AwaitExpression") -}; - -var pp$4 = Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp$4.raise = function(pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; err.loc = loc; err.raisedAt = this.pos; - throw err -}; - -pp$4.raiseRecoverable = pp$4.raise; - -pp$4.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } -}; - -var pp$5 = Parser.prototype; - -var Scope = function Scope(flags) { - this.flags = flags; - // A list of var-declared names in the current lexical scope - this.var = []; - // A list of lexically-declared names in the current lexical scope - this.lexical = []; - // A list of lexically-declared FunctionDeclaration names in the current lexical scope - this.functions = []; -}; - -// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. - -pp$5.enterScope = function(flags) { - this.scopeStack.push(new Scope(flags)); -}; - -pp$5.exitScope = function() { - this.scopeStack.pop(); -}; - -// The spec says: -// > At the top level of a function, or script, function declarations are -// > treated like var declarations rather than like lexical declarations. -pp$5.treatFunctionsAsVarInScope = function(scope) { - return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) -}; - -pp$5.declareName = function(name, bindingType, pos) { - var this$1 = this; - - var redeclared = false; - if (bindingType === BIND_LEXICAL) { - var scope = this.currentScope(); - redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - scope.lexical.push(name); - if (this.inModule && (scope.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - } else if (bindingType === BIND_SIMPLE_CATCH) { - var scope$1 = this.currentScope(); - scope$1.lexical.push(name); - } else if (bindingType === BIND_FUNCTION) { - var scope$2 = this.currentScope(); - if (this.treatFunctionsAsVar) - { redeclared = scope$2.lexical.indexOf(name) > -1; } - else - { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } - scope$2.functions.push(name); - } else { - for (var i = this.scopeStack.length - 1; i >= 0; --i) { - var scope$3 = this$1.scopeStack[i]; - if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || - !this$1.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { - redeclared = true; - break + + // \b \B + if (state.eat(0x5C /* \ */)) { + if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + return true } - scope$3.var.push(name); - if (this$1.inModule && (scope$3.flags & SCOPE_TOP)) - { delete this$1.undefinedExports[name]; } - if (scope$3.flags & SCOPE_VAR) { break } + state.pos = start; } - } - if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } -}; - -pp$5.checkLocalExport = function(id) { - // scope.functions must be empty as Module code is always strict. - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && - this.scopeStack[0].var.indexOf(id.name) === -1) { - this.undefinedExports[id.name] = id; - } -}; -pp$5.currentScope = function() { - return this.scopeStack[this.scopeStack.length - 1] -}; + // Lookahead / Lookbehind + if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat(0x3C /* < */); + } + if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { + this.regexp_disjunction(state); + if (!state.eat(0x29 /* ) */)) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true + } + } -pp$5.currentVarScope = function() { - var this$1 = this; + state.pos = start; + return false + }; - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this$1.scopeStack[i]; - if (scope.flags & SCOPE_VAR) { return scope } - } -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier + pp$8.regexp_eatQuantifier = function(state, noError) { + if ( noError === void 0 ) noError = false; -// Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. -pp$5.currentThisScope = function() { - var this$1 = this; + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat(0x3F /* ? */); + return true + } + return false + }; - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this$1.scopeStack[i]; - if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } - } -}; - -var Node = function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) - { this.loc = new SourceLocation(parser, loc); } - if (parser.options.directSourceFile) - { this.sourceFile = parser.options.directSourceFile; } - if (parser.options.ranges) - { this.range = [pos, 0]; } -}; - -// Start an AST node, attaching a start offset. - -var pp$6 = Parser.prototype; - -pp$6.startNode = function() { - return new Node(this, this.start, this.startLoc) -}; - -pp$6.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) -}; - -// Finish an AST node, adding `type` and `end` properties. - -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) - { node.loc.end = loc; } - if (this.options.ranges) - { node.range[1] = pos; } - return node -} - -pp$6.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) -}; - -// Finish node at given position - -pp$6.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) -}; - -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - this.generator = !!generator; -}; - -var types$1 = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", false), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), - f_stat: new TokContext("function", false), - f_expr: new TokContext("function", true), - f_expr_gen: new TokContext("function", true, false, null, true), - f_gen: new TokContext("function", false, false, null, true) -}; - -var pp$7 = Parser.prototype; - -pp$7.initialContext = function() { - return [types$1.b_stat] -}; - -pp$7.braceIsBlock = function(prevType) { - var parent = this.curContext(); - if (parent === types$1.f_expr || parent === types$1.f_stat) - { return true } - if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) - { return !parent.isExpr } - - // The check for `tt.name && exprAllowed` detects whether we are - // after a `yield` or `of` construct. See the `updateContext` for - // `tt.name`. - if (prevType === types._return || prevType === types.name && this.exprAllowed) - { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) - { return true } - if (prevType === types.braceL) - { return parent === types$1.b_stat } - if (prevType === types._var || prevType === types._const || prevType === types.name) - { return false } - return !this.exprAllowed -}; - -pp$7.inGeneratorContext = function() { - var this$1 = this; - - for (var i = this.context.length - 1; i >= 1; i--) { - var context = this$1.context[i]; - if (context.token === "function") - { return context.generator } - } - return false -}; - -pp$7.updateContext = function(prevType) { - var update, type = this.type; - if (type.keyword && prevType === types.dot) - { this.exprAllowed = false; } - else if (update = type.updateContext) - { update.call(this, prevType); } - else - { this.exprAllowed = type.beforeExpr; } -}; - -// Token-specific context update code - -types.parenR.updateContext = types.braceR.updateContext = function() { - if (this.context.length === 1) { - this.exprAllowed = true; - return - } - var out = this.context.pop(); - if (out === types$1.b_stat && this.curContext().token === "function") { - out = this.context.pop(); - } - this.exprAllowed = !out.isExpr; -}; - -types.braceL.updateContext = function(prevType) { - this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); - this.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function() { - this.context.push(types$1.b_tmpl); - this.exprAllowed = true; -}; - -types.parenL.updateContext = function(prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); - this.exprAllowed = true; -}; - -types.incDec.updateContext = function() { - // tokExprAllowed stays unchanged -}; - -types._function.updateContext = types._class.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && - !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && - !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) - { this.context.push(types$1.f_expr); } - else - { this.context.push(types$1.f_stat); } - this.exprAllowed = false; -}; - -types.backQuote.updateContext = function() { - if (this.curContext() === types$1.q_tmpl) - { this.context.pop(); } - else - { this.context.push(types$1.q_tmpl); } - this.exprAllowed = false; -}; - -types.star.updateContext = function(prevType) { - if (prevType === types._function) { - var index = this.context.length - 1; - if (this.context[index] === types$1.f_expr) - { this.context[index] = types$1.f_expr_gen; } - else - { this.context[index] = types$1.f_gen; } - } - this.exprAllowed = true; -}; - -types.name.updateContext = function(prevType) { - var allowed = false; - if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { - if (this.value === "of" && !this.exprAllowed || - this.value === "yield" && this.inGeneratorContext()) - { allowed = true; } - } - this.exprAllowed = allowed; -}; - -// This file contains Unicode properties extracted from the ECMAScript -// specification. The lists are extracted like so: -// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) - -// #table-binary-unicode-properties -var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; -var unicodeBinaryProperties = { - 9: ecma9BinaryProperties, - 10: ecma9BinaryProperties + " Extended_Pictographic" -}; - -// #table-unicode-general-category-values -var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; - -// #table-unicode-script-values -var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; -var unicodeScriptValues = { - 9: ecma9ScriptValues, - 10: ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd" -}; - -var data = {}; -function buildUnicodeData(ecmaVersion) { - var d = data[ecmaVersion] = { - binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), - nonBinary: { - General_Category: wordsRegexp(unicodeGeneralCategoryValues), - Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) - } - }; - d.nonBinary.Script_Extensions = d.nonBinary.Script; - - d.nonBinary.gc = d.nonBinary.General_Category; - d.nonBinary.sc = d.nonBinary.Script; - d.nonBinary.scx = d.nonBinary.Script_Extensions; -} -buildUnicodeData(9); -buildUnicodeData(10); - -var pp$9 = Parser.prototype; - -var RegExpValidationState = function RegExpValidationState(parser) { - this.parser = parser; - this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); - this.unicodeProperties = data[parser.options.ecmaVersion >= 10 ? 10 : parser.options.ecmaVersion]; - this.source = ""; - this.flags = ""; - this.start = 0; - this.switchU = false; - this.switchN = false; - this.pos = 0; - this.lastIntValue = 0; - this.lastStringValue = ""; - this.lastAssertionIsQuantifiable = false; - this.numCapturingParens = 0; - this.maxBackReference = 0; - this.groupNames = []; - this.backReferenceNames = []; -}; - -RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { - var unicode = flags.indexOf("u") !== -1; - this.start = start | 0; - this.source = pattern + ""; - this.flags = flags; - this.switchU = unicode && this.parser.options.ecmaVersion >= 6; - this.switchN = unicode && this.parser.options.ecmaVersion >= 9; -}; - -RegExpValidationState.prototype.raise = function raise (message) { - this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); -}; - -// If u flag is given, this returns the code point at the index (it combines a surrogate pair). -// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). -RegExpValidationState.prototype.at = function at (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return -1 - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return c - } - return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 -}; - -RegExpValidationState.prototype.nextIndex = function nextIndex (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return l - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return i + 1 - } - return i + 2 -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix + pp$8.regexp_eatQuantifierPrefix = function(state, noError) { + return ( + state.eat(0x2A /* * */) || + state.eat(0x2B /* + */) || + state.eat(0x3F /* ? */) || + this.regexp_eatBracedQuantifier(state, noError) + ) + }; + pp$8.regexp_eatBracedQuantifier = function(state, noError) { + var start = state.pos; + if (state.eat(0x7B /* { */)) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat(0x7D /* } */)) { + // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start; + } + return false + }; -RegExpValidationState.prototype.current = function current () { - return this.at(this.pos) -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom + pp$8.regexp_eatAtom = function(state) { + return ( + this.regexp_eatPatternCharacters(state) || + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) + ) + }; + pp$8.regexp_eatReverseSolidusAtomEscape = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatAtomEscape(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatUncapturingGroup = function(state) { + var start = state.pos; + if (state.eat(0x28 /* ( */)) { + if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + return true + } + state.raise("Unterminated group"); + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatCapturingGroup = function(state) { + if (state.eat(0x28 /* ( */)) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 0x3F /* ? */) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + state.numCapturingParens += 1; + return true + } + state.raise("Unterminated group"); + } + return false + }; -RegExpValidationState.prototype.lookahead = function lookahead () { - return this.at(this.nextIndex(this.pos)) -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom + pp$8.regexp_eatExtendedAtom = function(state) { + return ( + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) || + this.regexp_eatInvalidBracedQuantifier(state) || + this.regexp_eatExtendedPatternCharacter(state) + ) + }; -RegExpValidationState.prototype.advance = function advance () { - this.pos = this.nextIndex(this.pos); -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier + pp$8.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false + }; -RegExpValidationState.prototype.eat = function eat (ch) { - if (this.current() === ch) { - this.advance(); - return true - } - return false -}; - -function codePointToString$1(ch) { - if (ch <= 0xFFFF) { return String.fromCharCode(ch) } - ch -= 0x10000; - return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) -} - -/** - * Validate the flags part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpFlags = function(state) { - var this$1 = this; - - var validFlags = state.validFlags; - var flags = state.flags; - - for (var i = 0; i < flags.length; i++) { - var flag = flags.charAt(i); - if (validFlags.indexOf(flag) === -1) { - this$1.raise(state.start, "Invalid regular expression flag"); - } - if (flags.indexOf(flag, i + 1) > -1) { - this$1.raise(state.start, "Duplicate regular expression flag"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter + pp$8.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter(ch)) { + state.lastIntValue = ch; + state.advance(); + return true } - } -}; - -/** - * Validate the pattern part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpPattern = function(state) { - this.regexp_pattern(state); - - // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of - // parsing contains a |GroupName|, reparse with the goal symbol - // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* - // exception if _P_ did not conform to the grammar, if any elements of _P_ - // were not matched by the parse, or if any Early Error conditions exist. - if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { - state.switchN = true; - this.regexp_pattern(state); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern -pp$9.regexp_pattern = function(state) { - state.pos = 0; - state.lastIntValue = 0; - state.lastStringValue = ""; - state.lastAssertionIsQuantifiable = false; - state.numCapturingParens = 0; - state.maxBackReference = 0; - state.groupNames.length = 0; - state.backReferenceNames.length = 0; - - this.regexp_disjunction(state); - - if (state.pos !== state.source.length) { - // Make the same messages as V8. - if (state.eat(0x29 /* ) */)) { - state.raise("Unmatched ')'"); - } - if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { - state.raise("Lone quantifier brackets"); + return false + }; + function isSyntaxCharacter(ch) { + return ( + ch === 0x24 /* $ */ || + ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || + ch === 0x2E /* . */ || + ch === 0x3F /* ? */ || + ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter + // But eat eager. + pp$8.regexp_eatPatternCharacters = function(state) { + var start = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { + state.advance(); } - } - if (state.maxBackReference > state.numCapturingParens) { - state.raise("Invalid escape"); - } - for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { - var name = list[i]; + return state.pos !== start + }; - if (state.groupNames.indexOf(name) === -1) { - state.raise("Invalid named capture referenced"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter + pp$8.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if ( + ch !== -1 && + ch !== 0x24 /* $ */ && + !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && + ch !== 0x2E /* . */ && + ch !== 0x3F /* ? */ && + ch !== 0x5B /* [ */ && + ch !== 0x5E /* ^ */ && + ch !== 0x7C /* | */ + ) { + state.advance(); + return true } - } -}; + return false + }; -// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction -pp$9.regexp_disjunction = function(state) { - var this$1 = this; + // GroupSpecifier[U] :: + // [empty] + // `?` GroupName[?U] + pp$8.regexp_groupSpecifier = function(state) { + if (state.eat(0x3F /* ? */)) { + if (this.regexp_eatGroupName(state)) { + if (state.groupNames.indexOf(state.lastStringValue) !== -1) { + state.raise("Duplicate capture group name"); + } + state.groupNames.push(state.lastStringValue); + return + } + state.raise("Invalid group"); + } + }; - this.regexp_alternative(state); - while (state.eat(0x7C /* | */)) { - this$1.regexp_alternative(state); - } + // GroupName[U] :: + // `<` RegExpIdentifierName[?U] `>` + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat(0x3C /* < */)) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return true + } + state.raise("Invalid capture group name"); + } + return false + }; - // Make the same message as V8. - if (this.regexp_eatQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - if (state.eat(0x7B /* { */)) { - state.raise("Lone quantifier brackets"); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative -pp$9.regexp_alternative = function(state) { - while (state.pos < state.source.length && this.regexp_eatTerm(state)) - { } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term -pp$9.regexp_eatTerm = function(state) { - if (this.regexp_eatAssertion(state)) { - // Handle `QuantifiableAssertion Quantifier` alternative. - // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion - // is a QuantifiableAssertion. - if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { - // Make the same message as V8. - if (state.switchU) { - state.raise("Invalid quantifier"); + // RegExpIdentifierName[U] :: + // RegExpIdentifierStart[?U] + // RegExpIdentifierName[?U] RegExpIdentifierPart[?U] + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); } + return true } - return true - } + return false + }; - if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { - this.regexp_eatQuantifier(state); - return true - } + // RegExpIdentifierStart[U] :: + // UnicodeIDStart + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + pp$8.regexp_eatRegExpIdentifierStart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart(ch)) { + state.lastIntValue = ch; + return true + } - return false -}; + state.pos = start; + return false + }; + function isRegExpIdentifierStart(ch) { + return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ + } + + // RegExpIdentifierPart[U] :: + // UnicodeIDContinue + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + // + // + pp$8.regexp_eatRegExpIdentifierPart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion -pp$9.regexp_eatAssertion = function(state) { - var start = state.pos; - state.lastAssertionIsQuantifiable = false; + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart(ch)) { + state.lastIntValue = ch; + return true + } - // ^, $ - if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { - return true + state.pos = start; + return false + }; + function isRegExpIdentifierPart(ch) { + return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ } - // \b \B - if (state.eat(0x5C /* \ */)) { - if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape + pp$8.regexp_eatAtomEscape = function(state) { + if ( + this.regexp_eatBackReference(state) || + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) || + (state.switchN && this.regexp_eatKGroupName(state)) + ) { return true } - state.pos = start; - } - - // Lookahead / Lookbehind - if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { - var lookbehind = false; - if (this.options.ecmaVersion >= 9) { - lookbehind = state.eat(0x3C /* < */); + if (state.switchU) { + // Make the same message as V8. + if (state.current() === 0x63 /* c */) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); } - if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { - this.regexp_disjunction(state); - if (!state.eat(0x29 /* ) */)) { - state.raise("Unterminated group"); + return false + }; + pp$8.regexp_eatBackReference = function(state) { + var start = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true } - state.lastAssertionIsQuantifiable = !lookbehind; - return true + if (n <= state.numCapturingParens) { + return true + } + state.pos = start; } - } - - state.pos = start; - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier -pp$9.regexp_eatQuantifier = function(state, noError) { - if ( noError === void 0 ) noError = false; - - if (this.regexp_eatQuantifierPrefix(state, noError)) { - state.eat(0x3F /* ? */); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix -pp$9.regexp_eatQuantifierPrefix = function(state, noError) { - return ( - state.eat(0x2A /* * */) || - state.eat(0x2B /* + */) || - state.eat(0x3F /* ? */) || - this.regexp_eatBracedQuantifier(state, noError) - ) -}; -pp$9.regexp_eatBracedQuantifier = function(state, noError) { - var start = state.pos; - if (state.eat(0x7B /* { */)) { - var min = 0, max = -1; - if (this.regexp_eatDecimalDigits(state)) { - min = state.lastIntValue; - if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { - max = state.lastIntValue; + return false + }; + pp$8.regexp_eatKGroupName = function(state) { + if (state.eat(0x6B /* k */)) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true } - if (state.eat(0x7D /* } */)) { - // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term - if (max !== -1 && max < min && !noError) { - state.raise("numbers out of order in {} quantifier"); - } + state.raise("Invalid named reference"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape + pp$8.regexp_eatCharacterEscape = function(state) { + return ( + this.regexp_eatControlEscape(state) || + this.regexp_eatCControlLetter(state) || + this.regexp_eatZero(state) || + this.regexp_eatHexEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state) || + (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || + this.regexp_eatIdentityEscape(state) + ) + }; + pp$8.regexp_eatCControlLetter = function(state) { + var start = state.pos; + if (state.eat(0x63 /* c */)) { + if (this.regexp_eatControlLetter(state)) { return true } + state.pos = start; } - if (state.switchU && !noError) { - state.raise("Incomplete quantifier"); + return false + }; + pp$8.regexp_eatZero = function(state) { + if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom -pp$9.regexp_eatAtom = function(state) { - return ( - this.regexp_eatPatternCharacters(state) || - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) - ) -}; -pp$9.regexp_eatReverseSolidusAtomEscape = function(state) { - var start = state.pos; - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatAtomEscape(state)) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape + pp$8.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 0x74 /* t */) { + state.lastIntValue = 0x09; /* \t */ + state.advance(); return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatUncapturingGroup = function(state) { - var start = state.pos; - if (state.eat(0x28 /* ( */)) { - if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - return true - } - state.raise("Unterminated group"); + if (ch === 0x6E /* n */) { + state.lastIntValue = 0x0A; /* \n */ + state.advance(); + return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatCapturingGroup = function(state) { - if (state.eat(0x28 /* ( */)) { - if (this.options.ecmaVersion >= 9) { - this.regexp_groupSpecifier(state); - } else if (state.current() === 0x3F /* ? */) { - state.raise("Invalid group"); + if (ch === 0x76 /* v */) { + state.lastIntValue = 0x0B; /* \v */ + state.advance(); + return true } - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - state.numCapturingParens += 1; + if (ch === 0x66 /* f */) { + state.lastIntValue = 0x0C; /* \f */ + state.advance(); return true } - state.raise("Unterminated group"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom -pp$9.regexp_eatExtendedAtom = function(state) { - return ( - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) || - this.regexp_eatInvalidBracedQuantifier(state) || - this.regexp_eatExtendedPatternCharacter(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier -pp$9.regexp_eatInvalidBracedQuantifier = function(state) { - if (this.regexp_eatBracedQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter -pp$9.regexp_eatSyntaxCharacter = function(state) { - var ch = state.current(); - if (isSyntaxCharacter(ch)) { - state.lastIntValue = ch; - state.advance(); - return true - } - return false -}; -function isSyntaxCharacter(ch) { - return ( - ch === 0x24 /* $ */ || - ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || - ch === 0x2E /* . */ || - ch === 0x3F /* ? */ || - ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || - ch >= 0x7B /* { */ && ch <= 0x7D /* } */ - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter -// But eat eager. -pp$9.regexp_eatPatternCharacters = function(state) { - var start = state.pos; - var ch = 0; - while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { - state.advance(); - } - return state.pos !== start -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter -pp$9.regexp_eatExtendedPatternCharacter = function(state) { - var ch = state.current(); - if ( - ch !== -1 && - ch !== 0x24 /* $ */ && - !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && - ch !== 0x2E /* . */ && - ch !== 0x3F /* ? */ && - ch !== 0x5B /* [ */ && - ch !== 0x5E /* ^ */ && - ch !== 0x7C /* | */ - ) { - state.advance(); - return true - } - return false -}; - -// GroupSpecifier[U] :: -// [empty] -// `?` GroupName[?U] -pp$9.regexp_groupSpecifier = function(state) { - if (state.eat(0x3F /* ? */)) { - if (this.regexp_eatGroupName(state)) { - if (state.groupNames.indexOf(state.lastStringValue) !== -1) { - state.raise("Duplicate capture group name"); - } - state.groupNames.push(state.lastStringValue); - return + if (ch === 0x72 /* r */) { + state.lastIntValue = 0x0D; /* \r */ + state.advance(); + return true } - state.raise("Invalid group"); - } -}; - -// GroupName[U] :: -// `<` RegExpIdentifierName[?U] `>` -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatGroupName = function(state) { - state.lastStringValue = ""; - if (state.eat(0x3C /* < */)) { - if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter + pp$8.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter(ch)) { + state.lastIntValue = ch % 0x20; + state.advance(); return true } - state.raise("Invalid capture group name"); - } - return false -}; - -// RegExpIdentifierName[U] :: -// RegExpIdentifierStart[?U] -// RegExpIdentifierName[?U] RegExpIdentifierPart[?U] -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatRegExpIdentifierName = function(state) { - state.lastStringValue = ""; - if (this.regexp_eatRegExpIdentifierStart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); - while (this.regexp_eatRegExpIdentifierPart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); + return false + }; + function isControlLetter(ch) { + return ( + (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || + (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence + pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state) { + var start = state.pos; + + if (state.eat(0x75 /* u */)) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { + var leadSurrogateEnd = state.pos; + if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail = state.lastIntValue; + if (trail >= 0xDC00 && trail <= 0xDFFF) { + state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return true + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true + } + if ( + state.switchU && + state.eat(0x7B /* { */) && + this.regexp_eatHexDigits(state) && + state.eat(0x7D /* } */) && + isValidUnicode(state.lastIntValue) + ) { + return true + } + if (state.switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start; } - return true - } - return false -}; - -// RegExpIdentifierStart[U] :: -// UnicodeIDStart -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -pp$9.regexp_eatRegExpIdentifierStart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierStart(ch)) { - state.lastIntValue = ch; - return true - } - state.pos = start; - return false -}; -function isRegExpIdentifierStart(ch) { - return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ -} - -// RegExpIdentifierPart[U] :: -// UnicodeIDContinue -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -// -// -pp$9.regexp_eatRegExpIdentifierPart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierPart(ch)) { - state.lastIntValue = ch; - return true + return false + }; + function isValidUnicode(ch) { + return ch >= 0 && ch <= 0x10FFFF } - state.pos = start; - return false -}; -function isRegExpIdentifierPart(ch) { - return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape -pp$9.regexp_eatAtomEscape = function(state) { - if ( - this.regexp_eatBackReference(state) || - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) || - (state.switchN && this.regexp_eatKGroupName(state)) - ) { - return true - } - if (state.switchU) { - // Make the same message as V8. - if (state.current() === 0x63 /* c */) { - state.raise("Invalid unicode escape"); - } - state.raise("Invalid escape"); - } - return false -}; -pp$9.regexp_eatBackReference = function(state) { - var start = state.pos; - if (this.regexp_eatDecimalEscape(state)) { - var n = state.lastIntValue; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape + pp$8.regexp_eatIdentityEscape = function(state) { if (state.switchU) { - // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape - if (n > state.maxBackReference) { - state.maxBackReference = n; + if (this.regexp_eatSyntaxCharacter(state)) { + return true } - return true - } - if (n <= state.numCapturingParens) { - return true + if (state.eat(0x2F /* / */)) { + state.lastIntValue = 0x2F; /* / */ + return true + } + return false } - state.pos = start; - } - return false -}; -pp$9.regexp_eatKGroupName = function(state) { - if (state.eat(0x6B /* k */)) { - if (this.regexp_eatGroupName(state)) { - state.backReferenceNames.push(state.lastStringValue); + + var ch = state.current(); + if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { + state.lastIntValue = ch; + state.advance(); return true } - state.raise("Invalid named reference"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape -pp$9.regexp_eatCharacterEscape = function(state) { - return ( - this.regexp_eatControlEscape(state) || - this.regexp_eatCControlLetter(state) || - this.regexp_eatZero(state) || - this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state) || - (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || - this.regexp_eatIdentityEscape(state) - ) -}; -pp$9.regexp_eatCControlLetter = function(state) { - var start = state.pos; - if (state.eat(0x63 /* c */)) { - if (this.regexp_eatControlLetter(state)) { + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape + pp$8.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatZero = function(state) { - if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { - state.lastIntValue = 0; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape -pp$9.regexp_eatControlEscape = function(state) { - var ch = state.current(); - if (ch === 0x74 /* t */) { - state.lastIntValue = 0x09; /* \t */ - state.advance(); - return true - } - if (ch === 0x6E /* n */) { - state.lastIntValue = 0x0A; /* \n */ - state.advance(); - return true - } - if (ch === 0x76 /* v */) { - state.lastIntValue = 0x0B; /* \v */ - state.advance(); - return true - } - if (ch === 0x66 /* f */) { - state.lastIntValue = 0x0C; /* \f */ - state.advance(); - return true - } - if (ch === 0x72 /* r */) { - state.lastIntValue = 0x0D; /* \r */ - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter -pp$9.regexp_eatControlLetter = function(state) { - var ch = state.current(); - if (isControlLetter(ch)) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; -function isControlLetter(ch) { - return ( - (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || - (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence -pp$9.regexp_eatRegExpUnicodeEscapeSequence = function(state) { - var start = state.pos; - - if (state.eat(0x75 /* u */)) { - if (this.regexp_eatFixedHexDigits(state, 4)) { - var lead = state.lastIntValue; - if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { - var leadSurrogateEnd = state.pos; - if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { - var trail = state.lastIntValue; - if (trail >= 0xDC00 && trail <= 0xDFFF) { - state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - return true - } - } - state.pos = leadSurrogateEnd; - state.lastIntValue = lead; - } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape + pp$8.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + + if (isCharacterClassEscape(ch)) { + state.lastIntValue = -1; + state.advance(); return true } + if ( state.switchU && - state.eat(0x7B /* { */) && - this.regexp_eatHexDigits(state) && - state.eat(0x7D /* } */) && - isValidUnicode(state.lastIntValue) + this.options.ecmaVersion >= 9 && + (ch === 0x50 /* P */ || ch === 0x70 /* p */) ) { - return true + state.lastIntValue = -1; + state.advance(); + if ( + state.eat(0x7B /* { */) && + this.regexp_eatUnicodePropertyValueExpression(state) && + state.eat(0x7D /* } */) + ) { + return true + } + state.raise("Invalid property name"); } - if (state.switchU) { - state.raise("Invalid unicode escape"); + + return false + }; + function isCharacterClassEscape(ch) { + return ( + ch === 0x64 /* d */ || + ch === 0x44 /* D */ || + ch === 0x73 /* s */ || + ch === 0x53 /* S */ || + ch === 0x77 /* w */ || + ch === 0x57 /* W */ + ) + } + + // UnicodePropertyValueExpression :: + // UnicodePropertyName `=` UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + pp$8.regexp_eatUnicodePropertyValueExpression = function(state) { + var start = state.pos; + + // UnicodePropertyName `=` UnicodePropertyValue + if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { + var name = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name, value); + return true + } } state.pos = start; - } - return false -}; -function isValidUnicode(ch) { - return ch >= 0 && ch <= 0x10FFFF -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape -pp$9.regexp_eatIdentityEscape = function(state) { - if (state.switchU) { - if (this.regexp_eatSyntaxCharacter(state)) { - return true - } - if (state.eat(0x2F /* / */)) { - state.lastIntValue = 0x2F; /* / */ + // LoneUnicodePropertyNameOrValue + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); return true } return false - } + }; + pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { + if (!has(state.unicodeProperties.nonBinary, name)) + { state.raise("Invalid property name"); } + if (!state.unicodeProperties.nonBinary[name].test(value)) + { state.raise("Invalid property value"); } + }; + pp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (!state.unicodeProperties.binary.test(nameOrValue)) + { state.raise("Invalid property name"); } + }; - var ch = state.current(); - if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { - state.lastIntValue = ch; - state.advance(); - return true + // UnicodePropertyName :: + // UnicodePropertyNameCharacters + pp$8.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyNameCharacter(ch) { + return isControlLetter(ch) || ch === 0x5F /* _ */ } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape -pp$9.regexp_eatDecimalEscape = function(state) { - state.lastIntValue = 0; - var ch = state.current(); - if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { - do { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + // UnicodePropertyValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); state.advance(); - } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) - return true + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyValueCharacter(ch) { + return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape -pp$9.regexp_eatCharacterClassEscape = function(state) { - var ch = state.current(); - if (isCharacterClassEscape(ch)) { - state.lastIntValue = -1; - state.advance(); - return true - } + // LoneUnicodePropertyNameOrValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state) + }; - if ( - state.switchU && - this.options.ecmaVersion >= 9 && - (ch === 0x50 /* P */ || ch === 0x70 /* p */) - ) { - state.lastIntValue = -1; - state.advance(); - if ( - state.eat(0x7B /* { */) && - this.regexp_eatUnicodePropertyValueExpression(state) && - state.eat(0x7D /* } */) - ) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass + pp$8.regexp_eatCharacterClass = function(state) { + if (state.eat(0x5B /* [ */)) { + state.eat(0x5E /* ^ */); + this.regexp_classRanges(state); + if (state.eat(0x5D /* [ */)) { + return true + } + // Unreachable since it threw "unterminated regular expression" error before. + state.raise("Unterminated character class"); } - state.raise("Invalid property name"); - } + return false + }; - return false -}; -function isCharacterClassEscape(ch) { - return ( - ch === 0x64 /* d */ || - ch === 0x44 /* D */ || - ch === 0x73 /* s */ || - ch === 0x53 /* S */ || - ch === 0x77 /* w */ || - ch === 0x57 /* W */ - ) -} - -// UnicodePropertyValueExpression :: -// UnicodePropertyName `=` UnicodePropertyValue -// LoneUnicodePropertyNameOrValue -pp$9.regexp_eatUnicodePropertyValueExpression = function(state) { - var start = state.pos; - - // UnicodePropertyName `=` UnicodePropertyValue - if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { - var name = state.lastStringValue; - if (this.regexp_eatUnicodePropertyValue(state)) { - var value = state.lastStringValue; - this.regexp_validateUnicodePropertyNameAndValue(state, name, value); - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash + pp$8.regexp_classRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } } - } - state.pos = start; + }; - // LoneUnicodePropertyNameOrValue - if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { - var nameOrValue = state.lastStringValue; - this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); - return true - } - return false -}; -pp$9.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { - if (!has(state.unicodeProperties.nonBinary, name)) - { state.raise("Invalid property name"); } - if (!state.unicodeProperties.nonBinary[name].test(value)) - { state.raise("Invalid property value"); } -}; -pp$9.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { - if (!state.unicodeProperties.binary.test(nameOrValue)) - { state.raise("Invalid property name"); } -}; - -// UnicodePropertyName :: -// UnicodePropertyNameCharacters -pp$9.regexp_eatUnicodePropertyName = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyNameCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyNameCharacter(ch) { - return isControlLetter(ch) || ch === 0x5F /* _ */ -} - -// UnicodePropertyValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatUnicodePropertyValue = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyValueCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyValueCharacter(ch) { - return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) -} - -// LoneUnicodePropertyNameOrValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { - return this.regexp_eatUnicodePropertyValue(state) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass -pp$9.regexp_eatCharacterClass = function(state) { - if (state.eat(0x5B /* [ */)) { - state.eat(0x5E /* ^ */); - this.regexp_classRanges(state); - if (state.eat(0x5D /* [ */)) { - return true - } - // Unreachable since it threw "unterminated regular expression" error before. - state.raise("Unterminated character class"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash -pp$9.regexp_classRanges = function(state) { - var this$1 = this; - - while (this.regexp_eatClassAtom(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D /* - */) && this$1.regexp_eatClassAtom(state)) { - var right = state.lastIntValue; - if (state.switchU && (left === -1 || right === -1)) { - state.raise("Invalid character class"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash + pp$8.regexp_eatClassAtom = function(state) { + var start = state.pos; + + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatClassEscape(state)) { + return true } - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); + if (state.switchU) { + // Make the same message as V8. + var ch$1 = state.current(); + if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); } + state.pos = start; } - } -}; -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash -pp$9.regexp_eatClassAtom = function(state) { - var start = state.pos; - - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatClassEscape(state)) { + var ch = state.current(); + if (ch !== 0x5D /* [ */) { + state.lastIntValue = ch; + state.advance(); return true } - if (state.switchU) { - // Make the same message as V8. - var ch$1 = state.current(); - if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { - state.raise("Invalid class escape"); - } - state.raise("Invalid escape"); + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape + pp$8.regexp_eatClassEscape = function(state) { + var start = state.pos; + + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true } - state.pos = start; - } - var ch = state.current(); - if (ch !== 0x5D /* [ */) { - state.lastIntValue = ch; - state.advance(); - return true - } + if (state.switchU && state.eat(0x2D /* - */)) { + state.lastIntValue = 0x2D; /* - */ + return true + } - return false -}; + if (!state.switchU && state.eat(0x63 /* c */)) { + if (this.regexp_eatClassControlLetter(state)) { + return true + } + state.pos = start; + } -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape -pp$9.regexp_eatClassEscape = function(state) { - var start = state.pos; + return ( + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) + ) + }; - if (state.eat(0x62 /* b */)) { - state.lastIntValue = 0x08; /* */ - return true - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter + pp$8.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; - if (state.switchU && state.eat(0x2D /* - */)) { - state.lastIntValue = 0x2D; /* - */ - return true - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatHexEscapeSequence = function(state) { + var start = state.pos; + if (state.eat(0x78 /* x */)) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start; + } + return false + }; - if (!state.switchU && state.eat(0x63 /* c */)) { - if (this.regexp_eatClassControlLetter(state)) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits + pp$8.regexp_eatDecimalDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); } - state.pos = start; + return state.pos !== start + }; + function isDecimalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ } - return ( - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter -pp$9.regexp_eatClassControlLetter = function(state) { - var ch = state.current(); - if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatHexEscapeSequence = function(state) { - var start = state.pos; - if (state.eat(0x78 /* x */)) { - if (this.regexp_eatFixedHexDigits(state, 2)) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits + pp$8.regexp_eatHexDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); } - if (state.switchU) { - state.raise("Invalid escape"); + return state.pos !== start + }; + function isHexDigit(ch) { + return ( + (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || + (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || + (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) + ) + } + function hexToInt(ch) { + if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { + return 10 + (ch - 0x41 /* A */) } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits -pp$9.regexp_eatDecimalDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isDecimalDigit(ch = state.current())) { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } - return state.pos !== start -}; -function isDecimalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits -pp$9.regexp_eatHexDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isHexDigit(ch = state.current())) { - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return state.pos !== start -}; -function isHexDigit(ch) { - return ( - (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || - (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || - (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) - ) -} -function hexToInt(ch) { - if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { - return 10 + (ch - 0x41 /* A */) - } - if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { - return 10 + (ch - 0x61 /* a */) + if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { + return 10 + (ch - 0x61 /* a */) + } + return ch - 0x30 /* 0 */ } - return ch - 0x30 /* 0 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence -// Allows only 0-377(octal) i.e. 0-255(decimal). -pp$9.regexp_eatLegacyOctalEscapeSequence = function(state) { - if (this.regexp_eatOctalDigit(state)) { - var n1 = state.lastIntValue; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence + // Allows only 0-377(octal) i.e. 0-255(decimal). + pp$8.regexp_eatLegacyOctalEscapeSequence = function(state) { if (this.regexp_eatOctalDigit(state)) { - var n2 = state.lastIntValue; - if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { - state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } } else { - state.lastIntValue = n1 * 8 + n2; + state.lastIntValue = n1; } - } else { - state.lastIntValue = n1; + return true } - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit -pp$9.regexp_eatOctalDigit = function(state) { - var ch = state.current(); - if (isOctalDigit(ch)) { - state.lastIntValue = ch - 0x30; /* 0 */ - state.advance(); - return true - } - state.lastIntValue = 0; - return false -}; -function isOctalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit -// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatFixedHexDigits = function(state, length) { - var start = state.pos; - state.lastIntValue = 0; - for (var i = 0; i < length; ++i) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit + pp$8.regexp_eatOctalDigit = function(state) { var ch = state.current(); - if (!isHexDigit(ch)) { - state.pos = start; - return false + if (isOctalDigit(ch)) { + state.lastIntValue = ch - 0x30; /* 0 */ + state.advance(); + return true } - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); + state.lastIntValue = 0; + return false + }; + function isOctalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ } - return true -}; - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = function Token(p) { - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) - { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } - if (p.options.ranges) - { this.range = [p.start, p.end]; } -}; - -// ## Tokenizer - -var pp$8 = Parser.prototype; - -// Move to the next token - -pp$8.next = function() { - if (this.options.onToken) - { this.options.onToken(new Token(this)); } - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp$8.getToken = function() { - this.next(); - return new Token(this) -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") - { pp$8[Symbol.iterator] = function() { - var this$1 = this; - return { - next: function () { - var token = this$1.getToken(); - return { - done: token.type === types.eof, - value: token - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit + // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatFixedHexDigits = function(state, length) { + var start = state.pos; + state.lastIntValue = 0; + for (var i = 0; i < length; ++i) { + var ch = state.current(); + if (!isHexDigit(ch)) { + state.pos = start; + return false } + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); } - }; } + return true + }; + + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. + + var Token = function Token(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) + { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } + if (p.options.ranges) + { this.range = [p.start, p.end]; } + }; + + // ## Tokenizer -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). + var pp$9 = Parser.prototype; -pp$8.curContext = function() { - return this.context[this.context.length - 1] -}; + // Move to the next token -// Read a single token, updating the parser object's token-related -// properties. + pp$9.next = function() { + if (this.options.onToken) + { this.options.onToken(new Token(this)); } -pp$8.nextToken = function() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; - this.start = this.pos; - if (this.options.locations) { this.startLoc = this.curPosition(); } - if (this.pos >= this.input.length) { return this.finishToken(types.eof) } + pp$9.getToken = function() { + this.next(); + return new Token(this) + }; - if (curContext.override) { return curContext.override(this) } - else { this.readToken(this.fullCharCodeAtPos()); } -}; + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + { pp$9[Symbol.iterator] = function() { + var this$1 = this; + + return { + next: function () { + var token = this$1.getToken(); + return { + done: token.type === types.eof, + value: token + } + } + } + }; } -pp$8.readToken = function(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) - { return this.readWord() } + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). - return this.getTokenFromCode(code) -}; + pp$9.curContext = function() { + return this.context[this.context.length - 1] + }; -pp$8.fullCharCodeAtPos = function() { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) { return code } - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00 -}; + // Read a single token, updating the parser object's token-related + // properties. -pp$8.skipBlockComment = function() { - var this$1 = this; + pp$9.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } - this.pos = end + 2; - if (this.options.locations) { - lineBreakG.lastIndex = start; - var match; - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this$1.curLine; - this$1.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) - { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()); } -}; - -pp$8.skipLineComment = function(startSkip) { - var this$1 = this; - - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && !isNewLine(ch)) { - ch = this$1.input.charCodeAt(++this$1.pos); - } - if (this.options.onComment) - { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()); } -}; + this.start = this.pos; + if (this.options.locations) { this.startLoc = this.curPosition(); } + if (this.pos >= this.input.length) { return this.finishToken(types.eof) } -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. + if (curContext.override) { return curContext.override(this) } + else { this.readToken(this.fullCharCodeAtPos()); } + }; -pp$8.skipSpace = function() { - var this$1 = this; + pp$9.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + { return this.readWord() } - loop: while (this.pos < this.input.length) { - var ch = this$1.input.charCodeAt(this$1.pos); - switch (ch) { - case 32: case 160: // ' ' - ++this$1.pos; - break - case 13: - if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { - ++this$1.pos; - } - case 10: case 8232: case 8233: - ++this$1.pos; - if (this$1.options.locations) { - ++this$1.curLine; - this$1.lineStart = this$1.pos; + return this.getTokenFromCode(code) + }; + + pp$9.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xe000) { return code } + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 0x35fdc00 + }; + + pp$9.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } + this.pos = end + 2; + if (this.options.locations) { + lineBreakG.lastIndex = start; + var match; + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this.curLine; + this.lineStart = match.index + match[0].length; } - break - case 47: // '/' - switch (this$1.input.charCodeAt(this$1.pos + 1)) { - case 42: // '*' - this$1.skipBlockComment(); + } + if (this.options.onComment) + { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()); } + }; + + pp$9.skipLineComment = function(startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) + { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()); } + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + pp$9.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: case 160: // ' ' + ++this.pos; + break + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: case 8232: case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } break - case 47: - this$1.skipLineComment(2); + case 47: // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: // '*' + this.skipBlockComment(); + break + case 47: + this.skipLineComment(2); + break + default: + break loop + } break default: - break loop + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop + } } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this$1.pos; - } else { - break loop + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + pp$9.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { this.endLoc = this.curPosition(); } + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp$9.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { return this.readNumber(true) } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3; + return this.finishToken(types.ellipsis) + } else { + ++this.pos; + return this.finishToken(types.dot) + } + }; + + pp$9.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { ++this.pos; return this.readRegexp() } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.slash, 1) + }; + + pp$9.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code === 42 ? types.star : types.modulo; + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { + ++size; + tokentype = types.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + + if (next === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(tokentype, size) + }; + + pp$9.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) + }; + + pp$9.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.bitwiseXOR, 1) + }; + + pp$9.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && + (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() } + return this.finishOp(types.incDec, 2) } - } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp$8.finishToken = function(type, val) { - this.end = this.pos; - if (this.options.locations) { this.endLoc = this.curPosition(); } - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp$8.readToken_dot = function() { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) { return this.readNumber(true) } - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' - this.pos += 3; - return this.finishToken(types.ellipsis) - } else { - ++this.pos; - return this.finishToken(types.dot) - } -}; - -pp$8.readToken_slash = function() { // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { ++this.pos; return this.readRegexp() } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.slash, 1) -}; - -pp$8.readToken_mult_modulo_exp = function(code) { // '%*' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? types.star : types.modulo; - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { - ++size; - tokentype = types.starstar; - next = this.input.charCodeAt(this.pos + 2); - } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) + }; - if (next === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(tokentype, size) -}; - -pp$8.readToken_pipe_amp = function(code) { // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) -}; - -pp$8.readToken_caret = function() { // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.bitwiseXOR, 1) -}; - -pp$8.readToken_plus_min = function(code) { // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && - (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { - // A `-->` line comment - this.skipLineComment(3); + pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // ` + +* {null|string} + +Getter for the property `encoding` of a given `Readable` stream. The `encoding` +property can be set using the [`readable.setEncoding()`][] method. + ##### readable.readableHighWaterMark + +The `DiffieHellmanGroup` class takes a well-known modp group as its argument but +otherwise works the same as `DiffieHellman`. + +```js +const name = 'modp1'; +const dh = crypto.createDiffieHellmanGroup(name); +``` + +`name` is taken from [RFC 2412][] (modp1 and 2) and [RFC 3526][]: +```console +$ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h +modp1 # 768 bits +modp2 # 1024 bits +modp5 # 1536 bits +modp14 # 2048 bits +modp15 # etc. +modp16 +modp17 +modp18 +``` + ## Class: ECDH + +* `name` {string} +* Returns: {DiffieHellman} + +An alias for [`crypto.getDiffieHellman()`][] + ### crypto.createECDH(curveName) * `iterable` {Iterable} Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. From 4321cb2cf32c1597279a7216d09cd8373c9a7464 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Fri, 12 Jul 2019 09:50:48 -0700 Subject: [PATCH 103/162] doc: update js-native-api example Update example that shows how to separate N-API code which is not Node.js-specific from code which defines a Node.js N-API addon. In its existing state the example uses the pattern ```C assert(napi_*() == napi_ok); ``` However, this would result in no N-API calls when building with `-DNDEBUG`. This change moves away from assert and uses a macro `NAPI_CALL()` which throws the string corresponding to the non-`napi_ok` status as a JS exception and short-circuits the binding by returning `NULL`. PR-URL: https://github.com/nodejs/node/pull/28657 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Rich Trott --- doc/api/n-api.md | 58 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index fe5a3961957050..8a669b56336dbb 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -192,20 +192,48 @@ napi_value create_addon(napi_env env); ```C // addon.c #include "addon.h" + +#define NAPI_CALL(env, call) \ + do { \ + napi_status status = (call); \ + if (status != napi_ok) { \ + const napi_extended_error_info* error_info = NULL; \ + napi_get_last_error_info((env), &error_info); \ + bool is_pending; \ + napi_is_exception_pending((env), &is_pending); \ + if (!is_pending) { \ + const char* message = (error_info->error_message == NULL) \ + ? "empty error message" \ + : error_info->error_message; \ + napi_throw_error((env), NULL, message); \ + return NULL; \ + } \ + } \ + } while(0) + +static napi_value +DoSomethingUseful(napi_env env, napi_callback_info info) { + // Do something useful. + return NULL; +} + napi_value create_addon(napi_env env) { napi_value result; - assert(napi_create_object(env, &result) == napi_ok); + NAPI_CALL(env, napi_create_object(env, &result)); + napi_value exported_function; - assert(napi_create_function(env, - "doSomethingUseful", - NAPI_AUTO_LENGTH, - DoSomethingUseful, - NULL, - &exported_function) == napi_ok); - assert(napi_set_named_property(env, - result, - "doSomethingUseful", - exported_function) == napi_ok); + NAPI_CALL(env, napi_create_function(env, + "doSomethingUseful", + NAPI_AUTO_LENGTH, + DoSomethingUseful, + NULL, + &exported_function)); + + NAPI_CALL(env, napi_set_named_property(env, + result, + "doSomethingUseful", + exported_function)); + return result; } ``` @@ -213,12 +241,14 @@ napi_value create_addon(napi_env env) { ```C // addon_node.c #include +#include "addon.h" -static napi_value Init(napi_env env, napi_value exports) { +NAPI_MODULE_INIT() { + // This function body is expected to return a `napi_value`. + // The variables `napi_env env` and `napi_value exports` may be used within + // the body, as they are provided by the definition of `NAPI_MODULE_INIT()`. return create_addon(env); } - -NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) ``` ## Basic N-API Data Types From 3a4a236b51369c0156c0bf456e9aee909ae13247 Mon Sep 17 00:00:00 2001 From: Shajan Jacob Date: Mon, 10 Jun 2019 17:45:11 +0530 Subject: [PATCH 104/162] doc: fix minor typo PR-URL: https://github.com/nodejs/node/pull/28148 Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- doc/api/worker_threads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 0e6444b7c664f5..fa409627ebc472 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -306,7 +306,7 @@ In particular, the significant differences to `JSON` are: - `value` may contain circular references. - `value` may contain instances of builtin JS types such as `RegExp`s, `BigInt`s, `Map`s, `Set`s, etc. -- `value` may contained typed arrays, both using `ArrayBuffer`s +- `value` may contain typed arrays, both using `ArrayBuffer`s and `SharedArrayBuffer`s. - `value` may contain [`WebAssembly.Module`][] instances. - `value` may not contain native (C++-backed) objects other than `MessagePort`s. From 312f94916cbcc97977ab0d074b639e85a8e7d898 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 12 Jul 2019 12:10:28 +0800 Subject: [PATCH 105/162] deps: V8: backport d2ccc59 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [snapshot] print reference stack for JSFunctions in the isolate snapshot This helps debugging incorrect usage of the SnapshotCreator API in debug mode. Change-Id: Ibd9db76a5f460cdf7ea6d14e865592ebaf69aeef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648240 Reviewed-by: Yang Guo Commit-Queue: Yang Guo Cr-Commit-Position: refs/heads/master@{#62095} Refs: https://github.com/v8/v8/commit/d2ccc599c7a31838752350ae927e41bc386df414 PR-URL: https://github.com/nodejs/node/pull/28648 Reviewed-By: Michaël Zasso Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: James M Snell --- common.gypi | 2 +- deps/v8/src/snapshot/serializer.cc | 8 +++++--- deps/v8/src/snapshot/serializer.h | 1 + deps/v8/src/snapshot/startup-serializer.cc | 11 ++++++++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/common.gypi b/common.gypi index 63cd2e29c3c123..36e9745009ee44 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.14', + 'v8_embedder_string': '-node.15', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/snapshot/serializer.cc b/deps/v8/src/snapshot/serializer.cc index 0096b2c4fb41e3..447a69aea85f35 100644 --- a/deps/v8/src/snapshot/serializer.cc +++ b/deps/v8/src/snapshot/serializer.cc @@ -116,10 +116,12 @@ void Serializer::SerializeRootObject(Object object) { } #ifdef DEBUG -void Serializer::PrintStack() { +void Serializer::PrintStack() { PrintStack(std::cout); } + +void Serializer::PrintStack(std::ostream& out) { for (const auto o : stack_) { - o->Print(); - PrintF("\n"); + o.Print(out); + out << "\n"; } } #endif // DEBUG diff --git a/deps/v8/src/snapshot/serializer.h b/deps/v8/src/snapshot/serializer.h index 9f7c0ac90c3192..49ffddbefbd87e 100644 --- a/deps/v8/src/snapshot/serializer.h +++ b/deps/v8/src/snapshot/serializer.h @@ -250,6 +250,7 @@ class Serializer : public SerializerDeserializer { void PushStack(HeapObject o) { stack_.push_back(o); } void PopStack() { stack_.pop_back(); } void PrintStack(); + void PrintStack(std::ostream&); #endif // DEBUG SerializerReferenceMap* reference_map() { return &reference_map_; } diff --git a/deps/v8/src/snapshot/startup-serializer.cc b/deps/v8/src/snapshot/startup-serializer.cc index 907b3387429c4c..47b3f0f41b47ac 100644 --- a/deps/v8/src/snapshot/startup-serializer.cc +++ b/deps/v8/src/snapshot/startup-serializer.cc @@ -72,7 +72,16 @@ bool IsUnexpectedCodeObject(Isolate* isolate, HeapObject obj) { #endif // DEBUG void StartupSerializer::SerializeObject(HeapObject obj) { - DCHECK(!obj->IsJSFunction()); +#ifdef DEBUG + if (obj.IsJSFunction()) { + v8::base::OS::PrintError("Reference stack:\n"); + PrintStack(std::cerr); + obj.Print(std::cerr); + FATAL( + "JSFunction should be added through the context snapshot instead of " + "the isolate snapshot"); + } +#endif // DEBUG DCHECK(!IsUnexpectedCodeObject(isolate(), obj)); if (SerializeHotObject(obj)) return; From 0b7fecaf97d9067dd8bd14dba0ba159ca8cf56a2 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 20 Jun 2019 22:23:11 +0100 Subject: [PATCH 106/162] src: large pages option: FreeBSD support proposal Enabling on amd64 and as Linux, are 2MB large. The ELF section linkage script is compatible only with GNU ld. PR-URL: https://github.com/nodejs/node/pull/28331 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Rich Trott --- configure.py | 17 ++--- node.gyp | 2 +- src/large_pages/node_large_page.cc | 100 +++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+), 9 deletions(-) diff --git a/configure.py b/configure.py index 2376095719f6f1..44d2eb253909ca 100755 --- a/configure.py +++ b/configure.py @@ -1039,22 +1039,23 @@ def configure_node(o): else: o['variables']['node_use_dtrace'] = 'false' - if options.node_use_large_pages and flavor != 'linux': + if options.node_use_large_pages and not flavor in ('linux', 'freebsd'): raise Exception( 'Large pages are supported only on Linux Systems.') - if options.node_use_large_pages and flavor == 'linux': + if options.node_use_large_pages and flavor in ('linux', 'freebsd'): if options.shared or options.enable_static: raise Exception( 'Large pages are supported only while creating node executable.') if target_arch!="x64": raise Exception( 'Large pages are supported only x64 platform.') - # Example full version string: 2.6.32-696.28.1.el6.x86_64 - FULL_KERNEL_VERSION=os.uname()[2] - KERNEL_VERSION=FULL_KERNEL_VERSION.split('-')[0] - if KERNEL_VERSION < "2.6.38": - raise Exception( - 'Large pages need Linux kernel version >= 2.6.38') + if flavor == 'linux': + # Example full version string: 2.6.32-696.28.1.el6.x86_64 + FULL_KERNEL_VERSION=os.uname()[2] + KERNEL_VERSION=FULL_KERNEL_VERSION.split('-')[0] + if KERNEL_VERSION < "2.6.38" and flavor == 'linux': + raise Exception( + 'Large pages need Linux kernel version >= 2.6.38') o['variables']['node_use_large_pages'] = b(options.node_use_large_pages) if options.no_ifaddrs: diff --git a/node.gyp b/node.gyp index 3f37cf45d6a503..ed9de85f99f386 100644 --- a/node.gyp +++ b/node.gyp @@ -811,7 +811,7 @@ }], ], }], - [ 'node_use_large_pages=="true" and OS=="linux"', { + [ 'node_use_large_pages=="true" and OS in "linux freebsd"', { 'defines': [ 'NODE_ENABLE_LARGE_CODE_PAGES=1' ], # The current implementation of Large Pages is under Linux. # Other implementations are possible but not currently supported. diff --git a/src/large_pages/node_large_page.cc b/src/large_pages/node_large_page.cc index 333a119ee46cb4..79cc013deef402 100644 --- a/src/large_pages/node_large_page.cc +++ b/src/large_pages/node_large_page.cc @@ -21,10 +21,16 @@ // SPDX-License-Identifier: MIT #include "node_large_page.h" +#include "util.h" +#include "uv.h" #include // _O_RDWR #include #include +#if defined(__FreeBSD__) +#include +#include +#endif #include // readlink #include // NOLINT(build/include) @@ -39,6 +45,7 @@ #include #include #include +#include // The functions in this file map the text segment of node into 2M pages. // The algorithm is simple @@ -88,6 +95,7 @@ inline int64_t hugepage_align_down(int64_t addr) { // This is also handling the case where the first line is not the binary static struct text_region FindNodeTextRegion() { +#if defined(__linux__) std::ifstream ifs; std::string map_line; std::string permission; @@ -141,9 +149,68 @@ static struct text_region FindNodeTextRegion() { } ifs.close(); +#elif defined(__FreeBSD__) + struct text_region nregion; + nregion.found_text_region = false; + + std::string exename; + { + char selfexe[PATH_MAX]; + size_t count = sizeof(selfexe); + if (uv_exepath(selfexe, &count)) + return nregion; + + exename = std::string(selfexe, count); + } + + size_t numpg; + int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, getpid()}; + const size_t miblen = arraysize(mib); + if (sysctl(mib, miblen, nullptr, &numpg, nullptr, 0) == -1) { + return nregion; + } + + // for struct kinfo_vmentry + numpg = numpg * 4 / 3; + auto alg = std::vector(numpg); + + if (sysctl(mib, miblen, alg.data(), &numpg, nullptr, 0) == -1) { + return nregion; + } + + char* start = alg.data(); + char* end = start + numpg; + + while (start < end) { + kinfo_vmentry* entry = reinterpret_cast(start); + const size_t cursz = entry->kve_structsize; + if (cursz == 0) { + break; + } + + if (entry->kve_path[0] == '\0') { + continue; + } + bool excmapping = ((entry->kve_protection & KVME_PROT_READ) && + (entry->kve_protection & KVME_PROT_EXEC)); + + if (!strcmp(exename.c_str(), entry->kve_path) && excmapping) { + size_t size = entry->kve_end - entry->kve_start; + nregion.found_text_region = true; + nregion.from = + reinterpret_cast(hugepage_align_up(entry->kve_start)); + nregion.to = + reinterpret_cast(hugepage_align_down(entry->kve_end)); + nregion.total_hugepages = size / hps; + break; + } + start += cursz; + } +#endif return nregion; } +#if defined(__linux__) static bool IsTransparentHugePagesEnabled() { std::ifstream ifs; @@ -171,6 +238,19 @@ static bool IsTransparentHugePagesEnabled() { ifs.close(); return ret_status; } +#elif defined(__FreeBSD__) +static bool IsSuperPagesEnabled() { + // It is enabled by default on amd64 + unsigned int super_pages = 0; + size_t super_pages_length = sizeof(super_pages); + if (sysctlbyname("vm.pmap.pg_ps_enabled", &super_pages, + &super_pages_length, nullptr, 0) == -1 || + super_pages < 1) { + return false; + } + return true; +} +#endif // Moving the text region to large pages. We need to be very careful. // 1: This function itself should not be moved. @@ -206,6 +286,7 @@ MoveTextRegionToLargePages(const text_region& r) { memcpy(nmem, r.from, size); +#if defined(__linux__) // We already know the original page is r-xp // (PROT_READ, PROT_EXEC, MAP_PRIVATE) // We want PROT_WRITE because we are writing into it. @@ -233,6 +314,17 @@ MoveTextRegionToLargePages(const text_region& r) { return -1; } +#elif defined(__FreeBSD__) + tmem = mmap(start, size, + PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | + MAP_ALIGNED_SUPER, -1 , 0); + if (tmem == MAP_FAILED) { + PrintSystemError(errno); + munmap(nmem, size); + return -1; + } +#endif memcpy(start, nmem, size); ret = mprotect(start, size, PROT_READ | PROT_EXEC); @@ -266,14 +358,22 @@ int MapStaticCodeToLargePages() { return -1; } +#if defined(__linux__) if (r.from > reinterpret_cast(&MoveTextRegionToLargePages)) return MoveTextRegionToLargePages(r); return -1; +#elif defined(__FreeBSD__) + return MoveTextRegionToLargePages(r); +#endif } bool IsLargePagesEnabled() { +#if defined(__linux__) return IsTransparentHugePagesEnabled(); +#else + return IsSuperPagesEnabled(); +#endif } } // namespace node From 1770bc870e6ea05e95a32be43705107147a22442 Mon Sep 17 00:00:00 2001 From: Andrey Melikhov Date: Sun, 26 May 2019 15:51:36 +0300 Subject: [PATCH 107/162] module: increase code coverage of cjs loader Add test cases to cover uncovered wrap and wrapper getters. Refs: https://coverage.nodejs.org/coverage-99268b1e996d13a0/lib/internal/modules/cjs/loader.js.html#L153 PR-URL: https://github.com/nodejs/node/pull/27898 Reviewed-By: Anna Henningsen Reviewed-By: Jan Krems Reviewed-By: James M Snell Reviewed-By: Rich Trott --- test/fixtures/cjs-module-wrap.js | 1 + test/fixtures/cjs-module-wrapper.js | 23 +++++++++++++++++++++++ test/parallel/test-module-wrap.js | 2 +- test/parallel/test-module-wrapper.js | 9 +++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/cjs-module-wrapper.js create mode 100644 test/parallel/test-module-wrapper.js diff --git a/test/fixtures/cjs-module-wrap.js b/test/fixtures/cjs-module-wrap.js index 2e11cc1a3b3231..4a3114c5f1e1e9 100644 --- a/test/fixtures/cjs-module-wrap.js +++ b/test/fixtures/cjs-module-wrap.js @@ -1,3 +1,4 @@ +'use strict'; const assert = require('assert'); const m = require('module'); diff --git a/test/fixtures/cjs-module-wrapper.js b/test/fixtures/cjs-module-wrapper.js new file mode 100644 index 00000000000000..b4e73682af8ed5 --- /dev/null +++ b/test/fixtures/cjs-module-wrapper.js @@ -0,0 +1,23 @@ +'use strict'; +const assert = require('assert'); +const m = require('module'); + +global.mwc = 0; + +const originalWrapper = m.wrapper; +const patchedWrapper = {...m.wrapper}; + +patchedWrapper[0] += 'global.mwc = (global.mwc || 0 ) + 1'; + +// Storing original version of wrapper function +m.wrapper = patchedWrapper; + +require('./not-main-module.js'); + +assert.strictEqual(mwc, 1); + +// Restoring original wrapper function +m.wrapper = originalWrapper; +// Cleaning require cache +delete require.cache[require.resolve('./not-main-module.js')]; +delete global.mwc; diff --git a/test/parallel/test-module-wrap.js b/test/parallel/test-module-wrap.js index 639300cb6af66a..367307e4a79255 100644 --- a/test/parallel/test-module-wrap.js +++ b/test/parallel/test-module-wrap.js @@ -4,6 +4,6 @@ const fixtures = require('../common/fixtures'); const { execFileSync } = require('child_process'); const cjsModuleWrapTest = fixtures.path('cjs-module-wrap.js'); -const node = process.argv[0]; +const node = process.execPath; execFileSync(node, [cjsModuleWrapTest], { stdio: 'pipe' }); diff --git a/test/parallel/test-module-wrapper.js b/test/parallel/test-module-wrapper.js new file mode 100644 index 00000000000000..39e6d734f4f069 --- /dev/null +++ b/test/parallel/test-module-wrapper.js @@ -0,0 +1,9 @@ +'use strict'; +require('../common'); +const fixtures = require('../common/fixtures'); +const { execFileSync } = require('child_process'); + +const cjsModuleWrapTest = fixtures.path('cjs-module-wrapper.js'); +const node = process.execPath; + +execFileSync(node, [cjsModuleWrapTest], { stdio: 'pipe' }); From d3f51457af3e2c603657a3c6a6dcbcd22069b473 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 2 Jul 2019 09:46:43 +0200 Subject: [PATCH 108/162] test: use openssl_is_fips instead of hasFipsCrypto Currently, when dynamically linking against a FIPS enabled OpenSSL library test-process-env-allowed-flags-are-documented will fail with the following error: assert.js:89 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: The following options are not documented as allowed in NODE_OPTIONS in /root/node/doc/api/cli.md: --enable-fips --force-fips at Object. (/test/parallel/test-process-env-allowed-flags-are-documented.js:82:8) at Module._compile (internal/modules/cjs/loader.js:779:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:790:10) at Module.load (internal/modules/cjs/loader.js:642:32) at Function.Module._load (internal/modules/cjs/loader.js:555:12) at Function.Module.runMain (internal/modules/cjs/loader.js:842:10) at internal/main/run_main_module.js:17:11 { generatedMessage: false, code: 'ERR_ASSERTION', actual: 2, expected: 0, operator: 'strictEqual' } This commit updates the test to use process.config.variables.openssl_is_fips instead of common.hasFipsCrypto as hasFipsCrypto only returns true if the OpenSSL library that is shipped with node was configured with FIPS enabled. PR-URL: https://github.com/nodejs/node/pull/28507 Reviewed-By: Ben Noordhuis Reviewed-By: Rich Trott Reviewed-By: Richard Lau Reviewed-By: Ruben Bridgewater --- .../test-process-env-allowed-flags-are-documented.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-process-env-allowed-flags-are-documented.js b/test/parallel/test-process-env-allowed-flags-are-documented.js index 0a6034f746784d..a60f6bbecf69cf 100644 --- a/test/parallel/test-process-env-allowed-flags-are-documented.js +++ b/test/parallel/test-process-env-allowed-flags-are-documented.js @@ -46,7 +46,14 @@ const conditionalOpts = [ return ['--openssl-config', '--tls-cipher-list', '--use-bundled-ca', '--use-openssl-ca' ].includes(opt); } }, - { include: common.hasFipsCrypto, + { + // We are using openssl_is_fips from the configuration because it could be + // the case that OpenSSL is FIPS compatible but fips has not been enabled + // (starting node with --enable-fips). If we use common.hasFipsCrypto + // that would only tells us if fips has been enabled, but in this case we + // want to check options which will be available regardless of whether fips + // is enabled at runtime or not. + include: process.config.variables.openssl_is_fips, filter: (opt) => opt.includes('-fips') }, { include: common.hasIntl, filter: (opt) => opt === '--icu-data-dir' }, From 9b2eee12eb56c0439165282619d92c192a6663e7 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 5 Jul 2019 13:42:14 +0200 Subject: [PATCH 109/162] test: update hasFipsCrypto in test/common/README PR-URL: https://github.com/nodejs/node/pull/28507 Reviewed-By: Ben Noordhuis Reviewed-By: Rich Trott Reviewed-By: Richard Lau Reviewed-By: Ruben Bridgewater --- test/common/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/common/README.md b/test/common/README.md index 0fd03ce767265a..63c5fb1a56f0ec 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -194,7 +194,12 @@ Indicates whether OpenSSL is available. ### hasFipsCrypto * [<boolean>] -Indicates `hasCrypto` and `crypto` with fips. +Indicates that Node.js has been linked with a FIPS compatible OpenSSL library, +and that FIPS as been enabled using `--enable-fips`. + +To only detect if the OpenSSL library is FIPS compatible, regardless if it has +been enabled or not, then `process.config.variables.openssl_is_fips` can be +used to determine that situation. ### hasIntl * [<boolean>] From 2308c7412a12d3d7a61a8b66ba236f8a17a1c699 Mon Sep 17 00:00:00 2001 From: Austin Wright Date: Thu, 27 Jun 2019 16:10:55 -0700 Subject: [PATCH 110/162] http: expose headers on an http.ClientRequest "information" event 1xx intermediate status responses are allowed to have headers; so expose the "httpVersion", "httpVersionMajor", "httpVersionMinor", "headers", "rawHeaders", and "statusMessage" properties on this event. PR-URL: https://github.com/nodejs/node/pull/28459 Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina Reviewed-By: Rich Trott --- doc/api/http.md | 14 +++- lib/_http_client.js | 10 ++- .../parallel/test-http-information-headers.js | 64 +++++++++++++++++++ 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 test/parallel/test-http-information-headers.js diff --git a/doc/api/http.md b/doc/api/http.md index 999cb4da4c2b73..17e60e2fa5e64f 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -421,10 +421,18 @@ added: v10.0.0 --> * `info` {Object} + * `httpVersion` {string} + * `httpVersionMajor` {integer} + * `httpVersionMinor` {integer} * `statusCode` {integer} - -Emitted when the server sends a 1xx response (excluding 101 Upgrade). The -listeners of this event will receive an object containing the status code. + * `statusMessage` {string} + * `headers` {Object} + * `rawHeaders` {string[]} + +Emitted when the server sends a 1xx intermediate response (excluding 101 +Upgrade). The listeners of this event will receive an object containing the +HTTP version, status code, status message, key-value headers object, +and array with the raw header names followed by their respective values. ```js const http = require('http'); diff --git a/lib/_http_client.js b/lib/_http_client.js index fcd7ca90aca7ed..11e946c893b7c3 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -545,7 +545,15 @@ function parserOnIncomingClient(res, shouldKeepAlive) { req.emit('continue'); } // Send information events to all 1xx responses except 101 Upgrade. - req.emit('information', { statusCode: res.statusCode }); + req.emit('information', { + statusCode: res.statusCode, + statusMessage: res.statusMessage, + httpVersion: res.httpVersion, + httpVersionMajor: res.httpVersionMajor, + httpVersionMinor: res.httpVersionMinor, + headers: res.headers, + rawHeaders: res.rawHeaders + }); return 1; // Skip body but don't treat as Upgrade. } diff --git a/test/parallel/test-http-information-headers.js b/test/parallel/test-http-information-headers.js new file mode 100644 index 00000000000000..f5cfa5078b85ac --- /dev/null +++ b/test/parallel/test-http-information-headers.js @@ -0,0 +1,64 @@ +'use strict'; +require('../common'); +const assert = require('assert'); +const http = require('http'); +const Countdown = require('../common/countdown'); + +const test_res_body = 'other stuff!\n'; +const countdown = new Countdown(2, () => server.close()); + +const server = http.createServer((req, res) => { + console.error('Server sending informational message #1...'); + // These function calls may rewritten as necessary + // to call res.writeHead instead + res._writeRaw('HTTP/1.1 102 Processing\r\n'); + res._writeRaw('Foo: Bar\r\n'); + res._writeRaw('\r\n'); + console.error('Server sending full response...'); + res.writeHead(200, { + 'Content-Type': 'text/plain', + 'ABCD': '1' + }); + res.end(test_res_body); +}); + +server.listen(0, function() { + const req = http.request({ + port: this.address().port, + path: '/world' + }); + req.end(); + console.error('Client sending request...'); + + let body = ''; + + req.on('information', function(res) { + assert.strictEqual(res.httpVersion, '1.1'); + assert.strictEqual(res.httpVersionMajor, 1); + assert.strictEqual(res.httpVersionMinor, 1); + assert.strictEqual(res.statusCode, 102, + `Received ${res.statusCode}, not 102.`); + assert.strictEqual(res.statusMessage, 'Processing', + `Received ${res.statusMessage}, not "Processing".`); + assert.strictEqual(res.headers.foo, 'Bar'); + assert.strictEqual(res.rawHeaders[0], 'Foo'); + assert.strictEqual(res.rawHeaders[1], 'Bar'); + console.error('Client got 102 Processing...'); + countdown.dec(); + }); + + req.on('response', function(res) { + // Check that all 102 Processing received before full response received. + assert.strictEqual(countdown.remaining, 1); + assert.strictEqual(res.statusCode, 200, + `Final status code was ${res.statusCode}, not 200.`); + res.setEncoding('utf8'); + res.on('data', function(chunk) { body += chunk; }); + res.on('end', function() { + console.error('Got full response.'); + assert.strictEqual(body, test_res_body); + assert.ok('abcd' in res.headers); + countdown.dec(); + }); + }); +}); From 0f5af4430471ff157e8db23536f2c7fda7f449b2 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 13 Jul 2019 18:08:19 -0400 Subject: [PATCH 111/162] readline: expose stream API in clearLine() This commit adds an optional callback to clearLine(), which is passed to the stream's write() method. It also exposes the return value of write(). PR-URL: https://github.com/nodejs/node/pull/28674 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- doc/api/readline.md | 10 +++++++++- lib/readline.js | 22 ++++++++++------------ test/parallel/test-readline-csi.js | 21 ++++++++++++++++++--- 3 files changed, 37 insertions(+), 16 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index b295ace5b3f00b..936ffb5d842788 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -346,9 +346,13 @@ async function processLineByLine() { } ``` -## readline.clearLine(stream, dir) +## readline.clearLine(stream, dir[, callback]) * `stream` {stream.Writable} @@ -356,6 +360,10 @@ added: v0.7.7 * `-1` - to the left from cursor * `1` - to the right from cursor * `0` - the entire line +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for + the `'drain'` event to be emitted before continuing to write additional data; + otherwise `true`. The `readline.clearLine()` method clears current line of given [TTY][] stream in a specified direction identified by `dir`. diff --git a/lib/readline.js b/lib/readline.js index fe0c093a5624a7..06e8581e7b0b35 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -1234,20 +1234,18 @@ function moveCursor(stream, dx, dy) { * 0 for the entire line */ -function clearLine(stream, dir) { - if (stream === null || stream === undefined) - return; +function clearLine(stream, dir, callback) { + if (callback !== undefined && typeof callback !== 'function') + throw new ERR_INVALID_CALLBACK(callback); - if (dir < 0) { - // to the beginning - stream.write(kClearToBeginning); - } else if (dir > 0) { - // to the end - stream.write(kClearToEnd); - } else { - // entire line - stream.write(kClearLine); + if (stream === null || stream === undefined) { + if (typeof callback === 'function') + process.nextTick(callback); + return true; } + + const type = dir < 0 ? kClearToBeginning : dir > 0 ? kClearToEnd : kClearLine; + return stream.write(type, callback); } /** diff --git a/test/parallel/test-readline-csi.js b/test/parallel/test-readline-csi.js index c753c5d93c26ec..becd4cd8d4dc05 100644 --- a/test/parallel/test-readline-csi.js +++ b/test/parallel/test-readline-csi.js @@ -44,17 +44,32 @@ assert.strictEqual(readline.clearScreenDown(undefined, common.mustCall()), true); writable.data = ''; -readline.clearLine(writable, -1); +assert.strictEqual(readline.clearLine(writable, -1), true); assert.deepStrictEqual(writable.data, CSI.kClearToBeginning); writable.data = ''; -readline.clearLine(writable, 1); +assert.strictEqual(readline.clearLine(writable, 1), true); assert.deepStrictEqual(writable.data, CSI.kClearToEnd); writable.data = ''; -readline.clearLine(writable, 0); +assert.strictEqual(readline.clearLine(writable, 0), true); assert.deepStrictEqual(writable.data, CSI.kClearLine); +writable.data = ''; +assert.strictEqual(readline.clearLine(writable, -1, common.mustCall()), true); +assert.deepStrictEqual(writable.data, CSI.kClearToBeginning); + +// Verify that clearLine() throws on invalid callback. +assert.throws(() => { + readline.clearLine(writable, 0, null); +}, /ERR_INVALID_CALLBACK/); + +// Verify that clearLine() does not throw on null or undefined stream. +assert.strictEqual(readline.clearLine(null, 0), true); +assert.strictEqual(readline.clearLine(undefined, 0), true); +assert.strictEqual(readline.clearLine(null, 0, common.mustCall()), true); +assert.strictEqual(readline.clearLine(undefined, 0, common.mustCall()), true); + // Nothing is written when moveCursor 0, 0 [ [0, 0, ''], From 4a7e20ff81770916c38def86106f469d444a65d7 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 13 Jul 2019 19:22:46 -0400 Subject: [PATCH 112/162] readline: expose stream API in moveCursor() This commit adds an optional callback to moveCursor(), which is passed to the stream's write() method. It also exposes the return value of write(). PR-URL: https://github.com/nodejs/node/pull/28674 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- doc/api/readline.md | 10 +++++++++- lib/readline.js | 24 +++++++++++++++++------- test/parallel/test-readline-csi.js | 20 +++++++++++++++++++- 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index 936ffb5d842788..43314e136fcab3 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -525,14 +525,22 @@ if (process.stdin.isTTY) process.stdin.setRawMode(true); ``` -## readline.moveCursor(stream, dx, dy) +## readline.moveCursor(stream, dx, dy[, callback]) * `stream` {stream.Writable} * `dx` {number} * `dy` {number} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for + the `'drain'` event to be emitted before continuing to write additional data; + otherwise `true`. The `readline.moveCursor()` method moves the cursor *relative* to its current position in a given [TTY][] `stream`. diff --git a/lib/readline.js b/lib/readline.js index 06e8581e7b0b35..2190c620bdc0b7 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -1210,21 +1210,31 @@ function cursorTo(stream, x, y) { * moves the cursor relative to its current location */ -function moveCursor(stream, dx, dy) { - if (stream === null || stream === undefined) - return; +function moveCursor(stream, dx, dy, callback) { + if (callback !== undefined && typeof callback !== 'function') + throw new ERR_INVALID_CALLBACK(callback); + + if (stream == null || !(dx || dy)) { + if (typeof callback === 'function') + process.nextTick(callback); + return true; + } + + let data = ''; if (dx < 0) { - stream.write(CSI`${-dx}D`); + data += CSI`${-dx}D`; } else if (dx > 0) { - stream.write(CSI`${dx}C`); + data += CSI`${dx}C`; } if (dy < 0) { - stream.write(CSI`${-dy}A`); + data += CSI`${-dy}A`; } else if (dy > 0) { - stream.write(CSI`${dy}B`); + data += CSI`${dy}B`; } + + return stream.write(data, callback); } /** diff --git a/test/parallel/test-readline-csi.js b/test/parallel/test-readline-csi.js index becd4cd8d4dc05..b89990d594dc80 100644 --- a/test/parallel/test-readline-csi.js +++ b/test/parallel/test-readline-csi.js @@ -83,10 +83,28 @@ assert.strictEqual(readline.clearLine(undefined, 0, common.mustCall()), true); [1, -1, '\x1b[1C\x1b[1A'], ].forEach((set) => { writable.data = ''; - readline.moveCursor(writable, set[0], set[1]); + assert.strictEqual(readline.moveCursor(writable, set[0], set[1]), true); + assert.deepStrictEqual(writable.data, set[2]); + writable.data = ''; + assert.strictEqual( + readline.moveCursor(writable, set[0], set[1], common.mustCall()), + true + ); assert.deepStrictEqual(writable.data, set[2]); }); +// Verify that moveCursor() throws on invalid callback. +assert.throws(() => { + readline.moveCursor(writable, 1, 1, null); +}, /ERR_INVALID_CALLBACK/); + +// Verify that moveCursor() does not throw on null or undefined stream. +assert.strictEqual(readline.moveCursor(null, 1, 1), true); +assert.strictEqual(readline.moveCursor(undefined, 1, 1), true); +assert.strictEqual(readline.moveCursor(null, 1, 1, common.mustCall()), true); +assert.strictEqual(readline.moveCursor(undefined, 1, 1, common.mustCall()), + true); + // Undefined or null as stream should not throw. readline.cursorTo(null); readline.cursorTo(); From caee9106acd54832b529ac7f8ce7d9a8da170a4e Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 13 Jul 2019 20:10:17 -0400 Subject: [PATCH 113/162] readline: expose stream API in cursorTo() This commit adds an optional callback to cursorTo(), which is passed to the stream's write() method. It also exposes the return value of write(). PR-URL: https://github.com/nodejs/node/pull/28674 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- doc/api/readline.md | 10 +++++++++- lib/readline.js | 20 ++++++++++---------- test/parallel/test-readline-csi.js | 23 +++++++++++++++++------ 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index 43314e136fcab3..4ff572f2e5f396 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -487,14 +487,22 @@ function completer(linePartial, callback) { } ``` -## readline.cursorTo(stream, x, y) +## readline.cursorTo(stream, x, y[, callback]) * `stream` {stream.Writable} * `x` {number} * `y` {number} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for + the `'drain'` event to be emitted before continuing to write additional data; + otherwise `true`. The `readline.cursorTo()` method moves cursor to the specified position in a given [TTY][] `stream`. diff --git a/lib/readline.js b/lib/readline.js index 2190c620bdc0b7..77b9dbc6c8f213 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -1189,21 +1189,21 @@ function emitKeypressEvents(stream, iface) { * moves the cursor to the x and y coordinate on the given stream */ -function cursorTo(stream, x, y) { - if (stream === null || stream === undefined) - return; +function cursorTo(stream, x, y, callback) { + if (callback !== undefined && typeof callback !== 'function') + throw new ERR_INVALID_CALLBACK(callback); - if (typeof x !== 'number' && typeof y !== 'number') - return; + if (stream == null || (typeof x !== 'number' && typeof y !== 'number')) { + if (typeof callback === 'function') + process.nextTick(callback); + return true; + } if (typeof x !== 'number') throw new ERR_INVALID_CURSOR_POS(); - if (typeof y !== 'number') { - stream.write(CSI`${x + 1}G`); - } else { - stream.write(CSI`${y + 1};${x + 1}H`); - } + const data = typeof y !== 'number' ? CSI`${x + 1}G` : CSI`${y + 1};${x + 1}H`; + return stream.write(data, callback); } /** diff --git a/test/parallel/test-readline-csi.js b/test/parallel/test-readline-csi.js index b89990d594dc80..1556892cff1a12 100644 --- a/test/parallel/test-readline-csi.js +++ b/test/parallel/test-readline-csi.js @@ -106,15 +106,17 @@ assert.strictEqual(readline.moveCursor(undefined, 1, 1, common.mustCall()), true); // Undefined or null as stream should not throw. -readline.cursorTo(null); -readline.cursorTo(); +assert.strictEqual(readline.cursorTo(null), true); +assert.strictEqual(readline.cursorTo(), true); +assert.strictEqual(readline.cursorTo(null, 1, 1, common.mustCall()), true); +assert.strictEqual(readline.cursorTo(undefined, 1, 1, common.mustCall()), true); writable.data = ''; -readline.cursorTo(writable, 'a'); +assert.strictEqual(readline.cursorTo(writable, 'a'), true); assert.strictEqual(writable.data, ''); writable.data = ''; -readline.cursorTo(writable, 'a', 'b'); +assert.strictEqual(readline.cursorTo(writable, 'a', 'b'), true); assert.strictEqual(writable.data, ''); writable.data = ''; @@ -128,9 +130,18 @@ common.expectsError( assert.strictEqual(writable.data, ''); writable.data = ''; -readline.cursorTo(writable, 1, 'a'); +assert.strictEqual(readline.cursorTo(writable, 1, 'a'), true); assert.strictEqual(writable.data, '\x1b[2G'); writable.data = ''; -readline.cursorTo(writable, 1, 2); +assert.strictEqual(readline.cursorTo(writable, 1, 2), true); assert.strictEqual(writable.data, '\x1b[3;2H'); + +writable.data = ''; +assert.strictEqual(readline.cursorTo(writable, 1, 2, common.mustCall()), true); +assert.strictEqual(writable.data, '\x1b[3;2H'); + +// Verify that cursorTo() throws on invalid callback. +assert.throws(() => { + readline.cursorTo(writable, 1, 1, null); +}, /ERR_INVALID_CALLBACK/); From 06d0abea0d7ef0a83e0171d5846fd7d597bc83fa Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sun, 14 Jul 2019 18:13:08 +0200 Subject: [PATCH 114/162] http: add response.writableFinished response.writableFinished is true if all data has been flushed to the underlying system. PR-URL: https://github.com/nodejs/node/pull/28681 Reviewed-By: Anna Henningsen Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Trivikram Kamat Reviewed-By: Rich Trott --- doc/api/http.md | 9 ++++++ lib/_http_outgoing.js | 9 ++++++ .../test-http-outgoing-writableFinished.js | 32 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 test/parallel/test-http-outgoing-writableFinished.js diff --git a/doc/api/http.md b/doc/api/http.md index 17e60e2fa5e64f..8df5ea2d6186d7 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1464,6 +1464,15 @@ Returns `true` if the entire data was flushed successfully to the kernel buffer. Returns `false` if all or part of the data was queued in user memory. `'drain'` will be emitted when the buffer is free again. +### response.writableFinished + + +* {boolean} + +Is `true` if all data has been flushed to the underlying system. + ### response.writeContinue() \nrepl:9:24--->\nd (repl:12:3)' + - '--->\nc (repl:9:3)--->\nb (repl:6:3)--->\na (repl:3:3)\n' + expected: 'Thrown:\nError: Whoops!--->\nrepl:*:*--->\nd (repl:*:*)' + + '--->\nc (repl:*:*)--->\nb (repl:*:*)--->\na (repl:*:*)\n' }, { command: 'let x y;', @@ -63,7 +67,7 @@ const tests = [ // test anonymous IIFE { command: '(function() { throw new Error(\'Whoops!\'); })()', - expected: 'Thrown:\nError: Whoops!--->\nrepl:1:21\n' + expected: 'Thrown:\nError: Whoops!--->\nrepl:*:*\n' } ]; diff --git a/test/parallel/test-repl-pretty-stack.js b/test/parallel/test-repl-pretty-stack.js index 8beb48fd689dc7..9f307c4f430b8c 100644 --- a/test/parallel/test-repl-pretty-stack.js +++ b/test/parallel/test-repl-pretty-stack.js @@ -5,6 +5,7 @@ const fixtures = require('../common/fixtures'); const assert = require('assert'); const repl = require('repl'); +const stackRegExp = /(at .*repl:)[0-9]+:[0-9]+/g; function run({ command, expected, ...extraREPLOptions }) { let accum = ''; @@ -24,7 +25,10 @@ function run({ command, expected, ...extraREPLOptions }) { }); r.write(`${command}\n`); - assert.strictEqual(accum, expected); + assert.strictEqual( + accum.replace(stackRegExp, '$1*:*'), + expected.replace(stackRegExp, '$1*:*') + ); r.close(); } @@ -32,9 +36,9 @@ const tests = [ { // Test .load for a file that throws. command: `.load ${fixtures.path('repl-pretty-stack.js')}`, - expected: 'Thrown:\nError: Whoops!\n at repl:9:24\n' + - ' at d (repl:12:3)\n at c (repl:9:3)\n' + - ' at b (repl:6:3)\n at a (repl:3:3)\n' + expected: 'Thrown:\nError: Whoops!\n at repl:*:*\n' + + ' at d (repl:*:*)\n at c (repl:*:*)\n' + + ' at b (repl:*:*)\n at a (repl:*:*)\n' }, { command: 'let x y;', @@ -48,12 +52,12 @@ const tests = [ { command: '(() => { const err = Error(\'Whoops!\'); ' + 'err.foo = \'bar\'; throw err; })()', - expected: "Thrown:\nError: Whoops!\n at repl:1:22 {\n foo: 'bar'\n}\n", + expected: "Thrown:\nError: Whoops!\n at repl:*:* {\n foo: 'bar'\n}\n", }, { command: '(() => { const err = Error(\'Whoops!\'); ' + 'err.foo = \'bar\'; throw err; })()', - expected: 'Thrown:\nError: Whoops!\n at repl:1:22 {\n foo: ' + + expected: 'Thrown:\nError: Whoops!\n at repl:*:* {\n foo: ' + "\u001b[32m'bar'\u001b[39m\n}\n", useColors: true }, @@ -64,7 +68,7 @@ const tests = [ // Test anonymous IIFE. { command: '(function() { throw new Error(\'Whoops!\'); })()', - expected: 'Thrown:\nError: Whoops!\n at repl:1:21\n' + expected: 'Thrown:\nError: Whoops!\n at repl:*:*\n' } ]; From cbd586aa991b5c352d0d80c3d005de368017efa0 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Tue, 9 Jul 2019 13:36:57 +0200 Subject: [PATCH 120/162] repl: fix autocomplete while using .load This makes sure that complete functions work as expected after using the REPL's `.load` command. It also fixes the corresponding test. So far the assertion where swallowed and the test passed even though it should not have. Fixes: https://github.com/nodejs/node/issues/28546 PR-URL: https://github.com/nodejs/node/pull/28608 Reviewed-By: Jiawen Geng Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Lance Ball Reviewed-By: Anto Aravinth --- lib/repl.js | 23 ++--- test/parallel/test-repl-load-multiline.js | 1 + test/parallel/test-repl-save-load.js | 115 ++++++++++++---------- 3 files changed, 72 insertions(+), 67 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index e4a366664c10d6..ed0c9fd420fae3 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1535,10 +1535,10 @@ function defineDefaultCommands(repl) { help: 'Save all evaluated commands in this REPL session to a file', action: function(file) { try { - fs.writeFileSync(file, this.lines.join('\n') + '\n'); - this.outputStream.write('Session saved to: ' + file + '\n'); + fs.writeFileSync(file, this.lines.join('\n')); + this.outputStream.write(`Session saved to: ${file}\n`); } catch { - this.outputStream.write('Failed to save: ' + file + '\n'); + this.outputStream.write(`Failed to save: ${file}\n`); } this.displayPrompt(); } @@ -1548,23 +1548,20 @@ function defineDefaultCommands(repl) { help: 'Load JS from a file into the REPL session', action: function(file) { try { - var stats = fs.statSync(file); + const stats = fs.statSync(file); if (stats && stats.isFile()) { _turnOnEditorMode(this); - var data = fs.readFileSync(file, 'utf8'); - var lines = data.split('\n'); - for (var n = 0; n < lines.length; n++) { - if (lines[n]) - this.write(`${lines[n]}\n`); - } + const data = fs.readFileSync(file, 'utf8'); + this.write(data); _turnOffEditorMode(this); this.write('\n'); } else { - this.outputStream.write('Failed to load: ' + file + - ' is not a valid file\n'); + this.outputStream.write( + `Failed to load: ${file} is not a valid file\n` + ); } } catch { - this.outputStream.write('Failed to load: ' + file + '\n'); + this.outputStream.write(`Failed to load: ${file}\n`); } this.displayPrompt(); } diff --git a/test/parallel/test-repl-load-multiline.js b/test/parallel/test-repl-load-multiline.js index 87b866c01be165..b2bee8d6e4647e 100644 --- a/test/parallel/test-repl-load-multiline.js +++ b/test/parallel/test-repl-load-multiline.js @@ -13,6 +13,7 @@ const expected = `${command} const getLunch = () => placeOrder('tacos') .then(eat); + const placeOrder = (order) => Promise.resolve(order); const eat = (food) => ''; diff --git a/test/parallel/test-repl-save-load.js b/test/parallel/test-repl-save-load.js index d36a2b74d4373a..66b0f400a91764 100644 --- a/test/parallel/test-repl-save-load.js +++ b/test/parallel/test-repl-save-load.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const ArrayStream = require('../common/arraystream'); const assert = require('assert'); const join = require('path').join; @@ -36,6 +36,12 @@ const works = [['inner.one'], 'inner.o']; const putIn = new ArrayStream(); const testMe = repl.start('', putIn); +// Some errors might be passed to the domain. +testMe._domain.on('error', function(reason) { + const err = new Error('Test failed'); + err.reason = reason; + throw err; +}); const testFile = [ 'var top = function() {', @@ -43,89 +49,90 @@ const testFile = [ ]; const saveFileName = join(tmpdir.path, 'test.save.js'); -// input some data +// Add some data. putIn.run(testFile); -// save it to a file +// Save it to a file. putIn.run([`.save ${saveFileName}`]); -// The file should have what I wrote +// The file should have what I wrote. assert.strictEqual(fs.readFileSync(saveFileName, 'utf8'), - `${testFile.join('\n')}\n`); + testFile.join('\n')); -{ - // save .editor mode code - const cmds = [ - 'function testSave() {', - 'return "saved";', - '}' - ]; - const putIn = new ArrayStream(); - const replServer = repl.start({ terminal: true, stream: putIn }); - - putIn.run(['.editor']); - putIn.run(cmds); - replServer.write('', { ctrl: true, name: 'd' }); - - putIn.run([`.save ${saveFileName}`]); - replServer.close(); - assert.strictEqual(fs.readFileSync(saveFileName, 'utf8'), - `${cmds.join('\n')}\n\n`); -} - -// Make sure that the REPL data is "correct" -// so when I load it back I know I'm good -testMe.complete('inner.o', function(error, data) { +// Make sure that the REPL data is "correct". +testMe.complete('inner.o', common.mustCall(function(error, data) { + assert.ifError(error); assert.deepStrictEqual(data, works); -}); +})); -// clear the REPL +// Clear the REPL. putIn.run(['.clear']); -// Load the file back in +// Load the file back in. putIn.run([`.load ${saveFileName}`]); -// Make sure that the REPL data is "correct" -testMe.complete('inner.o', function(error, data) { +// Make sure that the REPL data is "correct". +testMe.complete('inner.o', common.mustCall(function(error, data) { + assert.ifError(error); assert.deepStrictEqual(data, works); -}); +})); -// clear the REPL +// Clear the REPL. putIn.run(['.clear']); let loadFile = join(tmpdir.path, 'file.does.not.exist'); -// should not break -putIn.write = function(data) { - // Make sure I get a failed to load message and not some crazy error - assert.strictEqual(data, `Failed to load:${loadFile}\n`); - // Eat me to avoid work +// Should not break. +putIn.write = common.mustCall(function(data) { + // Make sure I get a failed to load message and not some crazy error. + assert.strictEqual(data, `Failed to load: ${loadFile}\n`); + // Eat me to avoid work. putIn.write = () => {}; -}; +}); putIn.run([`.load ${loadFile}`]); -// Throw error on loading directory +// Throw error on loading directory. loadFile = tmpdir.path; -putIn.write = function(data) { - assert.strictEqual(data, `Failed to load:${loadFile} is not a valid file\n`); +putIn.write = common.mustCall(function(data) { + assert.strictEqual(data, `Failed to load: ${loadFile} is not a valid file\n`); putIn.write = () => {}; -}; +}); putIn.run([`.load ${loadFile}`]); -// clear the REPL +// Clear the REPL. putIn.run(['.clear']); // NUL (\0) is disallowed in filenames in UNIX-like operating systems and -// Windows so we can use that to test failed saves +// Windows so we can use that to test failed saves. const invalidFileName = join(tmpdir.path, '\0\0\0\0\0'); -// should not break -putIn.write = function(data) { - // Make sure I get a failed to save message and not some other error - assert.strictEqual(data, `Failed to save:${invalidFileName}\n`); - // reset to no-op +// Should not break. +putIn.write = common.mustCall(function(data) { + // Make sure I get a failed to save message and not some other error. + assert.strictEqual(data, `Failed to save: ${invalidFileName}\n`); + // Reset to no-op. putIn.write = () => {}; -}; +}); -// save it to a file +// Save it to a file. putIn.run([`.save ${invalidFileName}`]); + +{ + // Save .editor mode code. + const cmds = [ + 'function testSave() {', + 'return "saved";', + '}' + ]; + const putIn = new ArrayStream(); + const replServer = repl.start({ terminal: true, stream: putIn }); + + putIn.run(['.editor']); + putIn.run(cmds); + replServer.write('', { ctrl: true, name: 'd' }); + + putIn.run([`.save ${saveFileName}`]); + replServer.close(); + assert.strictEqual(fs.readFileSync(saveFileName, 'utf8'), + `${cmds.join('\n')}\n`); +} From d611f5ad3ed189db168820f4ff0fae3bc7afe7fa Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 5 Jul 2019 17:24:28 +0200 Subject: [PATCH 121/162] repl: fix some repl context issues This partially fixes contexts like `{} instanceof Object === false` in the REPL. This does not fix all cases, since it's something fundamental from the REPL's design that things like these can happen. Refs: https://github.com/nodejs/node/issues/27859 PR-URL: https://github.com/nodejs/node/pull/28561 Reviewed-By: Ben Noordhuis Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Anto Aravinth Reviewed-By: James M Snell --- lib/repl.js | 7 +++++-- test/parallel/test-repl-context.js | 10 ++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index ed0c9fd420fae3..2f82c2ca49fc71 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -875,8 +875,11 @@ REPLServer.prototype.createContext = function() { context = vm.createContext(); }); for (const name of Object.getOwnPropertyNames(global)) { - Object.defineProperty(context, name, - Object.getOwnPropertyDescriptor(global, name)); + // Only set properties on the context that do not exist as primordial. + if (!(name in primordials)) { + Object.defineProperty(context, name, + Object.getOwnPropertyDescriptor(global, name)); + } } context.global = context; const _console = new Console(this.outputStream); diff --git a/test/parallel/test-repl-context.js b/test/parallel/test-repl-context.js index 287d8adc295d7a..88bd47a9281a9c 100644 --- a/test/parallel/test-repl-context.js +++ b/test/parallel/test-repl-context.js @@ -16,11 +16,21 @@ const stream = new ArrayStream(); useGlobal: false }); + let output = ''; + stream.write = function(d) { + output += d; + }; + // Ensure that the repl context gets its own "console" instance. assert(r.context.console); // Ensure that the repl console instance is not the global one. assert.notStrictEqual(r.context.console, console); + assert.notStrictEqual(r.context.Object, Object); + + stream.run(['({} instanceof Object)']); + + assert.strictEqual(output, 'true\n> '); const context = r.createContext(); // Ensure that the repl context gets its own "console" instance. From 3f78a51b5e4afffb7e071db8c19021189ac3de21 Mon Sep 17 00:00:00 2001 From: himself65 Date: Thu, 6 Jun 2019 15:12:14 +0800 Subject: [PATCH 122/162] doc: add examples at assert.strictEqual PR-URL: https://github.com/nodejs/node/pull/28092 Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell Reviewed-By: Rich Trott --- doc/api/assert.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api/assert.md b/doc/api/assert.md index 39d93a3d805350..83ab1c9c566a3b 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -1065,6 +1065,14 @@ assert.strictEqual('Hello foobar', 'Hello World!'); // + 'Hello foobar' // - 'Hello World!' // ^ + +const apples = 1; +const oranges = 2; +assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); +// AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 + +assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); +// TypeError: Inputs are not identical ``` If the values are not strictly equal, an `AssertionError` is thrown with a From 4a78fe5ab09be77ebab8e360cc04c957a88569f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Arboleda?= Date: Sun, 23 Jun 2019 22:28:12 -0500 Subject: [PATCH 123/162] doc: improve os.homedir() docs PR-URL: https://github.com/nodejs/node/pull/28401 Reviewed-By: Ben Noordhuis Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat Reviewed-By: Rich Trott Reviewed-By: James M Snell --- doc/api/os.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/os.md b/doc/api/os.md index 80c97e84afb14d..acd37e6a6f5b29 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -215,6 +215,14 @@ added: v2.3.0 The `os.homedir()` method returns the home directory of the current user as a string. +**POSIX**: +Will use the `$HOME` environment variable if defined. Otherwise, it will use +the [effective UID][EUID] to look up the user's home directory. + +**Windows**: +Will use the `USERPROFILE` environment variable if defined. Otherwise it +will be the path to the profile directory of the current user. + ## os.hostname() * `dir` {number} * `-1` - to the left from cursor * `1` - to the right from cursor * `0` - the entire line +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if the stream wishes for the calling code to wait + for the `'drain'` event to be emitted before continuing to write additional + data; otherwise `true`. `writeStream.clearLine()` clears the current line of this `WriteStream` in a direction identified by `dir`. -### writeStream.clearScreenDown() +### writeStream.clearScreenDown([callback]) +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if the stream wishes for the calling code to wait + for the `'drain'` event to be emitted before continuing to write additional + data; otherwise `true`. + `writeStream.clearScreenDown()` clears this `WriteStream` from the current cursor down. @@ -128,13 +145,21 @@ added: v0.7.7 A `number` specifying the number of columns the TTY currently has. This property is updated whenever the `'resize'` event is emitted. -### writeStream.cursorTo(x, y) +### writeStream.cursorTo(x, y[, callback]) * `x` {number} * `y` {number} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if the stream wishes for the calling code to wait + for the `'drain'` event to be emitted before continuing to write additional + data; otherwise `true`. `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified position. @@ -220,13 +245,21 @@ added: v0.5.8 A `boolean` that is always `true`. -### writeStream.moveCursor(dx, dy) +### writeStream.moveCursor(dx, dy[, callback]) * `dx` {number} * `dy` {number} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if the stream wishes for the calling code to wait + for the `'drain'` event to be emitted before continuing to write additional + data; otherwise `true`. `writeStream.moveCursor()` moves this `WriteStream`'s cursor *relative* to its current position. diff --git a/lib/tty.js b/lib/tty.js index 9e7d7dbb31885a..cc22a3b499feca 100644 --- a/lib/tty.js +++ b/lib/tty.js @@ -137,21 +137,21 @@ WriteStream.prototype._refreshSize = function() { }; // Backwards-compat -WriteStream.prototype.cursorTo = function(x, y) { +WriteStream.prototype.cursorTo = function(x, y, callback) { if (readline === undefined) readline = require('readline'); - readline.cursorTo(this, x, y); + return readline.cursorTo(this, x, y, callback); }; -WriteStream.prototype.moveCursor = function(dx, dy) { +WriteStream.prototype.moveCursor = function(dx, dy, callback) { if (readline === undefined) readline = require('readline'); - readline.moveCursor(this, dx, dy); + return readline.moveCursor(this, dx, dy, callback); }; -WriteStream.prototype.clearLine = function(dir) { +WriteStream.prototype.clearLine = function(dir, callback) { if (readline === undefined) readline = require('readline'); - readline.clearLine(this, dir); + return readline.clearLine(this, dir, callback); }; -WriteStream.prototype.clearScreenDown = function() { +WriteStream.prototype.clearScreenDown = function(callback) { if (readline === undefined) readline = require('readline'); - readline.clearScreenDown(this); + return readline.clearScreenDown(this, callback); }; WriteStream.prototype.getWindowSize = function() { return [this.columns, this.rows]; diff --git a/test/parallel/test-tty-backwards-api.js b/test/parallel/test-tty-backwards-api.js index 7b6dc3c09257bf..b4005bad61a3b1 100644 --- a/test/parallel/test-tty-backwards-api.js +++ b/test/parallel/test-tty-backwards-api.js @@ -1,6 +1,8 @@ // Flags: --expose-internals 'use strict'; const common = require('../common'); +const assert = require('assert'); +const readline = require('readline'); const noop = () => {}; const { internalBinding } = require('internal/test/binding'); @@ -13,15 +15,32 @@ TTY.prototype = { const { WriteStream } = require('tty'); -const methods = [ +[ 'cursorTo', 'moveCursor', 'clearLine', 'clearScreenDown' -]; +].forEach((method) => { + readline[method] = common.mustCall(function() { + const lastArg = arguments[arguments.length - 1]; -methods.forEach((method) => { - require('readline')[method] = common.mustCall(); - const writeStream = new WriteStream(1); - writeStream[method](1, 2); + if (typeof lastArg === 'function') { + process.nextTick(lastArg); + } + + return true; + }, 2); }); + +const writeStream = new WriteStream(1); + +// Verify that the corresponding readline methods are called, that the return +// values are propagated, and any callbacks are invoked. +assert.strictEqual(writeStream.cursorTo(1, 2), true); +assert.strictEqual(writeStream.cursorTo(1, 2, common.mustCall()), true); +assert.strictEqual(writeStream.moveCursor(1, 2), true); +assert.strictEqual(writeStream.moveCursor(1, 2, common.mustCall()), true); +assert.strictEqual(writeStream.clearLine(1), true); +assert.strictEqual(writeStream.clearLine(1, common.mustCall()), true); +assert.strictEqual(writeStream.clearScreenDown(), true); +assert.strictEqual(writeStream.clearScreenDown(common.mustCall()), true); From ff432c8ef68b064940a809b70ad32238f6c29bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Tue, 16 Jul 2019 19:26:53 +0100 Subject: [PATCH 129/162] test,win: cleanup exec-timeout processes When CMD is used to launch a process and CMD is killed too quickly, the process can stay behind running in suspended state, never completing. This only happens in Windows Server 2008R2. Refs: https://github.com/nodejs/build/issues/1829 PR-URL: https://github.com/nodejs/node/pull/28723 Reviewed-By: Rich Trott Reviewed-By: Beth Griggs Reviewed-By: Colin Ihrig --- test/parallel/test-child-process-exec-timeout.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/parallel/test-child-process-exec-timeout.js b/test/parallel/test-child-process-exec-timeout.js index e08aff908522f2..343050e063c680 100644 --- a/test/parallel/test-child-process-exec-timeout.js +++ b/test/parallel/test-child-process-exec-timeout.js @@ -56,3 +56,19 @@ cp.exec(cmd, { timeout: 2 ** 30 }, common.mustCall((err, stdout, stderr) => { assert.strictEqual(stdout.trim(), 'child stdout'); assert.strictEqual(stderr.trim(), 'child stderr'); })); + +// Workaround for Windows Server 2008R2 +// When CMD is used to launch a process and CMD is killed too quickly, the +// process can stay behind running in suspended state, never completing. +if (common.isWindows) { + process.once('beforeExit', () => { + const basename = __filename.replace(/.*[/\\]/g, ''); + cp.execFileSync(`${process.env.SystemRoot}\\System32\\wbem\\WMIC.exe`, [ + 'process', + 'where', + `commandline like '%${basename}%child'`, + 'delete', + '/nointeractive' + ]); + }); +} From b379c0e8b6b1f67fb7985d3c51f6200e2e3f2290 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Wed, 16 Jan 2019 03:11:10 +0200 Subject: [PATCH 130/162] esm: implement "pkg-exports" proposal Refs: https://github.com/jkrems/proposal-pkg-exports/issues/36 PR-URL: https://github.com/nodejs/node/pull/28568 Reviewed-By: Anna Henningsen --- doc/api/cli.md | 8 ++ doc/api/esm.md | 55 +++++++++++++ src/env.h | 2 + src/module_wrap.cc | 81 +++++++++++++++++-- src/node_options.cc | 4 + src/node_options.h | 1 + test/es-module/test-esm-exports.mjs | 28 +++++++ .../node_modules/pkgexports-number/hidden.js | 1 + .../pkgexports-number/package.json | 3 + test/fixtures/node_modules/pkgexports/asdf.js | 1 + .../node_modules/pkgexports/package.json | 7 ++ test/fixtures/pkgexports-missing.mjs | 11 +++ test/fixtures/pkgexports.mjs | 2 + 13 files changed, 196 insertions(+), 8 deletions(-) create mode 100644 test/es-module/test-esm-exports.mjs create mode 100644 test/fixtures/node_modules/pkgexports-number/hidden.js create mode 100644 test/fixtures/node_modules/pkgexports-number/package.json create mode 100644 test/fixtures/node_modules/pkgexports/asdf.js create mode 100644 test/fixtures/node_modules/pkgexports/package.json create mode 100644 test/fixtures/pkgexports-missing.mjs create mode 100644 test/fixtures/pkgexports.mjs diff --git a/doc/api/cli.md b/doc/api/cli.md index 685f2198d57aa0..544a3acb16ce7d 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -148,6 +148,13 @@ the ability to import a directory that has an index file. Please see [customizing esm specifier resolution][] for example usage. +### `--experimental-exports` + + +Enable experimental resolution using the `exports` field in `package.json`. + ### `--experimental-modules` - `--enable-fips` - `--es-module-specifier-resolution` +- `--experimental-exports` - `--experimental-modules` - `--experimental-policy` - `--experimental-repl-await` diff --git a/doc/api/esm.md b/doc/api/esm.md index 74d818946e007c..14035cbf5ca243 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -216,6 +216,61 @@ a package would be accessible like `require('pkg')` and `import module entry point and legacy users could be informed of the CommonJS entry point path, e.g. `require('pkg/commonjs')`. +## Package Exports + +By default, all subpaths from a package can be imported (`import 'pkg/x.js'`). +Custom subpath aliasing and encapsulation can be provided through the +`"exports"` field. + + +```js +// ./node_modules/es-module-package/package.json +{ + "exports": { + "./submodule": "./src/submodule.js" + } +} +``` + +```js +import submodule from 'es-module-package/submodule'; +// Loads ./node_modules/es-module-package/src/submodule.js +``` + +In addition to defining an alias, subpaths not defined by `"exports"` will +throw when an attempt is made to import them: + +```js +import submodule from 'es-module-package/private-module.js'; +// Throws - Package exports error +``` + +> Note: this is not a strong encapsulation as any private modules can still be +> loaded by absolute paths. + +Folders can also be mapped with package exports as well: + + +```js +// ./node_modules/es-module-package/package.json +{ + "exports": { + "./features/": "./src/features/" + } +} +``` + +```js +import feature from 'es-module-package/features/x.js'; +// Loads ./node_modules/es-module-package/src/features/x.js +``` + +If a package has no exports, setting `"exports": false` can be used instead of +`"exports": {}` to indicate the package does not intend for submodules to be +exposed. +This is just a convention that works because `false`, just like `{}`, has no +iterable own properties. + ## import Specifiers ### Terminology diff --git a/src/env.h b/src/env.h index 29b9a036cc11e0..1356f0bbbc498b 100644 --- a/src/env.h +++ b/src/env.h @@ -99,6 +99,8 @@ struct PackageConfig { const HasMain has_main; const std::string main; const PackageType type; + + v8::Global exports; }; } // namespace loader diff --git a/src/module_wrap.cc b/src/module_wrap.cc index e104afb736c28d..f1c819874a3839 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -558,7 +558,7 @@ Maybe GetPackageConfig(Environment* env, if (source.IsNothing()) { auto entry = env->package_json_cache.emplace(path, PackageConfig { Exists::No, IsValid::Yes, HasMain::No, "", - PackageType::None }); + PackageType::None, Global() }); return Just(&entry.first->second); } @@ -578,7 +578,7 @@ Maybe GetPackageConfig(Environment* env, !pkg_json_v->ToObject(context).ToLocal(&pkg_json)) { env->package_json_cache.emplace(path, PackageConfig { Exists::Yes, IsValid::No, HasMain::No, "", - PackageType::None }); + PackageType::None, Global() }); std::string msg = "Invalid JSON in '" + path + "' imported from " + base.ToFilePath(); node::THROW_ERR_INVALID_PACKAGE_CONFIG(env, msg.c_str()); @@ -609,22 +609,22 @@ Maybe GetPackageConfig(Environment* env, } Local exports_v; - if (pkg_json->Get(env->context(), + if (env->options()->experimental_exports && + pkg_json->Get(env->context(), env->exports_string()).ToLocal(&exports_v) && - (exports_v->IsObject() || exports_v->IsString() || - exports_v->IsBoolean())) { + !exports_v->IsNullOrUndefined()) { Global exports; exports.Reset(env->isolate(), exports_v); auto entry = env->package_json_cache.emplace(path, PackageConfig { Exists::Yes, IsValid::Yes, has_main, main_std, - pkg_type }); + pkg_type, std::move(exports) }); return Just(&entry.first->second); } auto entry = env->package_json_cache.emplace(path, PackageConfig { Exists::Yes, IsValid::Yes, has_main, main_std, - pkg_type }); + pkg_type, Global() }); return Just(&entry.first->second); } @@ -800,6 +800,66 @@ Maybe PackageMainResolve(Environment* env, return Nothing(); } +Maybe PackageExportsResolve(Environment* env, + const URL& pjson_url, + const std::string& pkg_subpath, + const PackageConfig& pcfg, + const URL& base) { + CHECK(env->options()->experimental_exports); + Isolate* isolate = env->isolate(); + Local context = env->context(); + Local exports = pcfg.exports.Get(isolate); + if (exports->IsObject()) { + Local exports_obj = exports.As(); + Local subpath = String::NewFromUtf8(isolate, + pkg_subpath.c_str(), v8::NewStringType::kNormal).ToLocalChecked(); + + auto target = exports_obj->Get(context, subpath).ToLocalChecked(); + if (target->IsString()) { + Utf8Value target_utf8(isolate, target.As()); + std::string target(*target_utf8, target_utf8.length()); + if (target.substr(0, 2) == "./") { + URL target_url(target, pjson_url); + return FinalizeResolution(env, target_url, base); + } + } + + Local best_match; + std::string best_match_str = ""; + Local keys = + exports_obj->GetOwnPropertyNames(context).ToLocalChecked(); + for (uint32_t i = 0; i < keys->Length(); ++i) { + Local key = keys->Get(context, i).ToLocalChecked().As(); + Utf8Value key_utf8(isolate, key); + std::string key_str(*key_utf8, key_utf8.length()); + if (key_str.back() != '/') continue; + if (pkg_subpath.substr(0, key_str.length()) == key_str && + key_str.length() > best_match_str.length()) { + best_match = key; + best_match_str = key_str; + } + } + + if (best_match_str.length() > 0) { + auto target = exports_obj->Get(context, best_match).ToLocalChecked(); + if (target->IsString()) { + Utf8Value target_utf8(isolate, target.As()); + std::string target(*target_utf8, target_utf8.length()); + if (target.back() == '/' && target.substr(0, 2) == "./") { + std::string subpath = pkg_subpath.substr(best_match_str.length()); + URL target_url(target + subpath, pjson_url); + return FinalizeResolution(env, target_url, base); + } + } + } + } + std::string msg = "Package exports for '" + + URL(".", pjson_url).ToFilePath() + "' do not define a '" + pkg_subpath + + "' subpath, imported from " + base.ToFilePath(); + node::THROW_ERR_MODULE_NOT_FOUND(env, msg.c_str()); + return Nothing(); +} + Maybe PackageResolve(Environment* env, const std::string& specifier, const URL& base) { @@ -847,7 +907,12 @@ Maybe PackageResolve(Environment* env, if (!pkg_subpath.length()) { return PackageMainResolve(env, pjson_url, *pcfg.FromJust(), base); } else { - return FinalizeResolution(env, URL(pkg_subpath, pjson_url), base); + if (!pcfg.FromJust()->exports.IsEmpty()) { + return PackageExportsResolve(env, pjson_url, pkg_subpath, + *pcfg.FromJust(), base); + } else { + return FinalizeResolution(env, URL(pkg_subpath, pjson_url), base); + } } CHECK(false); // Cross-platform root check. diff --git a/src/node_options.cc b/src/node_options.cc index b6ea82158c07ae..829154c3bf5c57 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -304,6 +304,10 @@ DebugOptionsParser::DebugOptionsParser() { } EnvironmentOptionsParser::EnvironmentOptionsParser() { + AddOption("--experimental-exports", + "experimental support for exports in package.json", + &EnvironmentOptions::experimental_exports, + kAllowedInEnvironment); AddOption("--experimental-modules", "experimental ES Module support and caching modules", &EnvironmentOptions::experimental_modules, diff --git a/src/node_options.h b/src/node_options.h index 280de40c0a7216..c55aaf17a0758c 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -100,6 +100,7 @@ class DebugOptions : public Options { class EnvironmentOptions : public Options { public: bool abort_on_uncaught_exception = false; + bool experimental_exports = false; bool experimental_modules = false; std::string es_module_specifier_resolution; bool experimental_wasm_modules = false; diff --git a/test/es-module/test-esm-exports.mjs b/test/es-module/test-esm-exports.mjs new file mode 100644 index 00000000000000..88115026654726 --- /dev/null +++ b/test/es-module/test-esm-exports.mjs @@ -0,0 +1,28 @@ +// Flags: --experimental-modules --experimental-exports + +import { mustCall } from '../common/index.mjs'; +import { ok, strictEqual } from 'assert'; + +import { asdf, asdf2 } from '../fixtures/pkgexports.mjs'; +import { + loadMissing, + loadFromNumber, + loadDot, +} from '../fixtures/pkgexports-missing.mjs'; + +strictEqual(asdf, 'asdf'); +strictEqual(asdf2, 'asdf'); + +loadMissing().catch(mustCall((err) => { + ok(err.message.toString().startsWith('Package exports')); + ok(err.message.toString().indexOf('do not define a \'./missing\' subpath')); +})); + +loadFromNumber().catch(mustCall((err) => { + ok(err.message.toString().startsWith('Package exports')); + ok(err.message.toString().indexOf('do not define a \'./missing\' subpath')); +})); + +loadDot().catch(mustCall((err) => { + ok(err.message.toString().startsWith('Cannot find main entry point')); +})); diff --git a/test/fixtures/node_modules/pkgexports-number/hidden.js b/test/fixtures/node_modules/pkgexports-number/hidden.js new file mode 100644 index 00000000000000..c04e6ee618e15c --- /dev/null +++ b/test/fixtures/node_modules/pkgexports-number/hidden.js @@ -0,0 +1 @@ +module.exports = 'not-part-of-api'; diff --git a/test/fixtures/node_modules/pkgexports-number/package.json b/test/fixtures/node_modules/pkgexports-number/package.json new file mode 100644 index 00000000000000..315f39a66e32a6 --- /dev/null +++ b/test/fixtures/node_modules/pkgexports-number/package.json @@ -0,0 +1,3 @@ +{ + "exports": 42 +} diff --git a/test/fixtures/node_modules/pkgexports/asdf.js b/test/fixtures/node_modules/pkgexports/asdf.js new file mode 100644 index 00000000000000..683f2d8ba623a7 --- /dev/null +++ b/test/fixtures/node_modules/pkgexports/asdf.js @@ -0,0 +1 @@ +module.exports = 'asdf'; diff --git a/test/fixtures/node_modules/pkgexports/package.json b/test/fixtures/node_modules/pkgexports/package.json new file mode 100644 index 00000000000000..51c596ed8673ab --- /dev/null +++ b/test/fixtures/node_modules/pkgexports/package.json @@ -0,0 +1,7 @@ +{ + "exports": { + ".": "./asdf.js", + "./asdf": "./asdf.js", + "./sub/": "./" + } +} diff --git a/test/fixtures/pkgexports-missing.mjs b/test/fixtures/pkgexports-missing.mjs new file mode 100644 index 00000000000000..7d1d5b2e821629 --- /dev/null +++ b/test/fixtures/pkgexports-missing.mjs @@ -0,0 +1,11 @@ +export function loadMissing() { + return import('pkgexports/missing'); +} + +export function loadFromNumber() { + return import('pkgexports-number/hidden.js'); +} + +export function loadDot() { + return import('pkgexports'); +} diff --git a/test/fixtures/pkgexports.mjs b/test/fixtures/pkgexports.mjs new file mode 100644 index 00000000000000..4d82ba0560ef11 --- /dev/null +++ b/test/fixtures/pkgexports.mjs @@ -0,0 +1,2 @@ +export { default as asdf } from 'pkgexports/asdf'; +export { default as asdf2 } from 'pkgexports/sub/asdf.js'; From 1ce2b5e828bf8b68c4c55387eab5a14f8aac7e10 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 3 Jul 2019 10:23:19 -0700 Subject: [PATCH 131/162] deps: upgrade npm to 6.10.0 PR-URL: https://github.com/nodejs/node/pull/28525 Reviewed-By: Rich Trott Reviewed-By: Roman Reiss Reviewed-By: Trivikram Kamat Reviewed-By: Yongsheng Zhang Reviewed-By: Jiawen Geng Reviewed-By: Ruben Bridgewater Reviewed-By: Daijiro Wachi --- deps/npm/.licensee.json | 9 +- deps/npm/.travis.yml | 14 +- deps/npm/AUTHORS | 11 + deps/npm/CHANGELOG.md | 187 +- deps/npm/bin/npm | 3 + deps/npm/doc/cli/npm-audit.md | 17 +- deps/npm/doc/files/package.json.md | 3 +- deps/npm/html/doc/README.html | 2 +- deps/npm/html/doc/cli/npm-access.html | 2 +- deps/npm/html/doc/cli/npm-adduser.html | 2 +- deps/npm/html/doc/cli/npm-audit.html | 16 +- deps/npm/html/doc/cli/npm-bin.html | 2 +- deps/npm/html/doc/cli/npm-bugs.html | 2 +- deps/npm/html/doc/cli/npm-build.html | 2 +- deps/npm/html/doc/cli/npm-bundle.html | 2 +- deps/npm/html/doc/cli/npm-cache.html | 2 +- deps/npm/html/doc/cli/npm-ci.html | 2 +- deps/npm/html/doc/cli/npm-completion.html | 2 +- deps/npm/html/doc/cli/npm-config.html | 2 +- deps/npm/html/doc/cli/npm-dedupe.html | 2 +- deps/npm/html/doc/cli/npm-deprecate.html | 2 +- deps/npm/html/doc/cli/npm-dist-tag.html | 2 +- deps/npm/html/doc/cli/npm-docs.html | 2 +- deps/npm/html/doc/cli/npm-doctor.html | 2 +- deps/npm/html/doc/cli/npm-edit.html | 2 +- deps/npm/html/doc/cli/npm-explore.html | 2 +- deps/npm/html/doc/cli/npm-help-search.html | 2 +- deps/npm/html/doc/cli/npm-help.html | 2 +- deps/npm/html/doc/cli/npm-hook.html | 2 +- deps/npm/html/doc/cli/npm-init.html | 2 +- .../npm/html/doc/cli/npm-install-ci-test.html | 2 +- deps/npm/html/doc/cli/npm-install-test.html | 2 +- deps/npm/html/doc/cli/npm-install.html | 2 +- deps/npm/html/doc/cli/npm-link.html | 2 +- deps/npm/html/doc/cli/npm-logout.html | 2 +- deps/npm/html/doc/cli/npm-ls.html | 4 +- deps/npm/html/doc/cli/npm-org.html | 2 +- deps/npm/html/doc/cli/npm-outdated.html | 2 +- deps/npm/html/doc/cli/npm-owner.html | 2 +- deps/npm/html/doc/cli/npm-pack.html | 2 +- deps/npm/html/doc/cli/npm-ping.html | 2 +- deps/npm/html/doc/cli/npm-prefix.html | 2 +- deps/npm/html/doc/cli/npm-profile.html | 2 +- deps/npm/html/doc/cli/npm-prune.html | 2 +- deps/npm/html/doc/cli/npm-publish.html | 2 +- deps/npm/html/doc/cli/npm-rebuild.html | 2 +- deps/npm/html/doc/cli/npm-repo.html | 2 +- deps/npm/html/doc/cli/npm-restart.html | 2 +- deps/npm/html/doc/cli/npm-root.html | 2 +- deps/npm/html/doc/cli/npm-run-script.html | 2 +- deps/npm/html/doc/cli/npm-search.html | 2 +- deps/npm/html/doc/cli/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/cli/npm-star.html | 2 +- deps/npm/html/doc/cli/npm-stars.html | 2 +- deps/npm/html/doc/cli/npm-start.html | 2 +- deps/npm/html/doc/cli/npm-stop.html | 2 +- deps/npm/html/doc/cli/npm-team.html | 2 +- deps/npm/html/doc/cli/npm-test.html | 2 +- deps/npm/html/doc/cli/npm-token.html | 2 +- deps/npm/html/doc/cli/npm-uninstall.html | 2 +- deps/npm/html/doc/cli/npm-unpublish.html | 2 +- deps/npm/html/doc/cli/npm-update.html | 2 +- deps/npm/html/doc/cli/npm-version.html | 2 +- deps/npm/html/doc/cli/npm-view.html | 2 +- deps/npm/html/doc/cli/npm-whoami.html | 2 +- deps/npm/html/doc/cli/npm.html | 6 +- deps/npm/html/doc/files/npm-folders.html | 2 +- deps/npm/html/doc/files/npm-global.html | 2 +- deps/npm/html/doc/files/npm-json.html | 5 +- .../npm/html/doc/files/npm-package-locks.html | 2 +- .../html/doc/files/npm-shrinkwrap.json.html | 2 +- deps/npm/html/doc/files/npmrc.html | 2 +- .../npm/html/doc/files/package-lock.json.html | 2 +- deps/npm/html/doc/files/package.json.html | 5 +- deps/npm/html/doc/index.html | 2 +- deps/npm/html/doc/misc/npm-coding-style.html | 2 +- deps/npm/html/doc/misc/npm-config.html | 2 +- deps/npm/html/doc/misc/npm-developers.html | 2 +- deps/npm/html/doc/misc/npm-disputes.html | 12 +- deps/npm/html/doc/misc/npm-index.html | 2 +- deps/npm/html/doc/misc/npm-orgs.html | 2 +- deps/npm/html/doc/misc/npm-registry.html | 2 +- deps/npm/html/doc/misc/npm-scope.html | 2 +- deps/npm/html/doc/misc/npm-scripts.html | 2 +- deps/npm/html/doc/misc/removing-npm.html | 2 +- deps/npm/html/doc/misc/semver.html | 2 +- deps/npm/lib/adduser.js | 21 +- deps/npm/lib/audit.js | 4 +- deps/npm/lib/outdated.js | 11 +- deps/npm/lib/token.js | 23 +- deps/npm/lib/unbuild.js | 4 +- deps/npm/lib/unpublish.js | 2 +- deps/npm/lib/utils/unsupported.js | 2 +- deps/npm/lib/version.js | 2 +- deps/npm/lib/view.js | 1 + deps/npm/man/man1/npm-README.1 | 2 +- deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-audit.1 | 22 +- deps/npm/man/man1/npm-bin.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-build.1 | 2 +- deps/npm/man/man1/npm-bundle.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-ci.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 2 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 2 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-doctor.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-hook.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-ci-test.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 2 +- deps/npm/man/man1/npm-install.1 | 2 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-org.1 | 2 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-profile.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-token.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man5/npm-folders.5 | 2 +- deps/npm/man/man5/npm-global.5 | 2 +- deps/npm/man/man5/npm-json.5 | 5 +- deps/npm/man/man5/npm-package-locks.5 | 2 +- deps/npm/man/man5/npm-shrinkwrap.json.5 | 2 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package-lock.json.5 | 2 +- deps/npm/man/man5/package.json.5 | 5 +- deps/npm/man/man7/npm-coding-style.7 | 2 +- deps/npm/man/man7/npm-config.7 | 2 +- deps/npm/man/man7/npm-developers.7 | 2 +- deps/npm/man/man7/npm-disputes.7 | 2 +- deps/npm/man/man7/npm-index.7 | 2 +- deps/npm/man/man7/npm-orgs.7 | 2 +- deps/npm/man/man7/npm-registry.7 | 2 +- deps/npm/man/man7/npm-scope.7 | 2 +- deps/npm/man/man7/npm-scripts.7 | 2 +- deps/npm/man/man7/removing-npm.7 | 2 +- deps/npm/man/man7/semver.7 | 2 +- .../bluebird/js/browser/bluebird.core.js | 31 +- .../bluebird/js/browser/bluebird.core.min.js | 6 +- .../bluebird/js/browser/bluebird.js | 41 +- .../bluebird/js/browser/bluebird.min.js | 8 +- .../bluebird/js/release/debuggability.js | 4 +- .../bluebird/js/release/promise.js | 25 +- .../bluebird/js/release/schedule.js | 3 +- .../node_modules/bluebird/js/release/util.js | 7 +- deps/npm/node_modules/bluebird/package.json | 30 +- deps/npm/node_modules/cacache/CHANGELOG.md | 15 +- deps/npm/node_modules/cacache/README.es.md | 2 +- deps/npm/node_modules/cacache/README.md | 2 +- .../node_modules/cacache/lib/content/path.js | 2 +- .../node_modules/cacache/lib/content/read.js | 12 +- .../node_modules/cacache/lib/content/write.js | 8 +- .../node_modules/cacache/lib/entry-index.js | 8 +- .../cacache/lib/util/fix-owner.js | 4 +- deps/npm/node_modules/cacache/lib/verify.js | 8 +- deps/npm/node_modules/cacache/locales/en.json | 5 +- .../cacache/node_modules/chownr/README.md | 3 - .../cacache/node_modules/chownr/chownr.js | 88 - .../cacache/node_modules/chownr/package.json | 59 - .../node_modules/{chownr => glob}/LICENSE | 6 + .../cacache/node_modules/glob/README.md | 373 + .../cacache/node_modules/glob/changelog.md | 67 + .../cacache/node_modules/glob/common.js | 240 + .../cacache/node_modules/glob/glob.js | 790 ++ .../cacache/node_modules/glob/package.json | 76 + .../cacache/node_modules/glob/sync.js | 486 ++ .../node_modules/unique-filename/LICENSE | 5 - .../node_modules/unique-filename/README.md | 33 - .../coverage/__root__/index.html | 73 - .../coverage/__root__/index.js.html | 69 - .../unique-filename/coverage/base.css | 182 - .../unique-filename/coverage/index.html | 73 - .../unique-filename/coverage/prettify.css | 1 - .../unique-filename/coverage/prettify.js | 1 - .../coverage/sort-arrow-sprite.png | Bin 209 -> 0 bytes .../unique-filename/coverage/sorter.js | 156 - .../node_modules/unique-filename/index.js | 8 - .../node_modules/unique-filename/package.json | 56 - .../unique-filename/test/index.js | 23 - deps/npm/node_modules/cacache/package.json | 51 +- deps/npm/node_modules/cacache/put.js | 5 +- .../node_modules/copy-concurrently/README.md~ | 127 + deps/npm/node_modules/debug/.eslintrc | 14 + .../define-properties/.editorconfig | 12 + .../node_modules/define-properties/.eslintrc | 12 + .../node_modules/define-properties/.jscs.json | 174 + .../define-properties/.travis.yml | 233 + .../define-properties/CHANGELOG.md | 44 + .../node_modules/define-properties/LICENSE | 21 + .../node_modules/define-properties/README.md | 85 + .../node_modules/define-properties/index.js | 58 + .../define-properties/package.json | 69 + .../define-properties/test/index.js | 125 + .../node_modules/es-abstract/.editorconfig | 12 + deps/npm/node_modules/es-abstract/.eslintrc | 23 + deps/npm/node_modules/es-abstract/.jscs.json | 173 + deps/npm/node_modules/es-abstract/.nycrc | 14 + deps/npm/node_modules/es-abstract/.travis.yml | 232 + .../npm/node_modules/es-abstract/CHANGELOG.md | 175 + .../node_modules/es-abstract/GetIntrinsic.js | 177 + deps/npm/node_modules/es-abstract/LICENSE | 21 + deps/npm/node_modules/es-abstract/Makefile | 61 + deps/npm/node_modules/es-abstract/README.md | 44 + deps/npm/node_modules/es-abstract/es2015.js | 693 ++ deps/npm/node_modules/es-abstract/es2016.js | 16 + deps/npm/node_modules/es-abstract/es2017.js | 25 + deps/npm/node_modules/es-abstract/es5.js | 242 + deps/npm/node_modules/es-abstract/es6.js | 3 + deps/npm/node_modules/es-abstract/es7.js | 3 + .../es-abstract/helpers/assign.js | 17 + .../es-abstract/helpers/isFinite.js | 3 + .../node_modules/es-abstract/helpers/isNaN.js | 3 + .../es-abstract/helpers/isPrimitive.js | 3 + .../node_modules/es-abstract/helpers/mod.js | 4 + .../node_modules/es-abstract/helpers/sign.js | 3 + deps/npm/node_modules/es-abstract/index.js | 22 + .../es-abstract/operations/2015.js | 78 + .../es-abstract/operations/2016.js | 80 + .../es-abstract/operations/2017.js | 82 + .../es-abstract/operations/es5.js | 10 + .../npm/node_modules/es-abstract/package.json | 102 + .../node_modules/es-abstract/test/.eslintrc | 11 + .../es-abstract/test/GetIntrinsic.js | 34 + .../node_modules/es-abstract/test/diffOps.js | 24 + .../node_modules/es-abstract/test/es2015.js | 11 + .../node_modules/es-abstract/test/es2016.js | 11 + .../node_modules/es-abstract/test/es2017.js | 11 + deps/npm/node_modules/es-abstract/test/es5.js | 415 ++ deps/npm/node_modules/es-abstract/test/es6.js | 18 + deps/npm/node_modules/es-abstract/test/es7.js | 18 + .../es-abstract/test/helpers/values.js | 53 + .../node_modules/es-abstract/test/index.js | 28 + .../node_modules/es-abstract/test/tests.js | 1610 +++++ .../es-to-primitive/.editorconfig | 20 + .../node_modules/es-to-primitive/.eslintrc | 14 + .../node_modules/es-to-primitive/.jscs.json | 175 + .../node_modules/es-to-primitive/.travis.yml | 243 + .../node_modules/es-to-primitive/CHANGELOG.md | 38 + deps/npm/node_modules/es-to-primitive/LICENSE | 21 + .../npm/node_modules/es-to-primitive/Makefile | 61 + .../node_modules/es-to-primitive/README.md | 51 + .../node_modules/es-to-primitive/es2015.js | 75 + deps/npm/node_modules/es-to-primitive/es5.js | 45 + deps/npm/node_modules/es-to-primitive/es6.js | 3 + .../es-to-primitive/helpers/isPrimitive.js | 3 + .../npm/node_modules/es-to-primitive/index.js | 17 + .../node_modules/es-to-primitive/package.json | 86 + .../es-to-primitive/test/.eslintrc | 9 + .../es-to-primitive/test/es2015.js | 151 + .../node_modules/es-to-primitive/test/es5.js | 94 + .../node_modules/es-to-primitive/test/es6.js | 151 + .../es-to-primitive/test/index.js | 20 + deps/npm/node_modules/extend/.eslintrc | 17 + .../find-npm-prefix/test/find-prefix.js~ | 79 + deps/npm/node_modules/fs-minipass/index.js | 2 +- .../npm/node_modules/fs-minipass/package.json | 21 +- deps/npm/node_modules/fstream/.npmignore | 5 - deps/npm/node_modules/fstream/lib/writer.js | 2 +- deps/npm/node_modules/fstream/package.json | 12 +- .../node_modules/function-bind/.editorconfig | 20 + deps/npm/node_modules/function-bind/.eslintrc | 15 + .../npm/node_modules/function-bind/.jscs.json | 175 + .../npm/node_modules/function-bind/.npmignore | 22 + .../node_modules/function-bind/.travis.yml | 168 + deps/npm/node_modules/function-bind/LICENSE | 19 + deps/npm/node_modules/function-bind/README.md | 48 + .../function-bind/implementation.js | 52 + deps/npm/node_modules/function-bind/index.js | 5 + .../node_modules/function-bind/package.json | 67 + .../node_modules/function-bind/test/.eslintrc | 9 + .../node_modules/function-bind/test/index.js | 252 + .../npm/node_modules/graceful-fs/package.json | 34 +- .../npm/node_modules/graceful-fs/polyfills.js | 25 +- deps/npm/node_modules/has-symbols/.eslintrc | 10 + deps/npm/node_modules/has-symbols/.npmignore | 37 + deps/npm/node_modules/has-symbols/.travis.yml | 113 + .../npm/node_modules/has-symbols/CHANGELOG.md | 3 + deps/npm/node_modules/has-symbols/LICENSE | 21 + deps/npm/node_modules/has-symbols/README.md | 45 + deps/npm/node_modules/has-symbols/index.js | 13 + .../npm/node_modules/has-symbols/package.json | 82 + deps/npm/node_modules/has-symbols/shams.js | 42 + .../node_modules/has-symbols/test/index.js | 22 + .../has-symbols/test/shams/core-js.js | 28 + .../test/shams/get-own-property-symbols.js | 28 + .../node_modules/has-symbols/test/tests.js | 54 + deps/npm/node_modules/has/LICENSE-MIT | 22 + deps/npm/node_modules/has/README.md | 18 + deps/npm/node_modules/has/package.json | 52 + deps/npm/node_modules/has/src/index.js | 5 + deps/npm/node_modules/has/test/index.js | 10 + .../node_modules/is-callable/.editorconfig | 20 + deps/npm/node_modules/is-callable/.eslintrc | 11 + .../node_modules/is-callable/.istanbul.yml | 47 + deps/npm/node_modules/is-callable/.jscs.json | 175 + deps/npm/node_modules/is-callable/.travis.yml | 225 + .../npm/node_modules/is-callable/CHANGELOG.md | 56 + deps/npm/node_modules/is-callable/LICENSE | 21 + deps/npm/node_modules/is-callable/Makefile | 61 + deps/npm/node_modules/is-callable/README.md | 59 + deps/npm/node_modules/is-callable/index.js | 37 + .../npm/node_modules/is-callable/package.json | 98 + deps/npm/node_modules/is-callable/test.js | 158 + .../npm/node_modules/is-date-object/.eslintrc | 9 + .../node_modules/is-date-object/.jscs.json | 121 + .../node_modules/is-date-object/.npmignore | 28 + .../node_modules/is-date-object/.travis.yml | 58 + .../node_modules/is-date-object/CHANGELOG.md | 10 + deps/npm/node_modules/is-date-object/LICENSE | 21 + deps/npm/node_modules/is-date-object/Makefile | 61 + .../npm/node_modules/is-date-object/README.md | 53 + deps/npm/node_modules/is-date-object/index.js | 20 + .../node_modules/is-date-object/package.json | 66 + deps/npm/node_modules/is-date-object/test.js | 33 + deps/npm/node_modules/is-regex/.eslintrc | 9 + deps/npm/node_modules/is-regex/.jscs.json | 175 + deps/npm/node_modules/is-regex/.npmignore | 15 + deps/npm/node_modules/is-regex/.travis.yml | 165 + deps/npm/node_modules/is-regex/CHANGELOG.md | 27 + deps/npm/node_modules/is-regex/LICENSE | 20 + deps/npm/node_modules/is-regex/Makefile | 61 + deps/npm/node_modules/is-regex/README.md | 53 + deps/npm/node_modules/is-regex/index.js | 39 + deps/npm/node_modules/is-regex/package.json | 77 + deps/npm/node_modules/is-regex/test.js | 58 + deps/npm/node_modules/is-symbol/.editorconfig | 12 + deps/npm/node_modules/is-symbol/.eslintrc | 9 + deps/npm/node_modules/is-symbol/.jscs.json | 175 + deps/npm/node_modules/is-symbol/.nvmrc | 1 + deps/npm/node_modules/is-symbol/.travis.yml | 241 + deps/npm/node_modules/is-symbol/CHANGELOG.md | 12 + deps/npm/node_modules/is-symbol/LICENSE | 21 + deps/npm/node_modules/is-symbol/Makefile | 61 + deps/npm/node_modules/is-symbol/README.md | 46 + deps/npm/node_modules/is-symbol/index.js | 35 + deps/npm/node_modules/is-symbol/package.json | 72 + .../npm/node_modules/is-symbol/test/.eslintrc | 7 + deps/npm/node_modules/is-symbol/test/index.js | 91 + deps/npm/node_modules/isstream/.jshintrc | 59 + deps/npm/node_modules/minizlib/index.js | 159 +- deps/npm/node_modules/minizlib/package.json | 24 +- .../node_modules/move-concurrently/README.md~ | 52 + .../mute-stream/.nyc_output/33508.json | 1 + .../mute-stream/.nyc_output/33510.json | 1 + deps/npm/node_modules/node-gyp/.jshintrc | 7 + .../node-gyp/node_modules/tar/.npmignore | 5 - .../node-gyp/node_modules/tar/lib/parse.js | 6 + .../node-gyp/node_modules/tar/package.json | 14 +- deps/npm/node_modules/node-gyp/package.json | 16 +- .../node_modules/resolve/.eslintrc | 31 + .../node_modules/resolve/test/.eslintrc | 5 + deps/npm/node_modules/npm-packlist/index.js | 42 +- .../node_modules/npm-packlist/package.json | 31 +- .../node_modules/object-keys/.editorconfig | 12 + deps/npm/node_modules/object-keys/.eslintrc | 17 + deps/npm/node_modules/object-keys/.jscs.json | 174 + deps/npm/node_modules/object-keys/.travis.yml | 225 + .../npm/node_modules/object-keys/CHANGELOG.md | 220 + deps/npm/node_modules/object-keys/LICENSE | 21 + deps/npm/node_modules/object-keys/README.md | 75 + deps/npm/node_modules/object-keys/index.js | 141 + .../node_modules/object-keys/isArguments.js | 17 + .../npm/node_modules/object-keys/package.json | 94 + .../node_modules/object-keys/test/index.js | 5 + .../.editorconfig | 12 + .../.eslintrc | 10 + .../.jscs.json | 175 + .../.npmignore | 28 + .../.travis.yml | 96 + .../CHANGELOG.md | 51 + .../object.getownpropertydescriptors/LICENSE | 21 + .../object.getownpropertydescriptors/Makefile | 61 + .../README.md | 99 + .../implementation.js | 44 + .../object.getownpropertydescriptors/index.js | 15 + .../package.json | 107 + .../polyfill.js | 7 + .../object.getownpropertydescriptors/shim.js | 14 + .../test/.eslintrc | 8 + .../test/index.js | 17 + .../test/shimmed.js | 35 + .../test/tests.js | 127 + deps/npm/node_modules/pacote/CHANGELOG.md | 12 + deps/npm/node_modules/pacote/lib/util/git.js | 10 +- .../pacote/lib/with-tarball-stream.js | 2 +- deps/npm/node_modules/pacote/package.json | 28 +- deps/npm/node_modules/psl/.eslintrc | 11 + deps/npm/node_modules/qs/.eslintrc | 19 + deps/npm/node_modules/qs/test/.eslintrc | 15 + deps/npm/node_modules/query-string/index.d.ts | 143 + deps/npm/node_modules/query-string/index.js | 110 +- .../node_modules/query-string/package.json | 30 +- deps/npm/node_modules/query-string/readme.md | 108 +- .../node_modules/read-package-tree/README.md | 3 + .../read-package-tree/package.json | 32 +- .../read-package-tree/realpath.js | 94 + .../npm/node_modules/read-package-tree/rpt.js | 380 +- .../node_modules/readable-stream/README.md | 2 +- .../readable-stream/lib/_stream_readable.js | 46 +- .../readable-stream/lib/_stream_writable.js | 6 +- .../lib/internal/streams/async_iterator.js | 17 +- .../lib/internal/streams/end-of-stream.js | 43 +- .../node_modules/readable-stream/package.json | 26 +- .../node_modules/readable-stream/readable.js | 11 +- .../node_modules/readable-stream/yarn.lock | 6423 ----------------- .../readdir-scoped-modules/.travis.yml | 7 - .../readdir-scoped-modules/package.json | 36 +- .../readdir-scoped-modules/readdir.js | 50 + .../readdir-scoped-modules/test/basic.js | 14 - .../test/fixtures/@org/x/.keep | 0 .../test/fixtures/@org/y/.keep | 0 .../test/fixtures/@scope/x/.keep | 0 .../test/fixtures/@scope/y/.keep | 0 .../test/fixtures/a/x/.keep | 0 .../test/fixtures/a/y/.keep | 0 .../test/fixtures/b/x/.keep | 0 .../test/fixtures/b/y/.keep | 0 .../node_modules/require-directory/.jshintrc | 67 + deps/npm/node_modules/sha/.npmignore | 4 - deps/npm/node_modules/sha/README.md | 4 +- deps/npm/node_modules/sha/index.js | 2 +- .../node_modules/readable-stream/.travis.yml | 55 - .../readable-stream/CONTRIBUTING.md | 38 - .../readable-stream/GOVERNANCE.md | 136 - .../sha/node_modules/readable-stream/LICENSE | 47 - .../node_modules/readable-stream/README.md | 58 - .../doc/wg-meetings/2015-01-30.md | 58 - .../readable-stream/duplex-browser.js | 1 - .../node_modules/readable-stream/duplex.js | 1 - .../readable-stream/lib/_stream_duplex.js | 131 - .../lib/_stream_passthrough.js | 47 - .../readable-stream/lib/_stream_readable.js | 1019 --- .../readable-stream/lib/_stream_transform.js | 214 - .../readable-stream/lib/_stream_writable.js | 687 -- .../lib/internal/streams/BufferList.js | 79 - .../lib/internal/streams/destroy.js | 74 - .../lib/internal/streams/stream-browser.js | 1 - .../lib/internal/streams/stream.js | 1 - .../node_modules/readable-stream/package.json | 81 - .../readable-stream/passthrough.js | 1 - .../readable-stream/readable-browser.js | 7 - .../node_modules/readable-stream/readable.js | 19 - .../node_modules/readable-stream/transform.js | 1 - .../readable-stream/writable-browser.js | 1 - .../node_modules/readable-stream/writable.js | 8 - .../node_modules/string_decoder/.travis.yml | 50 - .../sha/node_modules/string_decoder/LICENSE | 47 - .../sha/node_modules/string_decoder/README.md | 47 - .../string_decoder/lib/string_decoder.js | 296 - .../node_modules/string_decoder/package.json | 59 - deps/npm/node_modules/sha/package.json | 36 +- .../npm/node_modules/tar/lib/large-numbers.js | 59 +- deps/npm/node_modules/tar/lib/mkdir.js | 4 +- .../tar/node_modules/chownr/LICENSE | 15 - .../tar/node_modules/chownr/README.md | 3 - .../tar/node_modules/chownr/chownr.js | 88 - .../tar/node_modules/chownr/package.json | 59 - deps/npm/node_modules/tar/package.json | 42 +- .../28dcebf0-9c4a-47bb-900e-93fcef37bbe2.json | 1 + .../node_modules/util-promisify/.npmignore | 1 + .../node_modules/util-promisify/.travis.yml | 8 + deps/npm/node_modules/util-promisify/LICENSE | 1072 +++ .../npm/node_modules/util-promisify/README.md | 42 + deps/npm/node_modules/util-promisify/index.js | 91 + .../node_modules/util-promisify/package.json | 45 + .../util-promisify/test/common.js | 56 + .../node_modules/util-promisify/test/index.js | 194 + .../util-promisify/test/timers.js | 38 + .../aa4ee25ac41a9c3c7ee37ce965e6d1ac.json | 1 + .../bb918173e62b9517f55b630902d07ef4.json | 1 + .../write-file-atomic/CHANGELOG.md | 5 + .../node_modules/write-file-atomic/index.js | 9 +- .../write-file-atomic/package.json | 26 +- deps/npm/node_modules/xtend/.jshintrc | 30 + deps/npm/package.json | 45 +- deps/npm/test/common-config.js | 90 + deps/npm/test/common-tap.js | 35 +- deps/npm/test/fake-registry.js | 9 +- .../test/fixtures/config/userconfig-with-gc | 23 + .../need-npm5-update/ignore-shrinkwrap.js | 6 +- .../need-npm5-update/peer-deps-invalid.js | 4 +- deps/npm/test/network/registry.js | 34 +- deps/npm/test/tap/404-parent.js | 5 +- .../test/tap/404-private-registry-scoped.js | 3 +- deps/npm/test/tap/404-private-registry.js | 2 +- deps/npm/test/tap/404.js | 2 +- deps/npm/test/tap/access.js | 9 +- .../tap/add-named-update-protocol-port.js | 12 +- deps/npm/test/tap/add-remote-git-file.js | 4 +- .../npm/test/tap/add-remote-git-shrinkwrap.js | 10 +- deps/npm/test/tap/add-remote-git-submodule.js | 10 +- deps/npm/test/tap/add-remote-git.js | 11 +- deps/npm/test/tap/adduser-always-auth.js | 6 +- deps/npm/test/tap/adduser-legacy-auth.js | 7 +- deps/npm/test/tap/adduser-oauth.js | 4 +- deps/npm/test/tap/adduser-saml.js | 4 +- deps/npm/test/tap/aliases.js | 10 +- .../all-package-metadata-cache-stream-unit.js | 4 +- .../all-package-metadata-entry-stream-unit.js | 2 +- ...all-package-metadata-update-stream-unit.js | 2 +- .../all-package-metadata-write-stream-unit.js | 2 +- deps/npm/test/tap/all-package-metadata.js | 2 +- deps/npm/test/tap/anon-cli-metrics.js | 2 +- deps/npm/test/tap/audit-fix.js | 2 +- deps/npm/test/tap/audit.js | 216 +- deps/npm/test/tap/auto-prune.js | 2 +- deps/npm/test/tap/bearer-token-check.js | 2 +- deps/npm/test/tap/bin.js | 8 +- .../bitbucket-https-url-with-creds-package.js | 2 +- .../tap/bitbucket-https-url-with-creds.js | 2 +- .../test/tap/bitbucket-shortcut-package.js | 2 +- deps/npm/test/tap/bitbucket-shortcut.js | 2 +- deps/npm/test/tap/bugs.js | 24 +- deps/npm/test/tap/build-already-built.js | 3 +- deps/npm/test/tap/builtin-config.js | 2 +- .../test/tap/bundled-dependencies-nonarray.js | 2 +- deps/npm/test/tap/bundled-dependencies.js | 2 +- deps/npm/test/tap/bundled-transitive-deps.js | 2 +- deps/npm/test/tap/cache-add-unpublished.js | 4 +- deps/npm/test/tap/cache-shasum-fork.js | 2 +- deps/npm/test/tap/check-cpu-reqs.js | 2 +- deps/npm/test/tap/check-engine-reqs.js | 2 +- deps/npm/test/tap/check-install-self.js | 2 +- deps/npm/test/tap/check-os-reqs.js | 2 +- deps/npm/test/tap/check-permissions.js | 3 +- deps/npm/test/tap/ci-header.js | 2 +- deps/npm/test/tap/ci.js | 30 +- deps/npm/test/tap/circular-dep.js | 2 +- deps/npm/test/tap/config-basic.js | 12 +- deps/npm/test/tap/config-builtin.js | 2 +- deps/npm/test/tap/config-certfile.js | 2 +- deps/npm/test/tap/config-credentials.js | 2 +- deps/npm/test/tap/config-edit.js | 2 +- deps/npm/test/tap/config-envReplace.js | 3 +- deps/npm/test/tap/config-list.js | 2 +- deps/npm/test/tap/config-malformed.js | 2 +- deps/npm/test/tap/config-new-cafile.js | 10 +- deps/npm/test/tap/config-private.js | 2 +- deps/npm/test/tap/config-project.js | 2 +- deps/npm/test/tap/config-save.js | 14 +- deps/npm/test/tap/correct-mkdir.js | 4 +- deps/npm/test/tap/cruft-test.js | 2 +- deps/npm/test/tap/debug-logs.js | 20 +- deps/npm/test/tap/dedupe-git-semver.js | 3 +- deps/npm/test/tap/dedupe-scoped.js | 2 +- deps/npm/test/tap/dedupe.js | 2 +- deps/npm/test/tap/dist-tag.js | 2 +- deps/npm/test/tap/do-not-remove-other-bins.js | 2 +- deps/npm/test/tap/doctor.js | 2 +- .../test/tap/extraneous-dep-cycle-ls-ok.js | 2 +- deps/npm/test/tap/false-name.js | 2 +- deps/npm/test/tap/fetch-package-metadata.js | 4 +- deps/npm/test/tap/full-warning-messages.js | 2 +- deps/npm/test/tap/gently-rm-cmdshims.js | 3 +- deps/npm/test/tap/gently-rm-linked-module.js | 3 +- deps/npm/test/tap/gently-rm-overeager.js | 2 +- .../tap/gently-rm-symlinked-global-dir.js | 8 +- .../test/tap/gist-short-shortcut-package.js | 2 +- deps/npm/test/tap/gist-short-shortcut.js | 2 +- deps/npm/test/tap/gist-shortcut-package.js | 2 +- deps/npm/test/tap/gist-shortcut.js | 2 +- .../test/tap/git-dependency-install-link.js | 10 +- deps/npm/test/tap/git-npmignore.js | 3 +- deps/npm/test/tap/git-prepare.js | 6 +- deps/npm/test/tap/github-shortcut-package.js | 2 +- deps/npm/test/tap/github-shortcut.js | 2 +- deps/npm/test/tap/gitlab-shortcut-package.js | 2 +- deps/npm/test/tap/gitlab-shortcut.js | 2 +- deps/npm/test/tap/graceful-restart.js | 2 +- deps/npm/test/tap/ignore-install-link.js | 2 +- deps/npm/test/tap/ignore-scripts.js | 2 +- deps/npm/test/tap/init-interrupt.js | 4 +- deps/npm/test/tap/install-at-locally.js | 2 +- .../test/tap/install-at-sub-path-locally.js | 2 +- deps/npm/test/tap/install-bad-dep-format.js | 6 +- deps/npm/test/tap/install-bad-man.js | 4 +- deps/npm/test/tap/install-before.js | 2 +- deps/npm/test/tap/install-bin-null.js | 2 +- .../test/tap/install-cli-only-development.js | 2 +- .../test/tap/install-cli-only-production.js | 2 +- .../test/tap/install-cli-only-shrinkwrap.js | 2 +- .../test/tap/install-cli-production-nosave.js | 2 +- deps/npm/test/tap/install-cli-production.js | 2 +- deps/npm/test/tap/install-cli-unicode.js | 2 +- .../test/tap/install-contributors-count.js | 3 +- .../test/tap/install-dep-classification.js | 2 +- .../tap/install-duplicate-deps-warning.js | 2 +- deps/npm/test/tap/install-from-local.js | 2 +- .../test/tap/install-into-likenamed-folder.js | 2 +- deps/npm/test/tap/install-link-scripts.js | 2 +- deps/npm/test/tap/install-local-dep-cycle.js | 2 +- deps/npm/test/tap/install-man.js | 4 +- deps/npm/test/tap/install-noargs-dev.js | 2 +- .../test/tap/install-package-json-order.js | 3 +- .../npm/test/tap/install-package-lock-only.js | 2 +- deps/npm/test/tap/install-parse-error.js | 3 +- .../test/tap/install-property-conflicts.js | 2 +- .../test/tap/install-report-just-installed.js | 3 +- .../tap/install-save-consistent-newlines.js | 2 +- deps/npm/test/tap/install-save-exact.js | 2 +- deps/npm/test/tap/install-save-local.js | 2 +- deps/npm/test/tap/install-save-prefix.js | 2 +- .../tap/install-scoped-already-installed.js | 2 +- deps/npm/test/tap/install-scoped-link.js | 4 +- .../install-scoped-with-bundled-dependency.js | 2 +- .../install-scoped-with-peer-dependency.js | 2 +- .../npm/test/tap/install-shrinkwrapped-git.js | 14 +- .../install-test-cli-without-package-lock.js | 2 +- deps/npm/test/tap/install-windows-newlines.js | 2 +- .../tap/install-with-dev-dep-duplicate.js | 2 +- .../test/tap/invalid-dep-version-filtering.js | 2 +- deps/npm/test/tap/it.js | 2 +- deps/npm/test/tap/legacy-ignore-nested-nm.js | 2 +- deps/npm/test/tap/legacy-missing-bindir.js | 2 +- deps/npm/test/tap/legacy-no-auth-leak.js | 3 +- deps/npm/test/tap/legacy-platform-all.js | 3 +- deps/npm/test/tap/legacy-platform.js | 2 +- deps/npm/test/tap/legacy-private.js | 2 +- deps/npm/test/tap/legacy-test-package.js | 2 +- deps/npm/test/tap/lifecycle-INIT_CWD.js | 2 +- deps/npm/test/tap/lifecycle-order.js | 2 +- deps/npm/test/tap/link.js | 8 +- .../test/tap/local-args-relative-to-cwd.js | 2 +- deps/npm/test/tap/locker.js | 3 +- deps/npm/test/tap/lockfile-http-deps.js | 2 +- deps/npm/test/tap/logout-scoped.js | 11 +- deps/npm/test/tap/logout.js | 9 +- deps/npm/test/tap/ls-depth-cli.js | 8 +- deps/npm/test/tap/ls-depth-unmet.js | 2 +- deps/npm/test/tap/ls-env.js | 2 +- deps/npm/test/tap/ls-l-depth-0.js | 2 +- deps/npm/test/tap/ls-peer.js | 2 +- deps/npm/test/tap/ls-production-and-dev.js | 2 +- deps/npm/test/tap/ls-top-errors.js | 2 +- deps/npm/test/tap/ls.js | 2 +- deps/npm/test/tap/nested-extraneous.js | 2 +- deps/npm/test/tap/no-global-warns.js | 2 +- deps/npm/test/tap/no-scan-full-global-dir.js | 27 +- .../test/tap/noargs-install-config-save.js | 6 +- deps/npm/test/tap/node-modules-path-munge.js | 2 +- deps/npm/test/tap/npm-api-not-loaded-error.js | 3 +- deps/npm/test/tap/onload.js | 4 +- .../optional-metadep-rollback-collision.js | 2 +- deps/npm/test/tap/outdated-color.js | 2 +- deps/npm/test/tap/outdated-depth.js | 2 +- deps/npm/test/tap/outdated-git.js | 2 +- deps/npm/test/tap/outdated-json.js | 44 +- deps/npm/test/tap/outdated-latest.js | 2 +- deps/npm/test/tap/outdated-long.js | 2 +- deps/npm/test/tap/outdated-remote.js | 95 + deps/npm/test/tap/outdated-symlink.js | 2 +- deps/npm/test/tap/outdated.js | 2 +- deps/npm/test/tap/override-bundled.js | 2 +- deps/npm/test/tap/owner.js | 2 +- deps/npm/test/tap/pack-files-and-ignores.js | 4 +- deps/npm/test/tap/pack-scoped.js | 2 +- deps/npm/test/tap/pack.js | 2 +- deps/npm/test/tap/peer-deps.js | 2 +- deps/npm/test/tap/ping.js | 2 +- deps/npm/test/tap/prepare.js | 2 +- deps/npm/test/tap/prepublish-only.js | 2 +- deps/npm/test/tap/prepublish.js | 2 +- deps/npm/test/tap/progress-config.js | 4 +- deps/npm/test/tap/prune-dev-dep-cycle.js | 3 +- deps/npm/test/tap/prune-dev-dep-with-bins.js | 3 +- .../test/tap/prune-with-dev-dep-duplicate.js | 2 +- deps/npm/test/tap/prune-with-only-dev-deps.js | 2 +- deps/npm/test/tap/prune.js | 2 +- deps/npm/test/tap/publish-access-scoped.js | 2 +- ...ublish-access-unscoped-restricted-fails.js | 2 +- deps/npm/test/tap/publish-access-unscoped.js | 2 +- deps/npm/test/tap/publish-config.js | 6 +- .../test/tap/publish-invalid-semver-tag.js | 2 +- deps/npm/test/tap/publish-scoped.js | 8 +- deps/npm/test/tap/publish.js | 10 +- deps/npm/test/tap/repo.js | 11 +- deps/npm/test/tap/retry-on-stale-cache.js | 2 +- .../npm/test/tap/run-script-filter-private.js | 2 +- deps/npm/test/tap/run-script.js | 2 +- deps/npm/test/tap/save-optional.js | 2 +- deps/npm/test/tap/scope-header.js | 2 +- .../test/tap/scripts-whitespace-windows.js | 2 +- .../npm/test/tap/search.all-package-search.js | 2 +- deps/npm/test/tap/search.js | 2 +- deps/npm/test/tap/shared-linked.js | 2 +- deps/npm/test/tap/shrinkwrap-_auth.js | 2 +- deps/npm/test/tap/shrinkwrap-default-dev.js | 2 +- .../npm/test/tap/shrinkwrap-dev-dependency.js | 2 +- deps/npm/test/tap/shrinkwrap-empty-deps.js | 2 +- .../npm/test/tap/shrinkwrap-extra-metadata.js | 2 +- deps/npm/test/tap/shrinkwrap-global-auth.js | 2 +- deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js | 2 +- deps/npm/test/tap/shrinkwrap-lifecycle.js | 2 +- .../test/tap/shrinkwrap-local-dependency.js | 2 +- deps/npm/test/tap/shrinkwrap-nested.js | 2 +- .../tap/shrinkwrap-optional-dependency.js | 2 +- .../test/tap/shrinkwrap-optional-platform.js | 2 +- .../test/tap/shrinkwrap-optional-property.js | 4 +- .../tap/shrinkwrap-prod-dependency-also.js | 2 +- .../test/tap/shrinkwrap-prod-dependency.js | 2 +- .../test/tap/shrinkwrap-resolve-conflict.js | 2 +- .../shrinkwrap-save-dev-with-existing-deps.js | 2 +- .../shrinkwrap-save-with-existing-dev-deps.js | 2 +- deps/npm/test/tap/shrinkwrap-scoped-auth.js | 2 +- .../tap/shrinkwrap-shared-dev-dependency.js | 2 +- deps/npm/test/tap/shrinkwrap-version-match.js | 2 +- deps/npm/test/tap/sorted-package-json.js | 4 +- deps/npm/test/tap/spawn-enoent-help.js | 3 +- deps/npm/test/tap/spawn-enoent.js | 3 +- deps/npm/test/tap/spec-local-specifiers.js | 2 +- .../splat-with-only-prerelease-to-latest.js | 2 +- deps/npm/test/tap/startstop.js | 2 +- deps/npm/test/tap/symlink-cycle.js | 2 +- deps/npm/test/tap/tag-version-prefix.js | 2 +- deps/npm/test/tap/tagged-version-matching.js | 2 +- deps/npm/test/tap/tree-style.js | 2 +- deps/npm/test/tap/umask-lifecycle.js | 5 +- deps/npm/test/tap/uninstall-link-clean.js | 2 +- deps/npm/test/tap/uninstall-package.js | 26 +- deps/npm/test/tap/uninstall-save.js | 2 +- deps/npm/test/tap/unpack-foreign-tarball.js | 2 +- deps/npm/test/tap/unpublish-config.js | 7 +- deps/npm/test/tap/unsupported.js | 4 +- deps/npm/test/tap/update-examples.js | 2 +- deps/npm/test/tap/update-symlink.js | 2 +- deps/npm/test/tap/upgrade-lifecycles.js | 2 +- deps/npm/test/tap/url-dependencies.js | 2 +- .../test/tap/verify-no-lifecycle-on-repo.js | 4 +- .../test/tap/version-allow-same-version.js | 2 +- deps/npm/test/tap/version-commit-hooks.js | 3 +- .../test/tap/version-consistent-newlines.js | 2 +- deps/npm/test/tap/version-from-git.js | 2 +- deps/npm/test/tap/version-git-not-clean.js | 2 +- deps/npm/test/tap/version-lifecycle.js | 2 +- deps/npm/test/tap/version-message-config.js | 2 +- deps/npm/test/tap/version-no-git.js | 2 +- deps/npm/test/tap/version-no-package.js | 3 +- deps/npm/test/tap/version-no-tags.js | 2 +- deps/npm/test/tap/version-prerelease-id.js | 2 +- .../tap/version-sub-directory-shrinkwrap.js | 2 +- deps/npm/test/tap/version-sub-directory.js | 2 +- .../npm/test/tap/version-update-shrinkwrap.js | 2 +- 778 files changed, 19809 insertions(+), 12245 deletions(-) delete mode 100644 deps/npm/node_modules/cacache/node_modules/chownr/README.md delete mode 100644 deps/npm/node_modules/cacache/node_modules/chownr/chownr.js delete mode 100644 deps/npm/node_modules/cacache/node_modules/chownr/package.json rename deps/npm/node_modules/cacache/node_modules/{chownr => glob}/LICENSE (78%) create mode 100644 deps/npm/node_modules/cacache/node_modules/glob/README.md create mode 100644 deps/npm/node_modules/cacache/node_modules/glob/changelog.md create mode 100644 deps/npm/node_modules/cacache/node_modules/glob/common.js create mode 100644 deps/npm/node_modules/cacache/node_modules/glob/glob.js create mode 100644 deps/npm/node_modules/cacache/node_modules/glob/package.json create mode 100644 deps/npm/node_modules/cacache/node_modules/glob/sync.js delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/LICENSE delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/README.md delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.html delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.js.html delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/base.css delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/index.html delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.css delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.js delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.png delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sorter.js delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/index.js delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/package.json delete mode 100644 deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js create mode 100644 deps/npm/node_modules/copy-concurrently/README.md~ create mode 100644 deps/npm/node_modules/debug/.eslintrc create mode 100644 deps/npm/node_modules/define-properties/.editorconfig create mode 100644 deps/npm/node_modules/define-properties/.eslintrc create mode 100644 deps/npm/node_modules/define-properties/.jscs.json create mode 100644 deps/npm/node_modules/define-properties/.travis.yml create mode 100644 deps/npm/node_modules/define-properties/CHANGELOG.md create mode 100644 deps/npm/node_modules/define-properties/LICENSE create mode 100644 deps/npm/node_modules/define-properties/README.md create mode 100644 deps/npm/node_modules/define-properties/index.js create mode 100644 deps/npm/node_modules/define-properties/package.json create mode 100644 deps/npm/node_modules/define-properties/test/index.js create mode 100644 deps/npm/node_modules/es-abstract/.editorconfig create mode 100644 deps/npm/node_modules/es-abstract/.eslintrc create mode 100644 deps/npm/node_modules/es-abstract/.jscs.json create mode 100644 deps/npm/node_modules/es-abstract/.nycrc create mode 100644 deps/npm/node_modules/es-abstract/.travis.yml create mode 100644 deps/npm/node_modules/es-abstract/CHANGELOG.md create mode 100644 deps/npm/node_modules/es-abstract/GetIntrinsic.js create mode 100644 deps/npm/node_modules/es-abstract/LICENSE create mode 100644 deps/npm/node_modules/es-abstract/Makefile create mode 100644 deps/npm/node_modules/es-abstract/README.md create mode 100644 deps/npm/node_modules/es-abstract/es2015.js create mode 100644 deps/npm/node_modules/es-abstract/es2016.js create mode 100644 deps/npm/node_modules/es-abstract/es2017.js create mode 100644 deps/npm/node_modules/es-abstract/es5.js create mode 100644 deps/npm/node_modules/es-abstract/es6.js create mode 100644 deps/npm/node_modules/es-abstract/es7.js create mode 100644 deps/npm/node_modules/es-abstract/helpers/assign.js create mode 100644 deps/npm/node_modules/es-abstract/helpers/isFinite.js create mode 100644 deps/npm/node_modules/es-abstract/helpers/isNaN.js create mode 100644 deps/npm/node_modules/es-abstract/helpers/isPrimitive.js create mode 100644 deps/npm/node_modules/es-abstract/helpers/mod.js create mode 100644 deps/npm/node_modules/es-abstract/helpers/sign.js create mode 100644 deps/npm/node_modules/es-abstract/index.js create mode 100644 deps/npm/node_modules/es-abstract/operations/2015.js create mode 100644 deps/npm/node_modules/es-abstract/operations/2016.js create mode 100644 deps/npm/node_modules/es-abstract/operations/2017.js create mode 100644 deps/npm/node_modules/es-abstract/operations/es5.js create mode 100644 deps/npm/node_modules/es-abstract/package.json create mode 100644 deps/npm/node_modules/es-abstract/test/.eslintrc create mode 100644 deps/npm/node_modules/es-abstract/test/GetIntrinsic.js create mode 100644 deps/npm/node_modules/es-abstract/test/diffOps.js create mode 100644 deps/npm/node_modules/es-abstract/test/es2015.js create mode 100644 deps/npm/node_modules/es-abstract/test/es2016.js create mode 100644 deps/npm/node_modules/es-abstract/test/es2017.js create mode 100644 deps/npm/node_modules/es-abstract/test/es5.js create mode 100644 deps/npm/node_modules/es-abstract/test/es6.js create mode 100644 deps/npm/node_modules/es-abstract/test/es7.js create mode 100644 deps/npm/node_modules/es-abstract/test/helpers/values.js create mode 100644 deps/npm/node_modules/es-abstract/test/index.js create mode 100644 deps/npm/node_modules/es-abstract/test/tests.js create mode 100644 deps/npm/node_modules/es-to-primitive/.editorconfig create mode 100644 deps/npm/node_modules/es-to-primitive/.eslintrc create mode 100644 deps/npm/node_modules/es-to-primitive/.jscs.json create mode 100644 deps/npm/node_modules/es-to-primitive/.travis.yml create mode 100644 deps/npm/node_modules/es-to-primitive/CHANGELOG.md create mode 100644 deps/npm/node_modules/es-to-primitive/LICENSE create mode 100644 deps/npm/node_modules/es-to-primitive/Makefile create mode 100644 deps/npm/node_modules/es-to-primitive/README.md create mode 100644 deps/npm/node_modules/es-to-primitive/es2015.js create mode 100644 deps/npm/node_modules/es-to-primitive/es5.js create mode 100644 deps/npm/node_modules/es-to-primitive/es6.js create mode 100644 deps/npm/node_modules/es-to-primitive/helpers/isPrimitive.js create mode 100644 deps/npm/node_modules/es-to-primitive/index.js create mode 100644 deps/npm/node_modules/es-to-primitive/package.json create mode 100644 deps/npm/node_modules/es-to-primitive/test/.eslintrc create mode 100644 deps/npm/node_modules/es-to-primitive/test/es2015.js create mode 100644 deps/npm/node_modules/es-to-primitive/test/es5.js create mode 100644 deps/npm/node_modules/es-to-primitive/test/es6.js create mode 100644 deps/npm/node_modules/es-to-primitive/test/index.js create mode 100644 deps/npm/node_modules/extend/.eslintrc create mode 100644 deps/npm/node_modules/find-npm-prefix/test/find-prefix.js~ delete mode 100644 deps/npm/node_modules/fstream/.npmignore create mode 100644 deps/npm/node_modules/function-bind/.editorconfig create mode 100644 deps/npm/node_modules/function-bind/.eslintrc create mode 100644 deps/npm/node_modules/function-bind/.jscs.json create mode 100644 deps/npm/node_modules/function-bind/.npmignore create mode 100644 deps/npm/node_modules/function-bind/.travis.yml create mode 100644 deps/npm/node_modules/function-bind/LICENSE create mode 100644 deps/npm/node_modules/function-bind/README.md create mode 100644 deps/npm/node_modules/function-bind/implementation.js create mode 100644 deps/npm/node_modules/function-bind/index.js create mode 100644 deps/npm/node_modules/function-bind/package.json create mode 100644 deps/npm/node_modules/function-bind/test/.eslintrc create mode 100644 deps/npm/node_modules/function-bind/test/index.js create mode 100644 deps/npm/node_modules/has-symbols/.eslintrc create mode 100644 deps/npm/node_modules/has-symbols/.npmignore create mode 100644 deps/npm/node_modules/has-symbols/.travis.yml create mode 100644 deps/npm/node_modules/has-symbols/CHANGELOG.md create mode 100644 deps/npm/node_modules/has-symbols/LICENSE create mode 100644 deps/npm/node_modules/has-symbols/README.md create mode 100644 deps/npm/node_modules/has-symbols/index.js create mode 100644 deps/npm/node_modules/has-symbols/package.json create mode 100644 deps/npm/node_modules/has-symbols/shams.js create mode 100644 deps/npm/node_modules/has-symbols/test/index.js create mode 100644 deps/npm/node_modules/has-symbols/test/shams/core-js.js create mode 100644 deps/npm/node_modules/has-symbols/test/shams/get-own-property-symbols.js create mode 100644 deps/npm/node_modules/has-symbols/test/tests.js create mode 100644 deps/npm/node_modules/has/LICENSE-MIT create mode 100644 deps/npm/node_modules/has/README.md create mode 100644 deps/npm/node_modules/has/package.json create mode 100644 deps/npm/node_modules/has/src/index.js create mode 100644 deps/npm/node_modules/has/test/index.js create mode 100644 deps/npm/node_modules/is-callable/.editorconfig create mode 100644 deps/npm/node_modules/is-callable/.eslintrc create mode 100644 deps/npm/node_modules/is-callable/.istanbul.yml create mode 100644 deps/npm/node_modules/is-callable/.jscs.json create mode 100644 deps/npm/node_modules/is-callable/.travis.yml create mode 100644 deps/npm/node_modules/is-callable/CHANGELOG.md create mode 100644 deps/npm/node_modules/is-callable/LICENSE create mode 100644 deps/npm/node_modules/is-callable/Makefile create mode 100644 deps/npm/node_modules/is-callable/README.md create mode 100644 deps/npm/node_modules/is-callable/index.js create mode 100644 deps/npm/node_modules/is-callable/package.json create mode 100644 deps/npm/node_modules/is-callable/test.js create mode 100644 deps/npm/node_modules/is-date-object/.eslintrc create mode 100644 deps/npm/node_modules/is-date-object/.jscs.json create mode 100644 deps/npm/node_modules/is-date-object/.npmignore create mode 100644 deps/npm/node_modules/is-date-object/.travis.yml create mode 100644 deps/npm/node_modules/is-date-object/CHANGELOG.md create mode 100644 deps/npm/node_modules/is-date-object/LICENSE create mode 100644 deps/npm/node_modules/is-date-object/Makefile create mode 100644 deps/npm/node_modules/is-date-object/README.md create mode 100644 deps/npm/node_modules/is-date-object/index.js create mode 100644 deps/npm/node_modules/is-date-object/package.json create mode 100644 deps/npm/node_modules/is-date-object/test.js create mode 100644 deps/npm/node_modules/is-regex/.eslintrc create mode 100644 deps/npm/node_modules/is-regex/.jscs.json create mode 100644 deps/npm/node_modules/is-regex/.npmignore create mode 100644 deps/npm/node_modules/is-regex/.travis.yml create mode 100644 deps/npm/node_modules/is-regex/CHANGELOG.md create mode 100644 deps/npm/node_modules/is-regex/LICENSE create mode 100644 deps/npm/node_modules/is-regex/Makefile create mode 100644 deps/npm/node_modules/is-regex/README.md create mode 100644 deps/npm/node_modules/is-regex/index.js create mode 100644 deps/npm/node_modules/is-regex/package.json create mode 100644 deps/npm/node_modules/is-regex/test.js create mode 100644 deps/npm/node_modules/is-symbol/.editorconfig create mode 100644 deps/npm/node_modules/is-symbol/.eslintrc create mode 100644 deps/npm/node_modules/is-symbol/.jscs.json create mode 100644 deps/npm/node_modules/is-symbol/.nvmrc create mode 100644 deps/npm/node_modules/is-symbol/.travis.yml create mode 100644 deps/npm/node_modules/is-symbol/CHANGELOG.md create mode 100644 deps/npm/node_modules/is-symbol/LICENSE create mode 100644 deps/npm/node_modules/is-symbol/Makefile create mode 100644 deps/npm/node_modules/is-symbol/README.md create mode 100644 deps/npm/node_modules/is-symbol/index.js create mode 100644 deps/npm/node_modules/is-symbol/package.json create mode 100644 deps/npm/node_modules/is-symbol/test/.eslintrc create mode 100644 deps/npm/node_modules/is-symbol/test/index.js create mode 100644 deps/npm/node_modules/isstream/.jshintrc create mode 100644 deps/npm/node_modules/move-concurrently/README.md~ create mode 100644 deps/npm/node_modules/mute-stream/.nyc_output/33508.json create mode 100644 deps/npm/node_modules/mute-stream/.nyc_output/33510.json create mode 100644 deps/npm/node_modules/node-gyp/.jshintrc delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore create mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/resolve/.eslintrc create mode 100644 deps/npm/node_modules/normalize-package-data/node_modules/resolve/test/.eslintrc create mode 100644 deps/npm/node_modules/object-keys/.editorconfig create mode 100644 deps/npm/node_modules/object-keys/.eslintrc create mode 100644 deps/npm/node_modules/object-keys/.jscs.json create mode 100644 deps/npm/node_modules/object-keys/.travis.yml create mode 100644 deps/npm/node_modules/object-keys/CHANGELOG.md create mode 100644 deps/npm/node_modules/object-keys/LICENSE create mode 100644 deps/npm/node_modules/object-keys/README.md create mode 100644 deps/npm/node_modules/object-keys/index.js create mode 100644 deps/npm/node_modules/object-keys/isArguments.js create mode 100644 deps/npm/node_modules/object-keys/package.json create mode 100644 deps/npm/node_modules/object-keys/test/index.js create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/.editorconfig create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/.eslintrc create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/.jscs.json create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/.npmignore create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/.travis.yml create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/CHANGELOG.md create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/LICENSE create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/Makefile create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/README.md create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/implementation.js create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/index.js create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/package.json create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/polyfill.js create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/shim.js create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/test/.eslintrc create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/test/index.js create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/test/shimmed.js create mode 100644 deps/npm/node_modules/object.getownpropertydescriptors/test/tests.js create mode 100644 deps/npm/node_modules/psl/.eslintrc create mode 100644 deps/npm/node_modules/qs/.eslintrc create mode 100644 deps/npm/node_modules/qs/test/.eslintrc create mode 100644 deps/npm/node_modules/query-string/index.d.ts create mode 100644 deps/npm/node_modules/read-package-tree/realpath.js delete mode 100644 deps/npm/node_modules/readable-stream/yarn.lock delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/.travis.yml delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/test/basic.js delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/x/.keep delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/y/.keep delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/x/.keep delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/y/.keep delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/x/.keep delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/y/.keep delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/x/.keep delete mode 100644 deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/y/.keep create mode 100644 deps/npm/node_modules/require-directory/.jshintrc delete mode 100644 deps/npm/node_modules/sha/.npmignore delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/README.md delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/package.json delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/readable.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/transform.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js delete mode 100644 deps/npm/node_modules/sha/node_modules/readable-stream/writable.js delete mode 100644 deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml delete mode 100644 deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE delete mode 100644 deps/npm/node_modules/sha/node_modules/string_decoder/README.md delete mode 100644 deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js delete mode 100644 deps/npm/node_modules/sha/node_modules/string_decoder/package.json delete mode 100644 deps/npm/node_modules/tar/node_modules/chownr/LICENSE delete mode 100644 deps/npm/node_modules/tar/node_modules/chownr/README.md delete mode 100644 deps/npm/node_modules/tar/node_modules/chownr/chownr.js delete mode 100644 deps/npm/node_modules/tar/node_modules/chownr/package.json create mode 100644 deps/npm/node_modules/through2/.nyc_output/28dcebf0-9c4a-47bb-900e-93fcef37bbe2.json create mode 100644 deps/npm/node_modules/util-promisify/.npmignore create mode 100644 deps/npm/node_modules/util-promisify/.travis.yml create mode 100644 deps/npm/node_modules/util-promisify/LICENSE create mode 100644 deps/npm/node_modules/util-promisify/README.md create mode 100644 deps/npm/node_modules/util-promisify/index.js create mode 100644 deps/npm/node_modules/util-promisify/package.json create mode 100644 deps/npm/node_modules/util-promisify/test/common.js create mode 100644 deps/npm/node_modules/util-promisify/test/index.js create mode 100644 deps/npm/node_modules/util-promisify/test/timers.js create mode 100644 deps/npm/node_modules/validate-npm-package-name/.nyc_output/aa4ee25ac41a9c3c7ee37ce965e6d1ac.json create mode 100644 deps/npm/node_modules/validate-npm-package-name/.nyc_output/bb918173e62b9517f55b630902d07ef4.json create mode 100644 deps/npm/node_modules/xtend/.jshintrc create mode 100644 deps/npm/test/common-config.js create mode 100644 deps/npm/test/fixtures/config/userconfig-with-gc create mode 100644 deps/npm/test/tap/outdated-remote.js diff --git a/deps/npm/.licensee.json b/deps/npm/.licensee.json index ad7c812367371d..5b815d601ee77a 100644 --- a/deps/npm/.licensee.json +++ b/deps/npm/.licensee.json @@ -1,7 +1,12 @@ { - "license": "(MIT OR BSD-2-Clause OR BSD-3-Clause OR Apache-2.0 OR ISC OR Unlicense OR CC-BY-3.0 OR CC0-1.0 OR Artistic-2.0)", + "licenses": { + "spdx": [ + "CC-BY-3.0" + ], + "blueOak": "bronze" + }, "corrections": true, - "whitelist": { + "packages": { "config-chain": "1.1.12", "cyclist": "0.2.2", "json-schema": "0.2.3", diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index 72b0f9a52db3d1..07bae65e6640fc 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -7,7 +7,7 @@ language: node_js matrix: include: # LTS is our most important target - - node_js: "10" + - node_js: "12" # DEPLOY_VERSION is used to set the couchapp setup mode for test/tap/registry.js # only gather coverage info for LTS env: DEPLOY_VERSION=testing COVERALLS_REPO_TOKEN="$COVERALLS_OPTIONAL_TOKEN" @@ -15,18 +15,16 @@ matrix: - "node . run tap-cover -- \"test/tap/*.js\"" - "unset COVERALLS_REPO_TOKEN ; node . run tap -- \"test/broken-under-*/*.js\"" # previous LTS is next most important - - node_js: "6" - env: DEPLOY_VERSION=testing - - node_js: "8" - env: DEPLOY_VERSION=testing - - node_js: "9" - env: DEPLOY_VERSION=testing - - node_js: "11" + - node_js: "10" env: DEPLOY_VERSION=testing script: - "npx standard" - "node . run licenses" - "node . run tap -- \"test/tap/*.js\" \"test/broken-under-nyc/*.js\"" + - node_js: "8" + env: DEPLOY_VERSION=testing + - node_js: "6" + env: DEPLOY_VERSION=testing notifications: slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 cache: diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index b9aee778afdc09..551e9340bd257a 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -630,3 +630,14 @@ Amadou Sall Chris Manson vlasy Emilis Dambauskas (Tokenmill) +George Czabania +Jonathan Underwood +Nick Graef +James George +John O'Sullivan +ossdev +Raphael Goulais +COURIER, CALEB [AG/1000] +CalebCourier +Florian Keller +Sreeram Jayan diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 51141fc6545e2f..58b2f49bd9dad5 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,4 +1,189 @@ -## v6.9.0 (2018-02-20): +## v6.10.0 (2019-07-03): + +### FEATURES + +* [`87fef4e35`](https://github.com/npm/cli/commit/87fef4e35) + [#176](https://github.com/npm/cli/pull/176) fix: Always return JSON for + outdated --json ([@sreeramjayan](https://github.com/sreeramjayan)) +* [`f101d44fc`](https://github.com/npm/cli/commit/f101d44fc) + [#203](https://github.com/npm/cli/pull/203) fix(unpublish): add space + after hyphen ([@ffflorian](https://github.com/ffflorian)) +* [`a4475de4c`](https://github.com/npm/cli/commit/a4475de4c) + [#202](https://github.com/npm/cli/pull/202) enable production flag for + npm audit ([@CalebCourier](https://github.com/CalebCourier)) +* [`d192904d0`](https://github.com/npm/cli/commit/d192904d0) + [#178](https://github.com/npm/cli/pull/178) fix: Return a value for + `view` when in silent mode + ([@stayradiated](https://github.com/stayradiated)) +* [`39d473adf`](https://github.com/npm/cli/commit/39d473adf) + [#185](https://github.com/npm/cli/pull/185) Allow git to follow global + tagsign config ([@junderw](https://github.com/junderw)) + +### BUGFIXES + +* [`d9238af0b`](https://github.com/npm/cli/commit/d9238af0b) + [#201](https://github.com/npm/cli/pull/163) + [npm/npm#17858](https://github.com/npm/npm/issues/17858) + [npm/npm#18042](https://github.com/npm/npm/issues/18042) + [npm.community#644](https://npm.community/t/644) do not crash when + removing nameless packages + ([@SteveVanOpstal](https://github.com/SteveVanOpstal) and + [@isaacs](https://github.com/isaacs)) +* [`4bec4f111`](https://github.com/npm/cli/commit/4bec4f111) + [#200](https://github.com/npm/cli/pull/200) Check for `node` (as well as + `node.exe`) in npm's local dir on Windows + ([@rgoulais](https://github.com/rgoulais)) +* [`ce93dab2d`](https://github.com/npm/cli/commit/ce93dab2db423ef23b3e08a0612dafbeb2d25789) + [#180](https://github.com/npm/cli/pull/180) + [npm.community#6187](https://npm.community/t/6187) Fix handling of + `remote` deps in `npm outdated` ([@larsgw](https://github.com/larsgw)) + +### TESTING + +* [`a823f3084`](https://github.com/npm/cli/commit/a823f3084) travis: Update + to include new v12 LTS ([@isaacs](https://github.com/isaacs)) +* [`33e2d1dac`](https://github.com/npm/cli/commit/33e2d1dac) fix flaky + debug-logs test ([@isaacs](https://github.com/isaacs)) +* [`e9411c6cd`](https://github.com/npm/cli/commit/e9411c6cd) Don't time out + waiting for gpg user input ([@isaacs](https://github.com/isaacs)) +* [`d2d301704`](https://github.com/npm/cli/commit/d2d301704) + [#195](https://github.com/npm/cli/pull/195) Add the arm64 check for + legacy-platform-all.js test case. + ([@ossdev07](https://github.com/ossdev07)) +* [`a4dc34243`](https://github.com/npm/cli/commit/a4dc34243) parallel tests + ([@isaacs](https://github.com/isaacs)) + +### DOCUMENTATION + +* [`f5857e263`](https://github.com/npm/cli/commit/f5857e263) + [#192](https://github.com/npm/cli/pull/192) Clarify usage of + bundledDependencies + ([@john-osullivan](https://github.com/john-osullivan)) +* [`747fdaf66`](https://github.com/npm/cli/commit/747fdaf66) + [#159](https://github.com/npm/cli/pull/159) doc: add --audit-level param + ([@ngraef](https://github.com/ngraef)) + +### DEPENDENCIES + +* [`e36b3c320`](https://github.com/npm/cli/commit/e36b3c320) + graceful-fs@4.2.0 ([@isaacs](https://github.com/isaacs)) +* [`6bb935c09`](https://github.com/npm/cli/commit/6bb935c09) + read-package-tree@5.3.1 ([@isaacs](https://github.com/isaacs)) + * [`e9cd536`](https://github.com/npm/read-package-tree/commit/e9cd536) + Use custom caching `realpath` implementation, dramatically reducing + `lstat` calls when reading the package tree + ([@isaacs](https://github.com/isaacs)) +* [`39538b460`](https://github.com/npm/cli/commit/39538b460) + write-file-atomic@2.4.3 ([@isaacs](https://github.com/isaacs)) + * [`f8b1552`](https://github.com/npm/write-file-atomic/commit/f8b1552) + [#38](https://github.com/npm/write-file-atomic/pull/38) Ignore errors + raised by `fs.closeSync` ([@lukeapage](https://github.com/lukeapage)) +* [`042193069`](https://github.com/npm/cli/commit/042193069) pacote@9.5.1 + ([@isaacs](https://github.com/isaacs)) + * [`8bbd051`](https://github.com/npm/pacote/commit/8bbd051) + [#172](https://github.com/zkat/pacote/pull/172) limit git retry + times, avoid unlimited retries ([小秦](https://github.com/xqin)) + * [`92f5e4c`](https://github.com/npm/pacote/commit/92f5e4c) + [#170](https://github.com/zkat/pacote/pull/170) fix(errors): Fix + "TypeError: err.code.match is not a function" error + ([@jviotti](https://github.com/jviotti)) +* [`8bd8e909f`](https://github.com/npm/cli/commit/8bd8e909f) cacache@11.3.3 + ([@isaacs](https://github.com/isaacs)) + * [`47de8f5`](https://github.com/npm/cacache/commit/47de8f5) + [#146](https://github.com/zkat/cacache/pull/146) + [npm.community#2395](https://npm.community/t/2395) fix(config): Add + ssri config 'error' option ([@larsgw](https://github.com/larsgw)) + * [`5156561`](https://github.com/npm/cacache/commit/5156561) + fix(write): avoid a `cb never called` situation + ([@zkat](https://github.com/zkat)) + * [`90f40f0`](https://github.com/npm/cacache/commit/90f40f0) + [#166](https://github.com/zkat/cacache/pull/166) + [#165](https://github.com/zkat/cacache/issues/165) docs: Fix docs for + `path` property in get.info + ([@hdgarrood](https://github.com/hdgarrood)) +* [`bf61c45c6`](https://github.com/npm/cli/commit/bf61c45c6) bluebird@3.5.5 + ([@isaacs](https://github.com/isaacs)) +* [`f75d46a9d`](https://github.com/npm/cli/commit/f75d46a9d) tar@4.4.10 + ([@isaacs](https://github.com/isaacs)) + * [`c80341a`](https://github.com/npm/node-tar/commit/c80341a) + [#215](https://github.com/npm/node-tar/pull/215) Fix + encoding/decoding of base-256 numbers + ([@justfalter](https://github.com/justfalter)) + * [`77522f0`](https://github.com/npm/node-tar/commit/77522f0) + [#204](https://github.com/npm/node-tar/issues/204) + [#214](https://github.com/npm/node-tar/issues/214) Use `stat` instead + of `lstat` when checking CWD ([@stkb](https://github.com/stkb)) +* [`ec6236210`](https://github.com/npm/cli/commit/ec6236210) + npm-packlist@1.4.4 ([@isaacs](https://github.com/isaacs)) + * [`63d1e3e`](https://github.com/npm/npm-packlist/commit/63d1e3e) + [#30](https://github.com/npm/npm-packlist/issues/30) Sort package + tarball entries by file type for compression benefits + ([@isaacs](https://github.com/isaacs)) + * [`7fcd045`](https://github.com/npm/npm-packlist/commit/7fcd045) + Ignore `.DS_Store` files as well as folders + ([@isaacs](https://github.com/isaacs)) + * [`68b7c96`](https://github.com/npm/npm-packlist/commit/68b7c96) Never + include .git folders in package root. (Note: this prevents the issue + that broke the v6.9.1 release.) + ([@isaacs](https://github.com/isaacs)) +* [`57bef61bc`](https://github.com/npm/cli/commit/57bef61bc) update fstream + in node-gyp ([@isaacs](https://github.com/isaacs)) + * Addresses [security advisory + #886](https://www.npmjs.com/advisories/886) +* [`acbbf7eee`](https://github.com/npm/cli/commit/acbbf7eee) + [#183](https://github.com/npm/cli/pull/183) licensee@7.0.2 + ([@kemitchell](https://github.com/kemitchell)) +* [`011ae67f0`](https://github.com/npm/cli/commit/011ae67f0) + readable-stream@3.3.0 ([@isaacs](https://github.com/isaacs)) +* [`f5e884909`](https://github.com/npm/cli/commit/f5e884909) + npm-registry-mock@1.2.1 ([@isaacs](https://github.com/isaacs)) +* [`b57d07e35`](https://github.com/npm/cli/commit/b57d07e35) + npm-registry-couchapp@2.7.2 ([@isaacs](https://github.com/isaacs)) + +## v6.9.2 (2019-06-27): + +This release is identical to v6.9.1, but we had to publish a new version +due to [a .git directory in the release](https://npm.community/t/8454). + +## v6.9.1 (2019-06-26): + +### BUGFIXES + +* [`6b1a9da0e`](https://github.com/npm/cli/commit/6b1a9da0e0f5c295cdaf4dea4b73bd221d778611) + [#165](https://github.com/npm/cli/pull/165) + Update `knownBroken` version. + ([@ljharb](https://github.com/ljharb)) +* [`d07547154`](https://github.com/npm/cli/commit/d07547154eb8a88aa4fde8a37e128e1e3272adc1) + [npm.community#5929](https://npm.community/t/npm-outdated-throw-an-error-cannot-read-property-length-of-undefined/5929) + Fix `outdated` rendering for global dependencies. + ([@zkat](https://github.com/zkat)) +* [`e4a1f1745`](https://github.com/npm/cli/commit/e4a1f174514a57580fd5e0fa33eee0f42bba77fc) + [npm.community#6259](https://npm.community/t/npm-token-create-doesnt-work-in-6-6-0-6-9-0/6259) + Fix OTP for token create and remove. + ([@zkat](https://github.com/zkat)) + +### DEPENDENCIES + +* [`a163a9c35`](https://github.com/npm/cli/commit/a163a9c35f6f341de343562368056258bba5d7dc) + `sha@3.0.0` + ([@aeschright](https://github.com/aeschright)) +* [`47b08b3b9`](https://github.com/npm/cli/commit/47b08b3b9860438b416efb438e975a628ec2eed5) + `query-string@6.4.0` + ([@aeschright](https://github.com/aeschright)) +* [`d6a956cff`](https://github.com/npm/cli/commit/d6a956cff6357e6de431848e578c391768685a64) + `readable-stream@3.2.0` + ([@aeschright](https://github.com/aeschright)) +* [`10b8bed2b`](https://github.com/npm/cli/commit/10b8bed2bb0afac5451164e87f25924cc1ac6f2e) + `tacks@1.3.0` + ([@aeschright](https://github.com/aeschright)) +* [`e7483704d`](https://github.com/npm/cli/commit/e7483704dda1acffc8c6b8c165c14c8a7512f3c8) + `tap@12.6.0` + ([@aeschright](https://github.com/aeschright)) +* [`3242fe698`](https://github.com/npm/cli/commit/3242fe698ead46a9cda94e1a4d489cd84a85d7e3) + `tar-stream@2.0.1` + ([@aeschright](https://github.com/aeschright)) + +## v6.9.0 (2019-02-20): ### FEATURES diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm index 5acd6fb61a7985..4183703a7857e9 100755 --- a/deps/npm/bin/npm +++ b/deps/npm/bin/npm @@ -8,6 +8,9 @@ case `uname` in esac NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE="$basedir/node" +fi if ! [ -x "$NODE_EXE" ]; then NODE_EXE=node fi diff --git a/deps/npm/doc/cli/npm-audit.md b/deps/npm/doc/cli/npm-audit.md index f63bbd356d5a03..10039ea09cbc1d 100644 --- a/deps/npm/doc/cli/npm-audit.md +++ b/deps/npm/doc/cli/npm-audit.md @@ -3,8 +3,10 @@ npm-audit(1) -- Run a security audit ## SYNOPSIS - npm audit [--json|--parseable] - npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=dev] + npm audit [--json|--parseable|--audit-level=(low|moderate|high|critical)] + npm audit fix [--force|--package-lock-only|--dry-run] + + common options: [--production] [--only=(dev|prod)] ## EXAMPLES @@ -60,6 +62,11 @@ To parse columns, you can use for example `awk`, and just print some of them: $ npm audit --parseable | awk -F $'\t' '{print $1,$4}' ``` +Fail an audit only if the results include a vulnerability with a level of moderate or higher: +``` +$ npm audit --audit-level=moderate +``` + ## DESCRIPTION The audit command submits a description of the dependencies configured in @@ -75,6 +82,12 @@ runs a full-fledged `npm install` under the hood, all configs that apply to the installer will also apply to `npm install` -- so things like `npm audit fix --package-lock-only` will work as expected. +By default, the audit command will exit with a non-zero code if any vulnerability +is found. It may be useful in CI environments to include the `--audit-level` parameter +to specify the minimum vulnerability level that will cause the command to fail. This +option does not filter the report output, it simply changes the command's failure +threshold. + ## CONTENT SUBMITTED * npm_version diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index 95e77d34c5f9f4..6324caf64a5179 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -648,7 +648,8 @@ If we define a package.json like this: we can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`. This file contains the dependencies `renderized` and `super-streams` which can be installed in a new project by executing `npm install -awesome-web-framework-1.0.0.tgz`. +awesome-web-framework-1.0.0.tgz`. Note that the package names do not include +any versions, as that information is specified in `dependencies`. If this is spelled `"bundleDependencies"`, then that is also honored. diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index c575f39bab31b7..47012985aaa8ac 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -118,5 +118,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index c0e7943d6b385b..910133c0562663 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -93,5 +93,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index a946f67f66c7a2..d2cbb013b19152 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -78,5 +78,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-audit.html b/deps/npm/html/doc/cli/npm-audit.html index 7d6704ab9c8d5a..158c90771923db 100644 --- a/deps/npm/html/doc/cli/npm-audit.html +++ b/deps/npm/html/doc/cli/npm-audit.html @@ -11,8 +11,10 @@

npm-audit

Run a security audit

SYNOPSIS

-
npm audit [--json|--parseable]
-npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=dev]

EXAMPLES

+
npm audit [--json|--parseable|--audit-level=(low|moderate|high|critical)]
+npm audit fix [--force|--package-lock-only|--dry-run]
+
+common options: [--production] [--only=(dev|prod)]

EXAMPLES

Scan your project for vulnerabilities and automatically install any compatible updates to vulnerable dependencies:

$ npm audit fix

Run audit fix without modifying node_modules, but still updating the @@ -29,7 +31,8 @@

SYNOPSIS

future reuse in scripting or command line post processing, like for example, selecting some of the columns printed:

$ npm audit --parseable

To parse columns, you can use for example awk, and just print some of them:

-
$ npm audit --parseable | awk -F $'\t' '{print $1,$4}'

DESCRIPTION

+
$ npm audit --parseable | awk -F $'\t' '{print $1,$4}'

Fail an audit only if the results include a vulnerability with a level of moderate or higher:

+
$ npm audit --audit-level=moderate

DESCRIPTION

The audit command submits a description of the dependencies configured in your project to your default registry and asks for a report of known vulnerabilities. The report returned includes instructions on how to act on @@ -41,6 +44,11 @@

SYNOPSIS

runs a full-fledged npm install under the hood, all configs that apply to the installer will also apply to npm install -- so things like npm audit fix --package-lock-only will work as expected.

+

By default, the audit command will exit with a non-zero code if any vulnerability +is found. It may be useful in CI environments to include the --audit-level parameter +to specify the minimum vulnerability level that will cause the command to fail. This +option does not filter the report output, it simply changes the command's failure +threshold.

CONTENT SUBMITTED

  • npm_version
  • @@ -86,4 +94,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 8f54ed9b880973..95320dce00ee3f 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -34,5 +34,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index a17bf56dcee08c..03574ee5536809 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -54,5 +54,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 2741074d8ac6a8..13179c5a618e1c 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -38,5 +38,5 @@

    DESCRIPTION

           - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 5d1633cc95b261..b5c2b9e300fee0 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index 20752e5cd8a852..4771ce622d8ede 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -88,5 +88,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ci.html b/deps/npm/html/doc/cli/npm-ci.html index 6aaeb38dd8715d..991420224ef2cf 100644 --- a/deps/npm/html/doc/cli/npm-ci.html +++ b/deps/npm/html/doc/cli/npm-ci.html @@ -58,4 +58,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 2ae26fc7c29037..83ac99c0d971ba 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -42,5 +42,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 15774d7d08ea7f..6f0dd2fb14eedd 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -62,5 +62,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 4f6809a033d2bc..e30d67aff35ba2 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -58,5 +58,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 1cfadf9d4afd50..70058325537956 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index ed45ae30b086e7..83c4cf30d6b19a 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -86,5 +86,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index ddcec196971fb7..16e058f01fc5a1 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -55,5 +55,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-doctor.html b/deps/npm/html/doc/cli/npm-doctor.html index 6c1b14473f6eb3..3f31a53fc0c414 100644 --- a/deps/npm/html/doc/cli/npm-doctor.html +++ b/deps/npm/html/doc/cli/npm-doctor.html @@ -102,4 +102,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index d2f7c360570404..a481ebe454d4d9 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -50,5 +50,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 7e01478228f06f..a84b5fcb8531cc 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -47,5 +47,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 2d962071cfbb35..6c52a7a61d47ae 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -44,5 +44,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index c17354b5227555..dd2853af546758 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -49,5 +49,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-hook.html b/deps/npm/html/doc/cli/npm-hook.html index f94caaf43d40a1..c045ede8bba3ce 100644 --- a/deps/npm/html/doc/cli/npm-hook.html +++ b/deps/npm/html/doc/cli/npm-hook.html @@ -52,4 +52,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 28c0f9dd897ff0..9a9d2111f18292 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -61,5 +61,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-install-ci-test.html b/deps/npm/html/doc/cli/npm-install-ci-test.html index 9ca6ea58fb546d..4ca0d5d7c15f31 100644 --- a/deps/npm/html/doc/cli/npm-install-ci-test.html +++ b/deps/npm/html/doc/cli/npm-install-ci-test.html @@ -32,4 +32,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html index d557499b988265..2ee900fbca32d9 100644 --- a/deps/npm/html/doc/cli/npm-install-test.html +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -41,5 +41,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index a40bea0ec3b115..7be073f6d4ea63 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -370,5 +370,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index c8d34a836e35eb..aa2967eaa0b70a 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -71,5 +71,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index de2a5e251756e8..2e581dbb898a06 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -49,5 +49,5 @@

    scope

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index a7ddb36dd97d9a..2954c94e3ca917 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -20,7 +20,7 @@

    SYNOPSIS

    limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

    -
    npm@6.9.0 /path/to/npm
    +
    npm@6.10.0 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5

    It will print out extraneous, missing, and invalid packages.

    If a project specifies git urls for dependencies these are shown @@ -108,5 +108,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-org.html b/deps/npm/html/doc/cli/npm-org.html index 388e5e0314af3a..d445b9b59aaccc 100644 --- a/deps/npm/html/doc/cli/npm-org.html +++ b/deps/npm/html/doc/cli/npm-org.html @@ -40,4 +40,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index e97c77615d0083..609215f738a141 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -116,5 +116,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index f585a6ecdb3ba2..b9eea1cf0f7562 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -53,5 +53,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index 069142c16b07bf..bff180a4959c62 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -42,5 +42,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 3dc24076901524..d3de0489aadfd1 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -33,5 +33,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 4728dd54fad2f7..6a1fd3bc2bc418 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-profile.html b/deps/npm/html/doc/cli/npm-profile.html index c6ff5bfdc9d8aa..22d2f5411bba41 100644 --- a/deps/npm/html/doc/cli/npm-profile.html +++ b/deps/npm/html/doc/cli/npm-profile.html @@ -88,4 +88,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index b481868d0f519b..62e61cae6d029f 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -47,5 +47,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 01d14c06b27b11..616afb8fd6ef6a 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -87,5 +87,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 56317bcdab5c74..4b9e278421573b 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -34,5 +34,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index 446b0d71797faf..a786565b8d7847 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -40,5 +40,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 996fd6eb2db656..1986acc6673a54 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -52,5 +52,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index bfa4dfedbf60ea..a6f141691aa3b1 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -34,5 +34,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index d53b1c6e504caa..fe3bccf53e7d5d 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -79,5 +79,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 7ca9d17b5b9b0d..cad2cdbd7f2249 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -108,5 +108,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index d283e2b957f088..e57b205e1b0719 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -40,5 +40,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 2e91b493f82dc1..a93bee702e17ae 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -35,5 +35,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index e8dfddf7a72f5b..c9ee96f08b4d4c 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -35,5 +35,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 015b4a2d19418b..2410c5963b3764 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -38,5 +38,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index b556e92e7a37e5..dba0e0721a4679 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -33,5 +33,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index c2e263bedfd6e3..27e96f20f2f105 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -69,5 +69,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index bfe820357f5977..623f64c4b01d71 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -35,5 +35,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-token.html b/deps/npm/html/doc/cli/npm-token.html index 40243cb8f1e1af..19db21095a64c5 100644 --- a/deps/npm/html/doc/cli/npm-token.html +++ b/deps/npm/html/doc/cli/npm-token.html @@ -81,4 +81,4 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 6dde7e8732cf33..f541343aed6180 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -60,5 +60,5 @@

    SYNOPSIS

           - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 5ae2b1d4ed409c..41ea41e26fa102 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -52,5 +52,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index aadc8be86f2cde..b8cd1c95885ffe 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -100,5 +100,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index 856b0169ab83fe..7aac9d7058f59e 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -116,5 +116,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 99dd45e4d25191..777d9bb8f17b7c 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -75,5 +75,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 0821a2e79aaad1..1c2908bad213f7 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -32,5 +32,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 62b316ee32c195..bc2bce9db2d6e9 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -12,7 +12,7 @@

    npm

    javascript package manager

    SYNOPSIS

    npm <command> [args]

    VERSION

    -

    6.9.0

    +

    6.10.0

    DESCRIPTION

    npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -130,7 +130,7 @@

    AUTHOR

    Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

    +i@izs.me

    SEE ALSO

    • npm-help(1)
    • @@ -154,5 +154,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index 29cb39165bf379..858b854a7dd2bc 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -179,5 +179,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 29cb39165bf379..858b854a7dd2bc 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -179,5 +179,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 971b953e2bf74e..844ba63e97530d 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -462,7 +462,8 @@

      bundledDependencies

      }

    we can obtain awesome-web-framework-1.0.0.tgz file by running npm pack. This file contains the dependencies renderized and super-streams which can be installed in a new project by executing npm install -awesome-web-framework-1.0.0.tgz.

    +awesome-web-framework-1.0.0.tgz. Note that the package names do not include +any versions, as that information is specified in dependencies.

    If this is spelled "bundleDependencies", then that is also honored.

    optionalDependencies

    If a dependency can be used, but you would like npm to proceed if it cannot be @@ -580,5 +581,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-package-locks.html b/deps/npm/html/doc/files/npm-package-locks.html index 710de851688d50..050ae982bba98f 100644 --- a/deps/npm/html/doc/files/npm-package-locks.html +++ b/deps/npm/html/doc/files/npm-package-locks.html @@ -154,4 +154,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npm-shrinkwrap.json.html b/deps/npm/html/doc/files/npm-shrinkwrap.json.html index 32611487b194bb..2c3093eb376fbc 100644 --- a/deps/npm/html/doc/files/npm-shrinkwrap.json.html +++ b/deps/npm/html/doc/files/npm-shrinkwrap.json.html @@ -42,4 +42,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index be34fab224e94a..ce6e68b84536e8 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -82,5 +82,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/package-lock.json.html b/deps/npm/html/doc/files/package-lock.json.html index 147a8330f3b886..344f256c229753 100644 --- a/deps/npm/html/doc/files/package-lock.json.html +++ b/deps/npm/html/doc/files/package-lock.json.html @@ -130,4 +130,4 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 971b953e2bf74e..844ba63e97530d 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -462,7 +462,8 @@

    bundledDependencies

    }

    we can obtain awesome-web-framework-1.0.0.tgz file by running npm pack. This file contains the dependencies renderized and super-streams which can be installed in a new project by executing npm install -awesome-web-framework-1.0.0.tgz.

    +awesome-web-framework-1.0.0.tgz. Note that the package names do not include +any versions, as that information is specified in dependencies.

    If this is spelled "bundleDependencies", then that is also honored.

    optionalDependencies

    If a dependency can be used, but you would like npm to proceed if it cannot be @@ -580,5 +581,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index a7d1957a18fe08..0e08507df63107 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -182,5 +182,5 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 8c4f2ccde49afe..58794d281cf712 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -145,5 +145,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index 505c5784cd9ab3..2382d3f7e3cdda 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -1078,5 +1078,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 7d9efe052173a8..5fa7f9beb12e22 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -198,5 +198,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index da2e42eb5430ae..6cffc43cf8006a 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -20,7 +20,7 @@

    npm-disputes

    Handling Module

    TL;DR

    1. Get the author email with npm owner ls <pkgname>
    2. -
    3. Email the author, CC support@npmjs.com
    4. +
    5. Email the author, CC support@npmjs.com
    6. After a few weeks, if there's no resolution, we'll sort it out.

    Don't squat on package names. Publish code or move out of the way.

    @@ -58,13 +58,13 @@

    DESCRIPTION

  • Alice emails Yusuf, explaining the situation as respectfully as possible, and what she would like to do with the module name. She adds the npm support -staff support@npmjs.com to the CC list of the email. Mention in the email +staff support@npmjs.com to the CC list of the email. Mention in the email that Yusuf can run npm owner add alice foo to add Alice as an owner of the foo package.

  • After a reasonable amount of time, if Yusuf has not responded, or if Yusuf and Alice can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks.)

  • @@ -101,12 +101,12 @@

    EXCEPTIONS

    Code of Conduct such as hateful language, pornographic content, or harassment. -

    If you see bad behavior like this, please report it to abuse@npmjs.com right +

    If you see bad behavior like this, please report it to abuse@npmjs.com right away. You are never expected to resolve abusive behavior on your own. We are here to help.

    TRADEMARKS

    If you think another npm publisher is infringing your trademark, such as by -using a confusingly similar package name, email abuse@npmjs.com with a link to +using a confusingly similar package name, email abuse@npmjs.com with a link to the package or user account on https://www.npmjs.com/. Attach a copy of your trademark registration certificate.

    If we see that the package's publisher is intentionally misleading others by @@ -139,5 +139,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 0131ba430566cd..2ac27e8b70f2ca 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -182,5 +182,5 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index d85cb06151bb89..ecde3910f4de78 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -77,5 +77,5 @@

    Team Admins create teams

           - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index 62db998578e524..cd6ee23c5e2d49 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -96,5 +96,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index a64f606bbb0e29..1347fb504c9c09 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -93,5 +93,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 721569c915bcb1..ede8fb55fb9333 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -234,5 +234,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index e3c90651991a27..b213fc834b855d 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -52,5 +52,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index a5c5f798ab8dce..d8f8a81cac7fc2 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -361,5 +361,5 @@

    Coercion

           - + diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js index e1c221032568d6..cf82ff5b04915e 100644 --- a/deps/npm/lib/adduser.js +++ b/deps/npm/lib/adduser.js @@ -1,9 +1,9 @@ module.exports = adduser -var log = require('npmlog') -var npm = require('./npm.js') -var usage = require('./utils/usage') -var crypto +const log = require('npmlog') +const npm = require('./npm.js') +const usage = require('./utils/usage') +let crypto try { crypto = require('crypto') @@ -21,20 +21,21 @@ function adduser (args, cb) { )) } - var registry = npm.config.get('registry') - var scope = npm.config.get('scope') - var creds = npm.config.getCredentialsByURI(npm.config.get('registry')) + let registry = npm.config.get('registry') + const scope = npm.config.get('scope') + const creds = npm.config.getCredentialsByURI(npm.config.get('registry')) if (scope) { - var scopedRegistry = npm.config.get(scope + ':registry') - var cliRegistry = npm.config.get('registry', 'cli') + const scopedRegistry = npm.config.get(scope + ':registry') + const cliRegistry = npm.config.get('registry', 'cli') if (scopedRegistry && !cliRegistry) registry = scopedRegistry } log.disableProgress() + let auth try { - var auth = require('./auth/' + npm.config.get('auth-type')) + auth = require('./auth/' + npm.config.get('auth-type')) } catch (e) { return cb(new Error('no such auth module')) } diff --git a/deps/npm/lib/audit.js b/deps/npm/lib/audit.js index 2cabef9d27d0d3..37b54d6eca1400 100644 --- a/deps/npm/lib/audit.js +++ b/deps/npm/lib/audit.js @@ -39,7 +39,7 @@ module.exports = auditCmd const usage = require('./utils/usage') auditCmd.usage = usage( 'audit', - '\nnpm audit [--json]' + + '\nnpm audit [--json] [--production]' + '\nnpm audit fix ' + '[--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]' ) @@ -175,7 +175,7 @@ function auditCmd (args, cb) { const requires = Object.assign( {}, (pkgJson && pkgJson.dependencies) || {}, - (pkgJson && pkgJson.devDependencies) || {} + (!opts.production && pkgJson && pkgJson.devDependencies) || {} ) return lockVerify(npm.prefix).then((result) => { if (result.status) return audit.generate(sw, requires) diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js index 197b71962500e3..bb4c346f9a6547 100644 --- a/deps/npm/lib/outdated.js +++ b/deps/npm/lib/outdated.js @@ -101,7 +101,10 @@ function outdated (args, silent, cb) { return aa[0].path.localeCompare(bb[0].path) || aa[1].localeCompare(bb[1]) }) - if (er || silent || list.length === 0) return cb(er, list) + if (er || silent || + (list.length === 0 && !opts.json)) { + return cb(er, list) + } if (opts.json) { output(makeJSON(list, opts)) } else if (opts.parseable) { @@ -129,7 +132,7 @@ function outdated (args, silent, cb) { } output(table(outTable, tableOpts)) } - process.exitCode = 1 + process.exitCode = list.length ? 1 : 0 cb(null, list.map(function (item) { return [item[0].parent.path].concat(item.slice(1, 7)) })) }) })) @@ -149,7 +152,7 @@ function makePretty (p, opts) { has || 'MISSING', want, latest, - deppath + deppath || 'global' ] if (long) { columns[5] = type @@ -366,6 +369,8 @@ function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, opts, cb, type return doIt('git', 'git') } else if (parsed.type === 'file') { return updateLocalDeps() + } else if (parsed.type === 'remote') { + return doIt('remote', 'remote') } else { return packument(parsed, opts.concat({ 'prefer-online': true diff --git a/deps/npm/lib/token.js b/deps/npm/lib/token.js index 326f98ec7ef877..9b1fbef9cecf44 100644 --- a/deps/npm/lib/token.js +++ b/deps/npm/lib/token.js @@ -5,6 +5,7 @@ const npm = require('./npm.js') const figgyPudding = require('figgy-pudding') const npmConfig = require('./config/figgy-config.js') const output = require('./utils/output.js') +const otplease = require('./utils/otplease.js') const Table = require('cli-table3') const Bluebird = require('bluebird') const isCidrV4 = require('is-cidr').v4 @@ -80,6 +81,7 @@ function generateTokenIds (tokens, minLength) { } const TokenConfig = figgyPudding({ + auth: {}, registry: {}, otp: {}, cidr: {}, @@ -185,13 +187,8 @@ function rm (args) { } }) return Bluebird.map(toRemove, (key) => { - return profile.removeToken(key, conf).catch((ex) => { - if (ex.code !== 'EOTP') throw ex - log.info('token', 'failed because revoking this token requires OTP') - return readUserInfo.otp().then((otp) => { - conf.auth.otp = otp - return profile.removeToken(key, conf) - }) + return otplease(conf, conf => { + return profile.removeToken(key, conf) }) }) })).then(() => { @@ -213,15 +210,9 @@ function create (args) { const validCIDR = validateCIDRList(cidr) return readUserInfo.password().then((password) => { log.info('token', 'creating') - return profile.createToken(password, readonly, validCIDR, conf).catch((ex) => { - if (ex.code !== 'EOTP') throw ex - log.info('token', 'failed because it requires OTP') - return readUserInfo.otp().then((otp) => { - conf.auth.otp = otp - log.info('token', 'creating with OTP') - return pulseTillDone.withPromise(profile.createToken(password, readonly, validCIDR, conf)) - }) - }) + return pulseTillDone.withPromise(otplease(conf, conf => { + return profile.createToken(password, readonly, validCIDR, conf) + })) }).then((result) => { delete result.key delete result.updated diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js index d527778e92b07c..3e115b6999b2cd 100644 --- a/deps/npm/lib/unbuild.js +++ b/deps/npm/lib/unbuild.js @@ -58,7 +58,9 @@ function rmStuff (pkg, folder, cb) { // if it's global, and folder is in {prefix}/node_modules, // then bins are in {prefix}/bin // otherwise, then bins are in folder/../.bin - var parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder) + var dir = path.dirname(folder) + var scope = path.basename(dir) + var parent = scope.charAt(0) === '@' ? path.dirname(dir) : dir var gnm = npm.dir // gnm might be an absolute path, parent might be relative // this checks they're the same directory regardless diff --git a/deps/npm/lib/unpublish.js b/deps/npm/lib/unpublish.js index bf5867a2687f9d..203c8b592f1099 100644 --- a/deps/npm/lib/unpublish.js +++ b/deps/npm/lib/unpublish.js @@ -99,7 +99,7 @@ function unpublish (args, cb) { }).then( ret => { if (!opts.silent && opts.loglevel !== 'silent') { - output(`-${spec.name}${ + output(`- ${spec.name}${ spec.type === 'version' ? `@${spec.rawSpec}` : '' }`) } diff --git a/deps/npm/lib/utils/unsupported.js b/deps/npm/lib/utils/unsupported.js index bfed5cdbea6343..20cee157ee4038 100644 --- a/deps/npm/lib/utils/unsupported.js +++ b/deps/npm/lib/utils/unsupported.js @@ -8,7 +8,7 @@ var supportedNode = [ {ver: '11', min: '11.0.0'}, {ver: '12', min: '12.0.0'} ] -var knownBroken = '<4.7.0' +var knownBroken = '<6.0.0' var checkVersion = exports.checkVersion = function (version) { var versionNoPrerelease = version.replace(/-.*$/, '') diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js index 265b049bf39146..0f1e97aedd4038 100644 --- a/deps/npm/lib/version.js +++ b/deps/npm/lib/version.js @@ -301,7 +301,7 @@ function _commit (version, localData, cb) { ...(signCommit ? ['-S', '-m'] : ['-m']), message ]) - const flagForTag = signTag ? '-sm' : '-am' + const flagForTag = signTag ? '-sm' : '-m' stagePackageFiles(localData, options).then(() => { return git.exec(commitArgs, options) diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js index fc10a2f4ac4616..a16884e25f647f 100644 --- a/deps/npm/lib/view.js +++ b/deps/npm/lib/view.js @@ -185,6 +185,7 @@ function fetchAndRead (nv, args, silent, opts, cb) { } if (silent) { + return retval } else if (error) { throw error } else if ( diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index eae02b063e4acb..712dc334054500 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "April 2019" "" "" +.TH "NPM" "1" "July 2019" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 945eb7beb83296..43d614303469fd 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ACCESS" "1" "April 2019" "" "" +.TH "NPM\-ACCESS" "1" "July 2019" "" "" .SH "NAME" \fBnpm-access\fR \- Set access level on published packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 2bb38a51034307..8007f5e8bed954 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ADDUSER" "1" "April 2019" "" "" +.TH "NPM\-ADDUSER" "1" "July 2019" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1 index eec47cc6106c45..71797e881702dc 100644 --- a/deps/npm/man/man1/npm-audit.1 +++ b/deps/npm/man/man1/npm-audit.1 @@ -1,12 +1,14 @@ -.TH "NPM\-AUDIT" "1" "April 2019" "" "" +.TH "NPM\-AUDIT" "1" "July 2019" "" "" .SH "NAME" \fBnpm-audit\fR \- Run a security audit .SH SYNOPSIS .P .RS 2 .nf -npm audit [\-\-json|\-\-parseable] -npm audit fix [\-\-force|\-\-package\-lock\-only|\-\-dry\-run|\-\-production|\-\-only=dev] +npm audit [\-\-json|\-\-parseable|\-\-audit\-level=(low|moderate|high|critical)] +npm audit fix [\-\-force|\-\-package\-lock\-only|\-\-dry\-run] + +common options: [\-\-production] [\-\-only=(dev|prod)] .fi .RE .SH EXAMPLES @@ -89,6 +91,14 @@ To parse columns, you can use for example \fBawk\fP, and just print some of them $ npm audit \-\-parseable | awk \-F $'\\t' '{print $1,$4}' .fi .RE +.P +Fail an audit only if the results include a vulnerability with a level of moderate or higher: +.P +.RS 2 +.nf +$ npm audit \-\-audit\-level=moderate +.fi +.RE .SH DESCRIPTION .P The audit command submits a description of the dependencies configured in @@ -103,6 +113,12 @@ will require manual intervention or review\. Also note that since \fBnpm audit f runs a full\-fledged \fBnpm install\fP under the hood, all configs that apply to the installer will also apply to \fBnpm install\fP \-\- so things like \fBnpm audit fix \-\-package\-lock\-only\fP will work as expected\. +.P +By default, the audit command will exit with a non\-zero code if any vulnerability +is found\. It may be useful in CI environments to include the \fB\-\-audit\-level\fP parameter +to specify the minimum vulnerability level that will cause the command to fail\. This +option does not filter the report output, it simply changes the command's failure +threshold\. .SH CONTENT SUBMITTED .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index 2d8637a8e43b32..156431893faa32 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "1" "April 2019" "" "" +.TH "NPM\-BIN" "1" "July 2019" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index c998bc7ab11cd7..4cb0c04871388d 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "1" "April 2019" "" "" +.TH "NPM\-BUGS" "1" "July 2019" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index eb1805c03fa2f1..6e182c8a4859e8 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUILD" "1" "April 2019" "" "" +.TH "NPM\-BUILD" "1" "July 2019" "" "" .SH "NAME" \fBnpm-build\fR \- Build a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index 2db52304628311..0b8b56edb05f8f 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUNDLE" "1" "April 2019" "" "" +.TH "NPM\-BUNDLE" "1" "July 2019" "" "" .SH "NAME" \fBnpm-bundle\fR \- REMOVED .SH DESCRIPTION diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 7e5c1a3e2fe090..56f95549716603 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "1" "April 2019" "" "" +.TH "NPM\-CACHE" "1" "July 2019" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1 index 38ca0a98c11d83..00a57596bdcf65 100644 --- a/deps/npm/man/man1/npm-ci.1 +++ b/deps/npm/man/man1/npm-ci.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CI" "1" "April 2019" "" "" +.TH "NPM\-CI" "1" "July 2019" "" "" .SH "NAME" \fBnpm-ci\fR \- Install a project with a clean slate .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 146530b3ce7209..c98b0023c1f09f 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM\-COMPLETION" "1" "April 2019" "" "" +.TH "NPM\-COMPLETION" "1" "July 2019" "" "" .SH "NAME" \fBnpm-completion\fR \- Tab Completion for npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index 5e536a1d22493a..c8276d4efd80d1 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "1" "April 2019" "" "" +.TH "NPM\-CONFIG" "1" "July 2019" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index ebf213ca6bf56c..21abb7e9ad224b 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEDUPE" "1" "April 2019" "" "" +.TH "NPM\-DEDUPE" "1" "July 2019" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index 1377ec9c3555af..85b8271945d155 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "1" "April 2019" "" "" +.TH "NPM\-DEPRECATE" "1" "July 2019" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index d67a53495f7f85..38da277eb10fe4 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DIST\-TAG" "1" "April 2019" "" "" +.TH "NPM\-DIST\-TAG" "1" "July 2019" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index ee58b71d803b84..cc086e24dbb351 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "1" "April 2019" "" "" +.TH "NPM\-DOCS" "1" "July 2019" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 index aba0f578d9ba40..e4eb1be82c834b 100644 --- a/deps/npm/man/man1/npm-doctor.1 +++ b/deps/npm/man/man1/npm-doctor.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCTOR" "1" "April 2019" "" "" +.TH "NPM\-DOCTOR" "1" "July 2019" "" "" .SH "NAME" \fBnpm-doctor\fR \- Check your environments .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 9753278c9ad5d9..dbe7e22c359900 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "1" "April 2019" "" "" +.TH "NPM\-EDIT" "1" "July 2019" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index a6389663c4db41..d6df2d46403bca 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "1" "April 2019" "" "" +.TH "NPM\-EXPLORE" "1" "July 2019" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index b05b383c589d49..72bf6193b9d6d4 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "1" "April 2019" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "July 2019" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search npm help documentation .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index 271aba9fb7b60a..8dde64b7f560c8 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP" "1" "April 2019" "" "" +.TH "NPM\-HELP" "1" "July 2019" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-hook.1 b/deps/npm/man/man1/npm-hook.1 index e0704282f9b29e..edf0b818998268 100644 --- a/deps/npm/man/man1/npm-hook.1 +++ b/deps/npm/man/man1/npm-hook.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HOOK" "1" "April 2019" "" "" +.TH "NPM\-HOOK" "1" "July 2019" "" "" .SH "NAME" \fBnpm-hook\fR \- Manage registry hooks .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 76679d3e04f72e..172e686f4ac046 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INIT" "1" "April 2019" "" "" +.TH "NPM\-INIT" "1" "July 2019" "" "" .SH "NAME" \fBnpm-init\fR \- create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1 index 94728fcea37b24..081b3a723e47ad 100644 --- a/deps/npm/man/man1/npm-install-ci-test.1 +++ b/deps/npm/man/man1/npm-install-ci-test.1 @@ -1,4 +1,4 @@ -.TH "NPM" "" "April 2019" "" "" +.TH "NPM" "" "July 2019" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index de89170931a98d..0930df6ba9b75a 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM" "" "April 2019" "" "" +.TH "NPM" "" "July 2019" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 76d8551f13104f..d712d55448905f 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "1" "April 2019" "" "" +.TH "NPM\-INSTALL" "1" "July 2019" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index cf9f94c09421fe..1f78f997a2f29e 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "1" "April 2019" "" "" +.TH "NPM\-LINK" "1" "July 2019" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 44ef755c7e094a..9c29363af9f56e 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LOGOUT" "1" "April 2019" "" "" +.TH "NPM\-LOGOUT" "1" "July 2019" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index f677d014487daa..ab7d2a7d3213f3 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "1" "April 2019" "" "" +.TH "NPM\-LS" "1" "July 2019" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@6.9.0 /path/to/npm +npm@6.10.0 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1 index 5c7dc7fce2c8e2..225e474eccbd00 100644 --- a/deps/npm/man/man1/npm-org.1 +++ b/deps/npm/man/man1/npm-org.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ORG" "1" "April 2019" "" "" +.TH "NPM\-ORG" "1" "July 2019" "" "" .SH "NAME" \fBnpm-org\fR \- Manage orgs .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 96f1fdd4021bc2..00d28b346e6514 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "1" "April 2019" "" "" +.TH "NPM\-OUTDATED" "1" "July 2019" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 5fb90d0d6dae3a..638efec77bd8c0 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "1" "April 2019" "" "" +.TH "NPM\-OWNER" "1" "July 2019" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index c566b04c2fe4d6..b489794eaff9d9 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "1" "April 2019" "" "" +.TH "NPM\-PACK" "1" "July 2019" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index daa291a789dfe4..1e337c34a1a237 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "1" "April 2019" "" "" +.TH "NPM\-PING" "1" "July 2019" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index cee44de38a56a0..ebc388f66ff7a0 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "1" "April 2019" "" "" +.TH "NPM\-PREFIX" "1" "July 2019" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1 index 6f005a5457b778..be92745f80afd3 100644 --- a/deps/npm/man/man1/npm-profile.1 +++ b/deps/npm/man/man1/npm-profile.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PROFILE" "1" "April 2019" "" "" +.TH "NPM\-PROFILE" "1" "July 2019" "" "" .SH "NAME" \fBnpm-profile\fR \- Change settings on your registry profile .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 85985868c6e01e..4ae73a54b1b9be 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "1" "April 2019" "" "" +.TH "NPM\-PRUNE" "1" "July 2019" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 4929b992671cb4..e8d6c6afee8358 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "1" "April 2019" "" "" +.TH "NPM\-PUBLISH" "1" "July 2019" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 5340db8040cd38..34f0e2d6ae3890 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "1" "April 2019" "" "" +.TH "NPM\-REBUILD" "1" "July 2019" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index b231846a015b80..cc9e6faf82fef6 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "1" "April 2019" "" "" +.TH "NPM\-REPO" "1" "July 2019" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index bd56e55636a367..e0d7dbe4345c1d 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "1" "April 2019" "" "" +.TH "NPM\-RESTART" "1" "July 2019" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 3f2397ce83ba8b..5a49b654a7ee31 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "1" "April 2019" "" "" +.TH "NPM\-ROOT" "1" "July 2019" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 3e01ee5a8a8be4..1310bb97edf155 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "1" "April 2019" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "July 2019" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index 7848196a6a7c14..b5ab90baf22064 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "1" "April 2019" "" "" +.TH "NPM\-SEARCH" "1" "July 2019" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index 4cf6aa8ca1ac06..7b78c53ec66b33 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "1" "April 2019" "" "" +.TH "NPM\-SHRINKWRAP" "1" "July 2019" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index f33a5f0a373a91..462aeb710c5aee 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STAR" "1" "April 2019" "" "" +.TH "NPM\-STAR" "1" "July 2019" "" "" .SH "NAME" \fBnpm-star\fR \- Mark your favorite packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index 88d772959b0a01..d03616448cb661 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STARS" "1" "April 2019" "" "" +.TH "NPM\-STARS" "1" "July 2019" "" "" .SH "NAME" \fBnpm-stars\fR \- View packages marked as favorites .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index 7dfdab90c428a7..cb4dee2ac0b2df 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "1" "April 2019" "" "" +.TH "NPM\-START" "1" "July 2019" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index a3a6fc197924cf..404fd3d539f9aa 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "1" "April 2019" "" "" +.TH "NPM\-STOP" "1" "July 2019" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 2432975058b6e3..378d6ecab3399d 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEAM" "1" "April 2019" "" "" +.TH "NPM\-TEAM" "1" "July 2019" "" "" .SH "NAME" \fBnpm-team\fR \- Manage organization teams and team memberships .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 3ee843dfacdcf2..37783d4ec2d2fe 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "1" "April 2019" "" "" +.TH "NPM\-TEST" "1" "July 2019" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1 index bde5a09d649cfd..71eb50db219453 100644 --- a/deps/npm/man/man1/npm-token.1 +++ b/deps/npm/man/man1/npm-token.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TOKEN" "1" "April 2019" "" "" +.TH "NPM\-TOKEN" "1" "July 2019" "" "" .SH "NAME" \fBnpm-token\fR \- Manage your authentication tokens .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 2c7f3a6f0f7040..feca2bf47cfe48 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNINSTALL" "1" "April 2019" "" "" +.TH "NPM\-UNINSTALL" "1" "July 2019" "" "" .SH "NAME" \fBnpm-uninstall\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 595fe88738aedf..6cbf125fcd85dd 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "1" "April 2019" "" "" +.TH "NPM\-UNPUBLISH" "1" "July 2019" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index ab33386c61f614..78d59cab5f31cb 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "1" "April 2019" "" "" +.TH "NPM\-UPDATE" "1" "July 2019" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 25cffbbff8cde7..c48ccec8927c03 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "1" "April 2019" "" "" +.TH "NPM\-VERSION" "1" "July 2019" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index ce8857f321d4a0..f9a15d24af2a77 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "1" "April 2019" "" "" +.TH "NPM\-VIEW" "1" "July 2019" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index 986f3ebb4e3644..32486d041c8aea 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "1" "April 2019" "" "" +.TH "NPM\-WHOAMI" "1" "July 2019" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index ccfed2c63317b7..ad3255ce2a5d04 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "April 2019" "" "" +.TH "NPM" "1" "July 2019" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -6.9.0 +6.10.0 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index e75396131d9e24..5cd6ae97cef957 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "April 2019" "" "" +.TH "NPM\-FOLDERS" "5" "July 2019" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index e75396131d9e24..5cd6ae97cef957 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "April 2019" "" "" +.TH "NPM\-FOLDERS" "5" "July 2019" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 16dc4616f88d71..2698f762853fad 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "April 2019" "" "" +.TH "PACKAGE\.JSON" "5" "July 2019" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -791,7 +791,8 @@ If we define a package\.json like this: we can obtain \fBawesome\-web\-framework\-1\.0\.0\.tgz\fP file by running \fBnpm pack\fP\|\. This file contains the dependencies \fBrenderized\fP and \fBsuper\-streams\fP which can be installed in a new project by executing \fBnpm install -awesome\-web\-framework\-1\.0\.0\.tgz\fP\|\. +awesome\-web\-framework\-1\.0\.0\.tgz\fP\|\. Note that the package names do not include +any versions, as that information is specified in \fBdependencies\fP\|\. .P If this is spelled \fB"bundleDependencies"\fP, then that is also honored\. .SH optionalDependencies diff --git a/deps/npm/man/man5/npm-package-locks.5 b/deps/npm/man/man5/npm-package-locks.5 index 051cea22ade45c..fb0727c449457a 100644 --- a/deps/npm/man/man5/npm-package-locks.5 +++ b/deps/npm/man/man5/npm-package-locks.5 @@ -1,4 +1,4 @@ -.TH "NPM\-PACKAGE\-LOCKS" "5" "April 2019" "" "" +.TH "NPM\-PACKAGE\-LOCKS" "5" "July 2019" "" "" .SH "NAME" \fBnpm-package-locks\fR \- An explanation of npm lockfiles .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-shrinkwrap.json.5 b/deps/npm/man/man5/npm-shrinkwrap.json.5 index 3cccbadeadb3a3..e56e3592d6c1b9 100644 --- a/deps/npm/man/man5/npm-shrinkwrap.json.5 +++ b/deps/npm/man/man5/npm-shrinkwrap.json.5 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP\.JSON" "5" "April 2019" "" "" +.TH "NPM\-SHRINKWRAP\.JSON" "5" "July 2019" "" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR \- A publishable lockfile .SH DESCRIPTION diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 9df0fcc4f58253..36db2353492f14 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "April 2019" "" "" +.TH "NPMRC" "5" "July 2019" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package-lock.json.5 b/deps/npm/man/man5/package-lock.json.5 index a3430959f2ddce..4af9c6601056c0 100644 --- a/deps/npm/man/man5/package-lock.json.5 +++ b/deps/npm/man/man5/package-lock.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\-LOCK\.JSON" "5" "April 2019" "" "" +.TH "PACKAGE\-LOCK\.JSON" "5" "July 2019" "" "" .SH "NAME" \fBpackage-lock.json\fR \- A manifestation of the manifest .SH DESCRIPTION diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index 16dc4616f88d71..2698f762853fad 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "April 2019" "" "" +.TH "PACKAGE\.JSON" "5" "July 2019" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -791,7 +791,8 @@ If we define a package\.json like this: we can obtain \fBawesome\-web\-framework\-1\.0\.0\.tgz\fP file by running \fBnpm pack\fP\|\. This file contains the dependencies \fBrenderized\fP and \fBsuper\-streams\fP which can be installed in a new project by executing \fBnpm install -awesome\-web\-framework\-1\.0\.0\.tgz\fP\|\. +awesome\-web\-framework\-1\.0\.0\.tgz\fP\|\. Note that the package names do not include +any versions, as that information is specified in \fBdependencies\fP\|\. .P If this is spelled \fB"bundleDependencies"\fP, then that is also honored\. .SH optionalDependencies diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index 43fb70d4e3d09a..fa752839f999e0 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CODING\-STYLE" "7" "April 2019" "" "" +.TH "NPM\-CODING\-STYLE" "7" "July 2019" "" "" .SH "NAME" \fBnpm-coding-style\fR \- npm's "funny" coding style .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 2d6fb12b980909..97075db38b6e87 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "7" "April 2019" "" "" +.TH "NPM\-CONFIG" "7" "July 2019" "" "" .SH "NAME" \fBnpm-config\fR \- More than you probably want to know about npm configuration .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7 index 1978b71c012b8c..8132648ba37d3a 100644 --- a/deps/npm/man/man7/npm-developers.7 +++ b/deps/npm/man/man7/npm-developers.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DEVELOPERS" "7" "April 2019" "" "" +.TH "NPM\-DEVELOPERS" "7" "July 2019" "" "" .SH "NAME" \fBnpm-developers\fR \- Developer Guide .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index be22130c6ba710..d2802afddecb8e 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DISPUTES" "7" "April 2019" "" "" +.TH "NPM\-DISPUTES" "7" "July 2019" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .P diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index 42d5d12694e093..3642af8a27cb38 100644 --- a/deps/npm/man/man7/npm-index.7 +++ b/deps/npm/man/man7/npm-index.7 @@ -1,4 +1,4 @@ -.TH "NPM\-INDEX" "7" "April 2019" "" "" +.TH "NPM\-INDEX" "7" "July 2019" "" "" .SH "NAME" \fBnpm-index\fR \- Index of all npm documentation .SS npm help README diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7 index 730ee1bca4e2c2..56b51e2e4c916e 100644 --- a/deps/npm/man/man7/npm-orgs.7 +++ b/deps/npm/man/man7/npm-orgs.7 @@ -1,4 +1,4 @@ -.TH "NPM\-ORGS" "7" "April 2019" "" "" +.TH "NPM\-ORGS" "7" "July 2019" "" "" .SH "NAME" \fBnpm-orgs\fR \- Working with Teams & Orgs .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index 2798f9b95c1ff4..e3d2c7e7aa51e4 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REGISTRY" "7" "April 2019" "" "" +.TH "NPM\-REGISTRY" "7" "July 2019" "" "" .SH "NAME" \fBnpm-registry\fR \- The JavaScript Package Registry .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 index ff04169eac7c0a..6b325a9bf01180 100644 --- a/deps/npm/man/man7/npm-scope.7 +++ b/deps/npm/man/man7/npm-scope.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCOPE" "7" "April 2019" "" "" +.TH "NPM\-SCOPE" "7" "July 2019" "" "" .SH "NAME" \fBnpm-scope\fR \- Scoped packages .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index bd6bc9dcd26776..7fe3254ed32188 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCRIPTS" "7" "April 2019" "" "" +.TH "NPM\-SCRIPTS" "7" "July 2019" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index b55ece9bb2b1ab..fde6250b489f29 100644 --- a/deps/npm/man/man7/removing-npm.7 +++ b/deps/npm/man/man7/removing-npm.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REMOVAL" "1" "April 2019" "" "" +.TH "NPM\-REMOVAL" "1" "July 2019" "" "" .SH "NAME" \fBnpm-removal\fR \- Cleaning the Slate .SH SYNOPSIS diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index 85f300c4d99737..cd5bdde92bcbd6 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "April 2019" "" "" +.TH "SEMVER" "7" "July 2019" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Install diff --git a/deps/npm/node_modules/bluebird/js/browser/bluebird.core.js b/deps/npm/node_modules/bluebird/js/browser/bluebird.core.js index ca7933d1a973de..0121a4bea78e10 100644 --- a/deps/npm/node_modules/bluebird/js/browser/bluebird.core.js +++ b/deps/npm/node_modules/bluebird/js/browser/bluebird.core.js @@ -23,7 +23,7 @@ * */ /** - * bluebird build version 3.5.3 + * bluebird build version 3.5.5 * Features enabled: core * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each */ @@ -1214,8 +1214,8 @@ function parseLineInfo(line) { function setBounds(firstLineError, lastLineError) { if (!longStackTracesIsSupported()) return; - var firstStackLines = firstLineError.stack.split("\n"); - var lastStackLines = lastLineError.stack.split("\n"); + var firstStackLines = (firstLineError.stack || "").split("\n"); + var lastStackLines = (lastLineError.stack || "").split("\n"); var firstIndex = -1; var lastIndex = -1; var firstFileName; @@ -2238,6 +2238,11 @@ Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { } catchInstances.length = j; fn = arguments[i]; + + if (typeof fn !== "function") { + throw new TypeError("The last argument to .catch() " + + "must be a function, got " + util.toString(fn)); + } return this.then(undefined, catchFilter(catchInstances, fn, this)); } return this.then(undefined, fn); @@ -2845,6 +2850,14 @@ Promise.prototype._settledValue = function() { } }; +if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + es5.defineProperty(Promise.prototype, Symbol.toStringTag, { + get: function () { + return "Object"; + } + }); +} + function deferResolve(v) {this.promise._resolveCallback(v);} function deferReject(v) {this.promise._rejectCallback(v, false);} @@ -2871,7 +2884,7 @@ _dereq_("./synchronous_inspection")(Promise); _dereq_("./join")( Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); Promise.Promise = Promise; -Promise.version = "3.5.3"; +Promise.version = "3.5.5"; util.toFastProperties(Promise); util.toFastProperties(Promise.prototype); @@ -3182,7 +3195,8 @@ if (util.isNode && typeof MutationObserver === "undefined") { } else if ((typeof MutationObserver !== "undefined") && !(typeof window !== "undefined" && window.navigator && - (window.navigator.standalone || window.cordova))) { + (window.navigator.standalone || window.cordova)) && + ("classList" in document.documentElement)) { schedule = (function() { var div = document.createElement("div"); var opts = {attributes: true}; @@ -3792,7 +3806,12 @@ var ret = { domainBind: domainBind }; ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); + var version; + if (process.versions && process.versions.node) { + version = process.versions.node.split(".").map(Number); + } else if (process.version) { + version = process.version.split(".").map(Number); + } return (version[0] === 0 && version[1] > 10) || (version[0] > 0); })(); diff --git a/deps/npm/node_modules/bluebird/js/browser/bluebird.core.min.js b/deps/npm/node_modules/bluebird/js/browser/bluebird.core.min.js index d165acd027a874..5092a51e54338c 100644 --- a/deps/npm/node_modules/bluebird/js/browser/bluebird.core.min.js +++ b/deps/npm/node_modules/bluebird/js/browser/bluebird.core.min.js @@ -23,9 +23,9 @@ * */ /** - * bluebird build version 3.5.3 + * bluebird build version 3.5.5 * Features enabled: core * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),f=t("./queue"),h=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){h.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},h.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?a.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=a),r.prototype._drainQueues=function(){s(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,s(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":17,"./schedule":18,"./util":21}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function f(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function h(){this._trace=new O(this._peekContext())}function _(t,e){if(V(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=k(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(){this._trace=void 0}function v(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=w(s),l=c.length-1;l>=0;--l){var u=c[l];if(!q.test(u)){var p=u.match(G);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),g(n)}function g(t,n,r){if(st.warnings){var i,o=new I(t);if(n)r._attachExtraTrace(o);else if(st.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=k(o);o.stack=a.message+"\n"+a.stack.join("\n")}nt("warning",o)||j(o,"",!0)}}function m(t,e){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function k(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?E(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function j(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+W(i,t)}else r=e+String(t);"function"==typeof L?L(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function F(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){U.throwLater(o)}"unhandledRejection"===t?nt(t,n,r)||i||j(n,"Unhandled rejection "):nt(t,r)}function T(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+P(e)+">, no stack trace)"}function P(t){var e=41;return t.lengtha||0>s||!n||!r||n!==r||a>=s||(it=function(t){if(Q.test(t))return!0;var e=S(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function O(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);at(this,O),e>32&&this.uncycle()}var A,N,L,B=e._getDomain,U=e._async,I=t("./errors").Warning,H=t("./util"),D=t("./es5"),V=H.canAttachTrace,Q=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,G=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,M=null,W=null,$=!1,z=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),X=!(0==H.env("BLUEBIRD_WARNINGS")||!z&&!H.env("BLUEBIRD_WARNINGS")),K=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!z&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(X||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",N,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return g(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=B();N="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=B();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var Y=function(){};e.longStackTraces=function(){if(U.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!st.longStackTraces&&R()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;st.longStackTraces=!0,Y=function(){if(U.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),U.enableTrampoline(),st.longStackTraces=!1},e.prototype._captureStackTrace=h,e.prototype._attachExtraTrace=_,e.prototype._dereferenceTrace=d,n.activateLongStackTraces(),U.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return st.longStackTraces&&R()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};D.defineProperty(n,"promise",{value:e.promise}),D.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!H.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,D.defineProperty(n,"promise",{value:e.promise}),D.defineProperty(n,"reason",{value:e.reason}),!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),tt=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),et={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},nt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(n){U.throwLater(n),e=!0}var r=!1;try{r=Z(t,et[t].apply(null,arguments))}catch(n){U.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&Y()),"warnings"in t){var n=t.warnings;st.warnings=!!n,J=st.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!st.cancellation){if(U.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=a,e.prototype._execute=o,rt=u,st.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!st.monitoring?(st.monitoring=!0,e.prototype._fireEvent=nt):!t.monitoring&&st.monitoring&&(st.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var rt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(O,Error),n.CapturedTrace=O,O.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},O.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=k(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;C(r),b(r),H.notEnumerableProp(t,"stack",m(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var at=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():T(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,M=t,W=e;var n=Error.captureStackTrace;return it=function(t){return Q.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return M=/@/,W=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(W=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?T(e):e.toString()},null):(M=t,W=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(L=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?L=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(L=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var st={warnings:X,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&e.longStackTraces(),{longStackTraces:function(){return st.longStackTraces},warnings:function(){return st.warnings},cancellation:function(){return st.cancellation},monitoring:function(){return st.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return f},checkForgottenReturns:v,setBounds:x,warn:g,deprecated:y,CapturedTrace:O,fireDomEvent:Z,fireGlobalEvent:tt}}},{"./errors":9,"./es5":10,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(v){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return l.call(this,this.promise._target()._settledValue())}function c(t){return a(this,t)?void 0:(f.e=t,f)}function l(t){var i=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(i._boundValue()):l.call(i._boundValue(),t);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var h=n(u,i);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var _=new p("late cancellation observer");return i._attachExtraTrace(_),f.e=_,f}h.isPending()&&h._attachCancellationCallback(new o(this))}return h._then(s,c,void 0,this,void 0)}}}return i.isRejected()?(a(this),f.e=t,f):(a(this),t)}var u=t("./util"),p=e.CancellationError,f=u.errorObj,h=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){a(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var a=arguments[r];if(!u.isObject(a))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(a)));i[o++]=a}i.length=o;var s=arguments[r];return this._passThrough(h(i,s,this),1,void 0,l)},i}},{"./catch_filter":5,"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=s(t).apply(this,arguments),a=r._popContext();return o.checkForgottenReturns(i,a,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!h.isObject(o))return p("Catch statement predicate: expecting an object but got "+h.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(F.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){ -var n=".then() only accepts functions but was passed: "+h.classString(t);arguments.length>1&&(n+=", "+h.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+h.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},i.prototype.error=function(t){return this.caught(h.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=x(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new k(t).promise()},i.cast=function(t){var e=E(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var a=void 0!==o,s=a?o:new i(b),l=this._target(),u=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var p=c();if(0!==(50397184&u)){var f,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,f=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new m("late cancellation observer"),l._attachExtraTrace(_),f=e),v.invoke(d,l,{handler:null===p?f:"function"==typeof f&&h.domainBind(p,f),promise:s,receiver:r,value:_})}else l._addCallbacks(t,e,s,r,p);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===f?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:h.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:h.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=E(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=h.ensureErrorObject(t),i=r===t;if(!i&&!n&&F.warnings()){var o="a promise was rejected with a non-error: "+h.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===C?n&&"number"==typeof n.length?o=x(t).apply(this._boundValue(),n):(o=S,o.e=new g("cannot .spread() a non-array: "+h.classString(n))):o=x(t).call(e,n);var a=r._popContext();i=r._bitField,0===(65536&i)&&(o===w?r._reject(n):o===S?r._rejectCallback(o.e,!1):(F.checkForgottenReturns(o,a,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var a=t instanceof i,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,x(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,h.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){F.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:a}},h.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,E,p,F),t("./bind")(i,b,E,F),t("./cancel")(i,k,p,F),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,k,E,b,v,c),i.Promise=i,i.version="3.5.3",h.toFastProperties(i),h.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(b)),F.setBounds(d.firstLineError,h.lastLineError),i}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;if(this._values=o,0===(50397184&s))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(o)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;n>s;++s){var c=r(t[s],i);c instanceof e?(c=c._target(),a=c._bitField):a=null,o?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):o=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(c,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;no;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityn;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function _(t){return N.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),D.isNode&&D.toFastProperties(process);try{throw new Error}catch(V){D.lastLineError=V}e.exports=D},{"./es5":10}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),f=t("./queue"),h=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){h.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},h.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?a.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=a),r.prototype._drainQueues=function(){s(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,s(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":17,"./schedule":18,"./util":21}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function f(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function h(){this._trace=new x(this._peekContext())}function d(t,e){if(V(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=k(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function _(){this._trace=void 0}function v(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=w(s),l=c.length-1;l>=0;--l){var u=c[l];if(!q.test(u)){var p=u.match(G);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),g(n)}function g(t,n,r){if(st.warnings){var i,o=new I(t);if(n)r._attachExtraTrace(o);else if(st.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=k(o);o.stack=a.message+"\n"+a.stack.join("\n")}nt("warning",o)||j(o,"",!0)}}function m(t,e){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function k(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?E(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function j(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+W(i,t)}else r=e+String(t);"function"==typeof L?L(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function F(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){U.throwLater(o)}"unhandledRejection"===t?nt(t,n,r)||i||j(n,"Unhandled rejection "):nt(t,r)}function T(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+P(e)+">, no stack trace)"}function P(t){var e=41;return t.lengtha||0>s||!n||!r||n!==r||a>=s||(it=function(t){if(Q.test(t))return!0;var e=O(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function x(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);at(this,x),e>32&&this.uncycle()}var A,N,L,B=e._getDomain,U=e._async,I=t("./errors").Warning,H=t("./util"),D=t("./es5"),V=H.canAttachTrace,Q=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,G=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,M=null,W=null,$=!1,z=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),X=!(0==H.env("BLUEBIRD_WARNINGS")||!z&&!H.env("BLUEBIRD_WARNINGS")),K=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!z&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(X||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",N,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return g(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=B();N="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=B();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var Y=function(){};e.longStackTraces=function(){if(U.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!st.longStackTraces&&S()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;st.longStackTraces=!0,Y=function(){if(U.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),U.enableTrampoline(),st.longStackTraces=!1},e.prototype._captureStackTrace=h,e.prototype._attachExtraTrace=d,e.prototype._dereferenceTrace=_,n.activateLongStackTraces(),U.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return st.longStackTraces&&S()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};D.defineProperty(n,"promise",{value:e.promise}),D.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!H.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,D.defineProperty(n,"promise",{value:e.promise}),D.defineProperty(n,"reason",{value:e.reason}),!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),tt=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),et={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},nt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(n){U.throwLater(n),e=!0}var r=!1;try{r=Z(t,et[t].apply(null,arguments))}catch(n){U.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&Y()),"warnings"in t){var n=t.warnings;st.warnings=!!n,J=st.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!st.cancellation){if(U.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=a,e.prototype._execute=o,rt=u,st.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!st.monitoring?(st.monitoring=!0,e.prototype._fireEvent=nt):!t.monitoring&&st.monitoring&&(st.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var rt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(x,Error),n.CapturedTrace=x,x.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},x.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=k(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;C(r),b(r),H.notEnumerableProp(t,"stack",m(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var at=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():T(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,M=t,W=e;var n=Error.captureStackTrace;return it=function(t){return Q.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return M=/@/,W=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(W=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?T(e):e.toString()},null):(M=t,W=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(L=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?L=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(L=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var st={warnings:X,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&e.longStackTraces(),{longStackTraces:function(){return st.longStackTraces},warnings:function(){return st.warnings},cancellation:function(){return st.cancellation},monitoring:function(){return st.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return f},checkForgottenReturns:v,setBounds:R,warn:g,deprecated:y,CapturedTrace:x,fireDomEvent:Z,fireGlobalEvent:tt}}},{"./errors":9,"./es5":10,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),d=r("TimeoutError","timeout error"),_=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(v){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return l.call(this,this.promise._target()._settledValue())}function c(t){return a(this,t)?void 0:(f.e=t,f)}function l(t){var i=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(i._boundValue()):l.call(i._boundValue(),t);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var h=n(u,i);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var d=new p("late cancellation observer");return i._attachExtraTrace(d),f.e=d,f}h.isPending()&&h._attachCancellationCallback(new o(this))}return h._then(s,c,void 0,this,void 0)}}}return i.isRejected()?(a(this),f.e=t,f):(a(this),t)}var u=t("./util"),p=e.CancellationError,f=u.errorObj,h=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){a(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var a=arguments[r];if(!u.isObject(a))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(a)));i[o++]=a}i.length=o;var s=arguments[r];return this._passThrough(h(i,s,this),1,void 0,l)},i}},{"./catch_filter":5,"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=s(t).apply(this,arguments),a=r._popContext();return o.checkForgottenReturns(i,a,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!h.isObject(o))return p("Catch statement predicate: expecting an object but got "+h.classString(o));r[i++]=o}if(r.length=i,t=arguments[n],"function"!=typeof t)throw new g("The last argument to .catch() must be a function, got "+h.toString(t));return this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0); +},i.prototype.then=function(t,e){if(F.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+h.classString(t);arguments.length>1&&(n+=", "+h.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+h.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},i.prototype.error=function(t){return this.caught(h.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=R(t)(S(e,n));return r===O&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new k(t).promise()},i.cast=function(t){var e=E(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var a=void 0!==o,s=a?o:new i(b),l=this._target(),u=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var p=c();if(0!==(50397184&u)){var f,d,_=l._settlePromiseCtx;0!==(33554432&u)?(d=l._rejectionHandler0,f=t):0!==(16777216&u)?(d=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(_=l._settlePromiseLateCancellationObserver,d=new m("late cancellation observer"),l._attachExtraTrace(d),f=e),v.invoke(_,l,{handler:null===p?f:"function"==typeof f&&h.domainBind(p,f),promise:s,receiver:r,value:d})}else l._addCallbacks(t,e,s,r,p);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===f?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:h.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:h.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=E(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=h.ensureErrorObject(t),i=r===t;if(!i&&!n&&F.warnings()){var o="a promise was rejected with a non-error: "+h.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===C?n&&"number"==typeof n.length?o=R(t).apply(this._boundValue(),n):(o=O,o.e=new g("cannot .spread() a non-array: "+h.classString(n))):o=R(t).call(e,n);var a=r._popContext();i=r._bitField,0===(65536&i)&&(o===w?r._reject(n):o===O?r._rejectCallback(o.e,!1):(F.checkForgottenReturns(o,a,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var a=t instanceof i,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,R(e).call(r,o)===O&&t._reject(O.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,h.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&d.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){F.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:a}},h.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,E,p,F),t("./bind")(i,b,E,F),t("./cancel")(i,k,p,F),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,k,E,b,v,c),i.Promise=i,i.version="3.5.5",h.toFastProperties(i),h.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(b)),F.setBounds(_.firstLineError,h.lastLineError),i}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;if(this._values=o,0===(50397184&s))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(o)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;n>s;++s){var c=r(t[s],i);c instanceof e?(c=c._target(),a=c._bitField):a=null,o?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):o=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(c,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;no;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityn;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function d(t){return N.test(t)}function _(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),D.isNode&&D.toFastProperties(process);try{throw new Error}catch(V){D.lastLineError=V}e.exports=D},{"./es5":10}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file diff --git a/deps/npm/node_modules/bluebird/js/browser/bluebird.js b/deps/npm/node_modules/bluebird/js/browser/bluebird.js index 717c03e265ed09..89273d90f29994 100644 --- a/deps/npm/node_modules/bluebird/js/browser/bluebird.js +++ b/deps/npm/node_modules/bluebird/js/browser/bluebird.js @@ -23,7 +23,7 @@ * */ /** - * bluebird build version 3.5.3 + * bluebird build version 3.5.5 * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o 10) || (version[0] > 0); })(); diff --git a/deps/npm/node_modules/bluebird/js/browser/bluebird.min.js b/deps/npm/node_modules/bluebird/js/browser/bluebird.min.js index 716cadd63a27fd..9bbd1726baa27b 100644 --- a/deps/npm/node_modules/bluebird/js/browser/bluebird.min.js +++ b/deps/npm/node_modules/bluebird/js/browser/bluebird.min.js @@ -23,9 +23,9 @@ * */ /** - * bluebird build version 3.5.3 + * bluebird build version 3.5.5 * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),h=t("./queue"),f=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+N.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?N.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new O(this._peekContext())}function _(t,e){if(U(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=E(t);N.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),N.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(){this._trace=void 0}function v(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=C(a),l=c.length-1;l>=0;--l){var u=c[l];if(!q.test(u)){var p=u.match($);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),m(n)}function m(t,n,r){if(at.warnings){var i,o=new H(t);if(n)r._attachExtraTrace(o);else if(at.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=E(o);o.stack=s.message+"\n"+s.stack.join("\n")}nt("warning",o)||k(o,"",!0)}}function g(t,e){for(var n=0;n=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function E(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?j(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:C(e)}}function k(t,e,n){if("undefined"!=typeof console){var r;if(N.isObject(t)){var i=t.stack;r=e+G(i,t)}else r=e+String(t);"function"==typeof V?V(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function F(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){L.throwLater(o)}"unhandledRejection"===t?nt(t,n,r)||i||k(n,"Unhandled rejection "):nt(t,r)}function T(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():N.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.lengths||0>a||!n||!r||n!==r||s>=a||(it=function(t){if(M.test(t))return!0;var e=R(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function O(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);st(this,O),e>32&&this.uncycle()}var A,D,V,I=e._getDomain,L=e._async,H=t("./errors").Warning,N=t("./util"),B=t("./es5"),U=N.canAttachTrace,M=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,$=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,Q=null,G=null,z=!1,X=!(0==N.env("BLUEBIRD_DEBUG")||!N.env("BLUEBIRD_DEBUG")&&"development"!==N.env("NODE_ENV")),W=!(0==N.env("BLUEBIRD_WARNINGS")||!X&&!N.env("BLUEBIRD_WARNINGS")),K=!(0==N.env("BLUEBIRD_LONG_STACK_TRACES")||!X&&!N.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=N.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(W||!!N.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",D,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return m(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=I();D="function"==typeof t?null===e?t:N.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=I();A="function"==typeof t?null===e?t:N.domainBind(e,t):void 0};var Y=function(){};e.longStackTraces=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&P()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;at.longStackTraces=!0,Y=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),L.enableTrampoline(),at.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,e.prototype._dereferenceTrace=d,n.activateLongStackTraces(),L.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return at.longStackTraces&&P()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!N.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason}),!N.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),N.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!N.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),tt=function(){return N.isNode?function(){return process.emit.apply(process,arguments)}:N.global?function(t){var e="on"+t.toLowerCase(),n=N.global[e];return n?(n.apply(N.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),et={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},nt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(n){L.throwLater(n),e=!0}var r=!1;try{r=Z(t,et[t].apply(null,arguments))}catch(n){L.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&Y()),"warnings"in t){var n=t.warnings;at.warnings=!!n,J=at.warnings,N.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(L.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,rt=u,at.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,e.prototype._fireEvent=nt):!t.monitoring&&at.monitoring&&(at.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var rt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;N.inherits(O,Error),n.CapturedTrace=O,O.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},O.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=E(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;w(r),b(r),N.notEnumerableProp(t,"stack",g(n,r)),N.notEnumerableProp(t,"__stackCleaned__",!0)}};var st=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():T(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,Q=t,G=e;var n=Error.captureStackTrace;return it=function(t){return M.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return Q=/@/,G=e,z=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?T(e):e.toString()},null):(Q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(V=function(t){console.warn(t)},N.isNode&&process.stderr.isTTY?V=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:N.isNode||"string"!=typeof(new Error).stack||(V=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:W,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&e.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return h},checkForgottenReturns:v,setBounds:S,warn:m,deprecated:y,CapturedTrace:O,fireDomEvent:Z,fireGlobalEvent:tt}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return l.call(this,this.promise._target()._settledValue())}function c(t){return s(this,t)?void 0:(h.e=t,h)}function l(t){var i=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(i._boundValue()):l.call(i._boundValue(),t);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var f=n(u,i);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var _=new p("late cancellation observer");return i._attachExtraTrace(_),h.e=_,h}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(a,c,void 0,this,void 0)}}}return i.isRejected()?(s(this),h.e=t,h):(s(this),t)}var u=t("./util"),p=e.CancellationError,h=u.errorObj,f=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var s=arguments[r];if(!u.isObject(s))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(s)));i[o++]=s}i.length=o;var a=arguments[r];return this._passThrough(f(i,a,this),1,void 0,l)},i}},{"./catch_filter":7,"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var m=++this._totalResolved;return m>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlighto;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("Catch statement predicate: expecting an object but got "+f.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(T.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=O(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&T.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=S,o.e=new m("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===S?r._rejectCallback(o.e,!1):(T.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof x&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){T.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,T),t("./bind")(i,b,j,T),t("./cancel")(i,E,p,T),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.5.3",t("./map.js")(i,E,p,j,b,T),t("./call_get.js")(i),t("./using.js")(i,p,j,F,b,T),t("./timers.js")(i,b,T),t("./generators.js")(i,p,b,j,n,T),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,T),t("./settle.js")(i,E,T),t("./some.js")(i,E,p),t("./filter.js")(i,b),t("./each.js")(i,b),t("./any.js")(i),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),T.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;nc;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===k)t[_]=k(u,h,u,p,e,i);else{var d=r(p,function(){return k(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,g="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},k=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=g);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;ao;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityh;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}();e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216, -n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var g=r(d);g instanceof e&&(d=g._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return x.e=e,x}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{u(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(U){B.lastLineError=U}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),h=t("./queue"),f=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new O(this._peekContext())}function _(t,e){if(U(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=E(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(){this._trace=void 0}function v(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=C(a),l=c.length-1;l>=0;--l){var u=c[l];if(!q.test(u)){var p=u.match($);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),m(n)}function m(t,n,r){if(at.warnings){var i,o=new N(t);if(n)r._attachExtraTrace(o);else if(at.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=E(o);o.stack=s.message+"\n"+s.stack.join("\n")}nt("warning",o)||k(o,"",!0)}}function g(t,e){for(var n=0;n=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function E(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?j(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:C(e)}}function k(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+G(i,t)}else r=e+String(t);"function"==typeof V?V(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function F(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){L.throwLater(o)}"unhandledRejection"===t?nt(t,n,r)||i||k(n,"Unhandled rejection "):nt(t,r)}function T(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.lengths||0>a||!n||!r||n!==r||s>=a||(it=function(t){if(M.test(t))return!0;var e=S(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function O(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);st(this,O),e>32&&this.uncycle()}var A,D,V,I=e._getDomain,L=e._async,N=t("./errors").Warning,H=t("./util"),B=t("./es5"),U=H.canAttachTrace,M=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,$=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,Q=null,G=null,z=!1,X=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),W=!(0==H.env("BLUEBIRD_WARNINGS")||!X&&!H.env("BLUEBIRD_WARNINGS")),K=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!X&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(W||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",D,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return m(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=I();D="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=I();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var Y=function(){};e.longStackTraces=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&P()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;at.longStackTraces=!0,Y=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),L.enableTrampoline(),at.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,e.prototype._dereferenceTrace=d,n.activateLongStackTraces(),L.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return at.longStackTraces&&P()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!H.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason}),!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),tt=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),et={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},nt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(n){L.throwLater(n),e=!0}var r=!1;try{r=Z(t,et[t].apply(null,arguments))}catch(n){L.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&Y()),"warnings"in t){var n=t.warnings;at.warnings=!!n,J=at.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(L.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,rt=u,at.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,e.prototype._fireEvent=nt):!t.monitoring&&at.monitoring&&(at.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var rt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(O,Error),n.CapturedTrace=O,O.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},O.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=E(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;w(r),b(r),H.notEnumerableProp(t,"stack",g(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var st=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():T(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,Q=t,G=e;var n=Error.captureStackTrace;return it=function(t){return M.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return Q=/@/,G=e,z=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?T(e):e.toString()},null):(Q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(V=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?V=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(V=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:W,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&e.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return h},checkForgottenReturns:v,setBounds:R,warn:m,deprecated:y,CapturedTrace:O,fireDomEvent:Z,fireGlobalEvent:tt}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return l.call(this,this.promise._target()._settledValue())}function c(t){return s(this,t)?void 0:(h.e=t,h)}function l(t){var i=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(i._boundValue()):l.call(i._boundValue(),t);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var f=n(u,i);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var _=new p("late cancellation observer");return i._attachExtraTrace(_),h.e=_,h}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(a,c,void 0,this,void 0)}}}return i.isRejected()?(s(this),h.e=t,h):(s(this),t)}var u=t("./util"),p=e.CancellationError,h=u.errorObj,f=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var s=arguments[r];if(!u.isObject(s))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(s)));i[o++]=s}i.length=o;var a=arguments[r];return this._passThrough(f(i,a,this),1,void 0,l)},i}},{"./catch_filter":7,"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var m=++this._totalResolved;return m>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlighto;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("Catch statement predicate: expecting an object but got "+f.classString(o));r[i++]=o}if(r.length=i,t=arguments[n],"function"!=typeof t)throw new m("The last argument to .catch() must be a function, got "+f.toString(t));return this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(T.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=O(t)(S(e,n));return r===R&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&T.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=R,o.e=new m("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===R?r._rejectCallback(o.e,!1):(T.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof x&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===R&&t._reject(R.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&_.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){T.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,T),t("./bind")(i,b,j,T),t("./cancel")(i,E,p,T),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.5.5",t("./call_get.js")(i),t("./generators.js")(i,p,b,j,n,T),t("./map.js")(i,E,p,j,b,T),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,T),t("./settle.js")(i,E,T),t("./some.js")(i,E,p),t("./timers.js")(i,b,T),t("./using.js")(i,p,j,F,b,T),t("./any.js")(i),t("./each.js")(i,b),t("./filter.js")(i,b),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),T.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;nc;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===k)t[_]=k(u,h,u,p,e,i);else{var d=r(p,function(){return k(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,g="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},k=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=g);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;ao;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityh;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}():"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o;e.exports=r},{"./util":36 +}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var g=r(d);g instanceof e&&(d=g._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return x.e=e,x}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{u(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(U){B.lastLineError=U}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file diff --git a/deps/npm/node_modules/bluebird/js/release/debuggability.js b/deps/npm/node_modules/bluebird/js/release/debuggability.js index 213d4ac6d27e49..9a64c99c90b343 100644 --- a/deps/npm/node_modules/bluebird/js/release/debuggability.js +++ b/deps/npm/node_modules/bluebird/js/release/debuggability.js @@ -689,8 +689,8 @@ function parseLineInfo(line) { function setBounds(firstLineError, lastLineError) { if (!longStackTracesIsSupported()) return; - var firstStackLines = firstLineError.stack.split("\n"); - var lastStackLines = lastLineError.stack.split("\n"); + var firstStackLines = (firstLineError.stack || "").split("\n"); + var lastStackLines = (lastLineError.stack || "").split("\n"); var firstIndex = -1; var lastIndex = -1; var firstFileName; diff --git a/deps/npm/node_modules/bluebird/js/release/promise.js b/deps/npm/node_modules/bluebird/js/release/promise.js index 83b41e866850b4..98061406b0f8b9 100644 --- a/deps/npm/node_modules/bluebird/js/release/promise.js +++ b/deps/npm/node_modules/bluebird/js/release/promise.js @@ -101,6 +101,11 @@ Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { } catchInstances.length = j; fn = arguments[i]; + + if (typeof fn !== "function") { + throw new TypeError("The last argument to .catch() " + + "must be a function, got " + util.toString(fn)); + } return this.then(undefined, catchFilter(catchInstances, fn, this)); } return this.then(undefined, fn); @@ -708,6 +713,14 @@ Promise.prototype._settledValue = function() { } }; +if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + es5.defineProperty(Promise.prototype, Symbol.toStringTag, { + get: function () { + return "Object"; + } + }); +} + function deferResolve(v) {this.promise._resolveCallback(v);} function deferReject(v) {this.promise._rejectCallback(v, false);} @@ -734,12 +747,10 @@ require("./synchronous_inspection")(Promise); require("./join")( Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); Promise.Promise = Promise; -Promise.version = "3.5.3"; -require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +Promise.version = "3.5.5"; require('./call_get.js')(Promise); -require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); -require('./timers.js')(Promise, INTERNAL, debug); require('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); +require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); require('./nodeify.js')(Promise); require('./promisify.js')(Promise, INTERNAL); require('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection); @@ -747,9 +758,11 @@ require('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection); require('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); require('./settle.js')(Promise, PromiseArray, debug); require('./some.js')(Promise, PromiseArray, apiRejection); -require('./filter.js')(Promise, INTERNAL); -require('./each.js')(Promise, INTERNAL); +require('./timers.js')(Promise, INTERNAL, debug); +require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); require('./any.js')(Promise); +require('./each.js')(Promise, INTERNAL); +require('./filter.js')(Promise, INTERNAL); util.toFastProperties(Promise); util.toFastProperties(Promise.prototype); diff --git a/deps/npm/node_modules/bluebird/js/release/schedule.js b/deps/npm/node_modules/bluebird/js/release/schedule.js index f70df9fc123b83..15197d1433cc82 100644 --- a/deps/npm/node_modules/bluebird/js/release/schedule.js +++ b/deps/npm/node_modules/bluebird/js/release/schedule.js @@ -20,7 +20,8 @@ if (util.isNode && typeof MutationObserver === "undefined") { } else if ((typeof MutationObserver !== "undefined") && !(typeof window !== "undefined" && window.navigator && - (window.navigator.standalone || window.cordova))) { + (window.navigator.standalone || window.cordova)) && + ("classList" in document.documentElement)) { schedule = (function() { var div = document.createElement("div"); var opts = {attributes: true}; diff --git a/deps/npm/node_modules/bluebird/js/release/util.js b/deps/npm/node_modules/bluebird/js/release/util.js index c5617ee870d505..7ea96834fe8417 100644 --- a/deps/npm/node_modules/bluebird/js/release/util.js +++ b/deps/npm/node_modules/bluebird/js/release/util.js @@ -374,7 +374,12 @@ var ret = { domainBind: domainBind }; ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); + var version; + if (process.versions && process.versions.node) { + version = process.versions.node.split(".").map(Number); + } else if (process.version) { + version = process.version.split(".").map(Number); + } return (version[0] === 0 && version[1] > 10) || (version[0] > 0); })(); diff --git a/deps/npm/node_modules/bluebird/package.json b/deps/npm/node_modules/bluebird/package.json index 305d330978aad0..fb1c7c821c8734 100644 --- a/deps/npm/node_modules/bluebird/package.json +++ b/deps/npm/node_modules/bluebird/package.json @@ -1,19 +1,19 @@ { - "_from": "bluebird@3.5.3", - "_id": "bluebird@3.5.3", + "_from": "bluebird@^3.5.3", + "_id": "bluebird@3.5.5", "_inBundle": false, - "_integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", + "_integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==", "_location": "/bluebird", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "bluebird@3.5.3", + "raw": "bluebird@^3.5.3", "name": "bluebird", "escapedName": "bluebird", - "rawSpec": "3.5.3", + "rawSpec": "^3.5.3", "saveSpec": null, - "fetchSpec": "3.5.3" + "fetchSpec": "^3.5.3" }, "_requiredBy": [ "#USER", @@ -21,16 +21,14 @@ "/bin-links", "/cacache", "/libcipm", - "/libnpmhook/npm-registry-fetch", + "/libnpm", "/npm-registry-fetch", - "/npm-registry-fetch/cacache", - "/pacote", - "/tap" + "/pacote" ], - "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "_shasum": "7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7", - "_spec": "bluebird@3.5.3", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", + "_shasum": "a8d0afd73251effbbd5fe384a77d73003c17a71f", + "_spec": "bluebird@^3.5.3", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Petka Antonov", "email": "petka_antonov@hotmail.com", @@ -106,6 +104,6 @@ "prepublish": "npm run generate-browser-core && npm run generate-browser-full", "test": "node --expose-gc tools/test.js" }, - "version": "3.5.3", + "version": "3.5.5", "webpack": "./js/release/bluebird.js" } diff --git a/deps/npm/node_modules/cacache/CHANGELOG.md b/deps/npm/node_modules/cacache/CHANGELOG.md index 847174be70f4de..e140576c3084dc 100644 --- a/deps/npm/node_modules/cacache/CHANGELOG.md +++ b/deps/npm/node_modules/cacache/CHANGELOG.md @@ -1,7 +1,20 @@ -# Change Log +# Changelog 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. +### [11.3.3](https://github.com/zkat/cacache/compare/v11.3.2...v11.3.3) (2019-06-17) + + +### Bug Fixes + +* **audit:** npm audit fix ([200a6d5](https://github.com/zkat/cacache/commit/200a6d5)) +* **config:** Add ssri config 'error' option ([#146](https://github.com/zkat/cacache/issues/146)) ([47de8f5](https://github.com/zkat/cacache/commit/47de8f5)) +* **deps:** npm audit fix ([481a7dc](https://github.com/zkat/cacache/commit/481a7dc)) +* **standard:** standard --fix ([7799149](https://github.com/zkat/cacache/commit/7799149)) +* **write:** avoid another cb never called situation ([5156561](https://github.com/zkat/cacache/commit/5156561)) + + + ## [11.3.2](https://github.com/zkat/cacache/compare/v11.3.1...v11.3.2) (2018-12-21) diff --git a/deps/npm/node_modules/cacache/README.es.md b/deps/npm/node_modules/cacache/README.es.md index 783a0a19b01dab..55007e20dd4f16 100644 --- a/deps/npm/node_modules/cacache/README.es.md +++ b/deps/npm/node_modules/cacache/README.es.md @@ -287,7 +287,7 @@ entrada si existe. * `key` - Clave de la entrada. Igual al argumento `clave`. * `integrity` - [hacheo de Subresource Integrity](#integrity) del contenido al que se refiere esta entrada. -* `path` - Dirección del fichero de datos almacenados, relativa al argumento `cache`. +* `path` - Dirección del fichero de datos almacenados, unida al argumento `cache`. * `time` - Hora de creación de la entrada * `metadata` - Metadatos asignados a esta entrada por el usuario diff --git a/deps/npm/node_modules/cacache/README.md b/deps/npm/node_modules/cacache/README.md index 4b284588a65aa9..971b7b0b747a01 100644 --- a/deps/npm/node_modules/cacache/README.md +++ b/deps/npm/node_modules/cacache/README.md @@ -290,7 +290,7 @@ one exists. * `key` - Key the entry was looked up under. Matches the `key` argument. * `integrity` - [Subresource Integrity hash](#integrity) for the content this entry refers to. -* `path` - Filesystem path relative to `cache` argument where content is stored. +* `path` - Filesystem path where content is stored, joined with `cache` argument. * `time` - Timestamp the entry was first added on. * `metadata` - User-assigned metadata associated with the entry/content. diff --git a/deps/npm/node_modules/cacache/lib/content/path.js b/deps/npm/node_modules/cacache/lib/content/path.js index fa6491ba6f895f..c67c28061259ff 100644 --- a/deps/npm/node_modules/cacache/lib/content/path.js +++ b/deps/npm/node_modules/cacache/lib/content/path.js @@ -12,7 +12,7 @@ const ssri = require('ssri') // module.exports = contentPath function contentPath (cache, integrity) { - const sri = ssri.parse(integrity, {single: true}) + const sri = ssri.parse(integrity, { single: true }) // contentPath is the *strongest* algo given return path.join.apply(path, [ contentDir(cache), diff --git a/deps/npm/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/cacache/lib/content/read.js index 8f1acc06d8d9dd..7929524f82c3c3 100644 --- a/deps/npm/node_modules/cacache/lib/content/read.js +++ b/deps/npm/node_modules/cacache/lib/content/read.js @@ -54,8 +54,8 @@ function readStream (cache, integrity, opts) { opts = ReadOpts(opts) const stream = new PassThrough() withContentSri(cache, integrity, (cpath, sri) => { - return lstatAsync(cpath).then(stat => ({cpath, sri, stat})) - }).then(({cpath, sri, stat}) => { + return lstatAsync(cpath).then(stat => ({ cpath, sri, stat })) + }).then(({ cpath, sri, stat }) => { return pipe( fs.createReadStream(cpath), ssri.integrityStream({ @@ -95,7 +95,7 @@ module.exports.hasContent = hasContent function hasContent (cache, integrity) { if (!integrity) { return BB.resolve(false) } return withContentSri(cache, integrity, (cpath, sri) => { - return lstatAsync(cpath).then(stat => ({size: stat.size, sri, stat})) + return lstatAsync(cpath).then(stat => ({ size: stat.size, sri, stat })) }).catch(err => { if (err.code === 'ENOENT') { return false } if (err.code === 'EPERM') { @@ -114,7 +114,7 @@ function hasContentSync (cache, integrity) { return withContentSriSync(cache, integrity, (cpath, sri) => { try { const stat = fs.lstatSync(cpath) - return {size: stat.size, sri, stat} + return { size: stat.size, sri, stat } } catch (err) { if (err.code === 'ENOENT') { return false } if (err.code === 'EPERM') { @@ -141,12 +141,12 @@ function withContentSri (cache, integrity, fn) { } else { return BB.any(sri[sri.pickAlgorithm()].map(meta => { return withContentSri(cache, meta, fn) - }, {concurrency: 1})) + }, { concurrency: 1 })) .catch(err => { if ([].some.call(err, e => e.code === 'ENOENT')) { throw Object.assign( new Error('No matching content found for ' + sri.toString()), - {code: 'ENOENT'} + { code: 'ENOENT' } ) } else { throw err[0] diff --git a/deps/npm/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/cacache/lib/content/write.js index c71363413ca4ab..150371cb857a6f 100644 --- a/deps/npm/node_modules/cacache/lib/content/write.js +++ b/deps/npm/node_modules/cacache/lib/content/write.js @@ -36,11 +36,11 @@ function write (cache, data, opts) { } return BB.using(makeTmp(cache, opts), tmp => ( writeFileAsync( - tmp.target, data, {flag: 'wx'} + tmp.target, data, { flag: 'wx' } ).then(() => ( moveToDestination(tmp, cache, sri, opts) )) - )).then(() => ({integrity: sri, size: data.length})) + )).then(() => ({ integrity: sri, size: data.length })) } module.exports.stream = writeStream @@ -111,8 +111,8 @@ function pipeToTmp (inputStream, cache, tmpTarget, opts, errCheck) { }) errCheck() return pipe(inputStream, hashStream, outStream).then(() => { - return {integrity, size} - }, err => { + return { integrity, size } + }).catch(err => { return rimraf(tmpTarget).then(() => { throw err }) }) }) diff --git a/deps/npm/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/cacache/lib/entry-index.js index 29a688eea26abe..d2549e7136749b 100644 --- a/deps/npm/node_modules/cacache/lib/entry-index.js +++ b/deps/npm/node_modules/cacache/lib/entry-index.js @@ -64,7 +64,7 @@ function insert (cache, key, integrity, opts) { ) }).then( () => fixOwner.chownr(bucket, opts.uid, opts.gid) - ).catch({code: 'ENOENT'}, () => { + ).catch({ code: 'ENOENT' }, () => { // There's a class of race conditions that happen when things get deleted // during fixOwner, or between the two mkdirfix/chownr calls. // @@ -178,7 +178,7 @@ function lsStream (cache) { const formatted = formatEntry(cache, entry) formatted && stream.push(formatted) } - }).catch({code: 'ENOENT'}, nop) + }).catch({ code: 'ENOENT' }, nop) }) }) }).then(() => { @@ -282,8 +282,8 @@ function formatEntry (cache, entry) { function readdirOrEmpty (dir) { return readdirAsync(dir) - .catch({code: 'ENOENT'}, () => []) - .catch({code: 'ENOTDIR'}, () => []) + .catch({ code: 'ENOENT' }, () => []) + .catch({ code: 'ENOTDIR' }, () => []) } function nop () { diff --git a/deps/npm/node_modules/cacache/lib/util/fix-owner.js b/deps/npm/node_modules/cacache/lib/util/fix-owner.js index 0c8f9f87537b0b..563724ca6e8616 100644 --- a/deps/npm/node_modules/cacache/lib/util/fix-owner.js +++ b/deps/npm/node_modules/cacache/lib/util/fix-owner.js @@ -27,7 +27,7 @@ function fixOwner (filepath, uid, gid) { filepath, typeof uid === 'number' ? uid : process.getuid(), typeof gid === 'number' ? gid : process.getgid() - ).catch({code: 'ENOENT'}, () => null) + ).catch({ code: 'ENOENT' }, () => null) ) } @@ -65,7 +65,7 @@ function mkdirfix (p, uid, gid, cb) { if (made) { return fixOwner(made, uid, gid).then(() => made) } - }).catch({code: 'EEXIST'}, () => { + }).catch({ code: 'EEXIST' }, () => { // There's a race in mkdirp! return fixOwner(p, uid, gid).then(() => null) }) diff --git a/deps/npm/node_modules/cacache/lib/verify.js b/deps/npm/node_modules/cacache/lib/verify.js index 3468bc6b8ec6f4..8eaab0b7daf276 100644 --- a/deps/npm/node_modules/cacache/lib/verify.js +++ b/deps/npm/node_modules/cacache/lib/verify.js @@ -130,7 +130,7 @@ function garbageCollect (cache, opts) { }) }) } - }, {concurrency: opts.concurrency})) + }, { concurrency: opts.concurrency })) }) }) } @@ -150,7 +150,7 @@ function verifyContent (filepath, sri) { contentInfo.valid = false }) }).then(() => contentInfo) - }).catch({code: 'ENOENT'}, () => ({size: 0, valid: false})) + }).catch({ code: 'ENOENT' }, () => ({ size: 0, valid: false })) } function rebuildIndex (cache, opts) { @@ -183,7 +183,7 @@ function rebuildIndex (cache, opts) { } return BB.map(Object.keys(buckets), key => { return rebuildBucket(cache, buckets[key], stats, opts) - }, {concurrency: opts.concurrency}).then(() => stats) + }, { concurrency: opts.concurrency }).then(() => stats) }) } @@ -200,7 +200,7 @@ function rebuildBucket (cache, bucket, stats, opts) { metadata: entry.metadata, size: entry.size }).then(() => { stats.totalEntries++ }) - }).catch({code: 'ENOENT'}, () => { + }).catch({ code: 'ENOENT' }, () => { stats.rejectedEntries++ stats.missingContent++ }) diff --git a/deps/npm/node_modules/cacache/locales/en.json b/deps/npm/node_modules/cacache/locales/en.json index 82ecb0832490d2..4f145288408ecc 100644 --- a/deps/npm/node_modules/cacache/locales/en.json +++ b/deps/npm/node_modules/cacache/locales/en.json @@ -2,5 +2,6 @@ "No cache entry for `%s` found in `%s`": "No cache entry for %s found in %s", "Integrity verification failed for %s (%s)": "Integrity verification failed for %s (%s)", "Bad data size: expected inserted data to be %s bytes, but got %s instead": "Bad data size: expected inserted data to be %s bytes, but got %s instead", - "Cache input stream was empty": "Cache input stream was empty" -} + "Cache input stream was empty": "Cache input stream was empty", + "Integrity check failed:\n Wanted: %s\n Found: %s": "Integrity check failed:\n Wanted: %s\n Found: %s" +} \ No newline at end of file diff --git a/deps/npm/node_modules/cacache/node_modules/chownr/README.md b/deps/npm/node_modules/cacache/node_modules/chownr/README.md deleted file mode 100644 index 70e9a54a32b8e0..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/chownr/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Like `chown -R`. - -Takes the same arguments as `fs.chown()` diff --git a/deps/npm/node_modules/cacache/node_modules/chownr/chownr.js b/deps/npm/node_modules/cacache/node_modules/chownr/chownr.js deleted file mode 100644 index 7e63928827e2c6..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/chownr/chownr.js +++ /dev/null @@ -1,88 +0,0 @@ -'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/cacache/node_modules/chownr/package.json b/deps/npm/node_modules/cacache/node_modules/chownr/package.json deleted file mode 100644 index 4871f94bf391d7..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/chownr/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "chownr@^1.1.1", - "_id": "chownr@1.1.1", - "_inBundle": false, - "_integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "_location": "/cacache/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": [ - "/cacache" - ], - "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "_shasum": "54726b8b8fff4df053c42187e801fb4412df1494", - "_spec": "chownr@^1.1.1", - "_where": "/Users/aeschright/code/cli/node_modules/cacache", - "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/cacache/node_modules/chownr/LICENSE b/deps/npm/node_modules/cacache/node_modules/glob/LICENSE similarity index 78% rename from deps/npm/node_modules/cacache/node_modules/chownr/LICENSE rename to deps/npm/node_modules/cacache/node_modules/glob/LICENSE index 19129e315fe593..42ca266df1d523 100644 --- a/deps/npm/node_modules/cacache/node_modules/chownr/LICENSE +++ b/deps/npm/node_modules/cacache/node_modules/glob/LICENSE @@ -13,3 +13,9 @@ 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. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/deps/npm/node_modules/cacache/node_modules/glob/README.md b/deps/npm/node_modules/cacache/node_modules/glob/README.md new file mode 100644 index 00000000000000..e71b967ea28809 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/glob/README.md @@ -0,0 +1,373 @@ +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![](logo/glob.png) + +## Usage + +Install with npm + +``` +npm i glob +``` + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* `cb` `{Function}` + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* return: `{Array}` filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` `{String}` pattern to search for +* `options` `{Object}` +* `cb` `{Function}` Called when an error occurs, or matches are found + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'FILE'` - Path exists, and is not a directory + * `'DIR'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the specific + thing that matched. It is not deduplicated or resolved to a realpath. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of glob patterns to exclude matches. + Note: `ignore` patterns are *always* in `dot:true` mode, regardless + of any other settings. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) +* `absolute` Set to true to always receive absolute paths for matched + files. Unlike `realpath`, this also affects the values returned in + the `match` event. + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +Previously, this module let you mark a pattern as a "comment" if it +started with a `#` character, or a "negated" pattern if it started +with a `!` character. + +These options were deprecated in version 5, and removed in version 6. + +To specify things that should not match, use the `ignore` option. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Glob Logo +Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). + +The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` diff --git a/deps/npm/node_modules/cacache/node_modules/glob/changelog.md b/deps/npm/node_modules/cacache/node_modules/glob/changelog.md new file mode 100644 index 00000000000000..41636771e3a7cd --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/glob/changelog.md @@ -0,0 +1,67 @@ +## 7.0 + +- Raise error if `options.cwd` is specified, and not a directory + +## 6.0 + +- Remove comment and negation pattern support +- Ignore patterns are always in `dot:true` mode + +## 5.0 + +- Deprecate comment and negation patterns +- Fix regression in `mark` and `nodir` options from making all cache + keys absolute path. +- Abort if `fs.readdir` returns an error that's unexpected +- Don't emit `match` events for ignored items +- Treat ENOTSUP like ENOTDIR in readdir + +## 4.5 + +- Add `options.follow` to always follow directory symlinks in globstar +- Add `options.realpath` to call `fs.realpath` on all results +- Always cache based on absolute path + +## 4.4 + +- Add `options.ignore` +- Fix handling of broken symlinks + +## 4.3 + +- Bump minimatch to 2.x +- Pass all tests on Windows + +## 4.2 + +- Add `glob.hasMagic` function +- Add `options.nodir` flag + +## 4.1 + +- Refactor sync and async implementations for performance +- Throw if callback provided to sync glob function +- Treat symbolic links in globstar results the same as Bash 4.3 + +## 4.0 + +- Use `^` for dependency versions (bumped major because this breaks + older npm versions) +- Ensure callbacks are only ever called once +- switch to ISC license + +## 3.x + +- Rewrite in JavaScript +- Add support for setting root, cwd, and windows support +- Cache many fs calls +- Add globstar support +- emit match events + +## 2.x + +- Use `glob.h` and `fnmatch.h` from NetBSD + +## 1.x + +- `glob.h` static binding. diff --git a/deps/npm/node_modules/cacache/node_modules/glob/common.js b/deps/npm/node_modules/cacache/node_modules/glob/common.js new file mode 100644 index 00000000000000..66651bb3aac655 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/glob/common.js @@ -0,0 +1,240 @@ +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + self.absolute = !!options.absolute + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/deps/npm/node_modules/cacache/node_modules/glob/glob.js b/deps/npm/node_modules/cacache/node_modules/glob/glob.js new file mode 100644 index 00000000000000..58dec0f6c2bd0b --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/glob/glob.js @@ -0,0 +1,790 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = require('fs') +var rp = require('fs.realpath') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + + if (!pattern) + return false + + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + this._processing = 0 + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + rp.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = isAbsolute(e) ? e : this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er && er.code === 'ENOENT') + return cb() + + var isSym = lstat && lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) + return cb(null, false, stat) + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return cb() + + return cb(null, c, stat) +} diff --git a/deps/npm/node_modules/cacache/node_modules/glob/package.json b/deps/npm/node_modules/cacache/node_modules/glob/package.json new file mode 100644 index 00000000000000..eaead84e567bfe --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/glob/package.json @@ -0,0 +1,76 @@ +{ + "_from": "glob@^7.1.4", + "_id": "glob@7.1.4", + "_inBundle": false, + "_integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "_location": "/cacache/glob", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "glob@^7.1.4", + "name": "glob", + "escapedName": "glob", + "rawSpec": "^7.1.4", + "saveSpec": null, + "fetchSpec": "^7.1.4" + }, + "_requiredBy": [ + "/cacache" + ], + "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "_shasum": "aa608a2f6c577ad357e1ae5a5c26d9a8d1969255", + "_spec": "glob@^7.1.4", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/cacache", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "bundleDependencies": false, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "deprecated": false, + "description": "a little globber", + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^12.0.1", + "tick": "0.0.6" + }, + "engines": { + "node": "*" + }, + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "homepage": "https://github.com/isaacs/node-glob#readme", + "license": "ISC", + "main": "glob.js", + "name": "glob", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "scripts": { + "bench": "bash benchmark.sh", + "benchclean": "node benchclean.js", + "prepublish": "npm run benchclean", + "prof": "bash prof.sh && cat profile.txt", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" + }, + "version": "7.1.4" +} diff --git a/deps/npm/node_modules/cacache/node_modules/glob/sync.js b/deps/npm/node_modules/cacache/node_modules/glob/sync.js new file mode 100644 index 00000000000000..c952134baa7ec0 --- /dev/null +++ b/deps/npm/node_modules/cacache/node_modules/glob/sync.js @@ -0,0 +1,486 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = require('fs') +var rp = require('fs.realpath') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = rp.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return + + var abs = this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) { + e = abs + } + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } + + var isSym = lstat && lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/LICENSE b/deps/npm/node_modules/cacache/node_modules/unique-filename/LICENSE deleted file mode 100644 index 69619c125ea7ef..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/LICENSE +++ /dev/null @@ -1,5 +0,0 @@ -Copyright npm, Inc - -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/cacache/node_modules/unique-filename/README.md b/deps/npm/node_modules/cacache/node_modules/unique-filename/README.md deleted file mode 100644 index 74b62b2ab4426e..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/README.md +++ /dev/null @@ -1,33 +0,0 @@ -unique-filename -=============== - -Generate a unique filename for use in temporary directories or caches. - -``` -var uniqueFilename = require('unique-filename') - -// returns something like: /tmp/912ec803b2ce49e4a541068d495ab570 -var randomTmpfile = uniqueFilename(os.tmpdir()) - -// returns something like: /tmp/my-test-912ec803b2ce49e4a541068d495ab570 -var randomPrefixedTmpfile = uniqueFilename(os.tmpdir(), 'my-test') - -var uniqueTmpfile = uniqueFilename('/tmp', 'testing', '/my/thing/to/uniq/on') -``` - -### uniqueFilename(*dir*, *fileprefix*, *uniqstr*) → String - -Returns the full path of a unique filename that looks like: -`dir/prefix-7ddd44c0` -or `dir/7ddd44c0` - -*dir* – The path you want the filename in. `os.tmpdir()` is a good choice for this. - -*fileprefix* – A string to append prior to the unique part of the filename. -The parameter is required if *uniqstr* is also passed in but is otherwise -optional and can be `undefined`/`null`/`''`. If present and not empty -then this string plus a hyphen are prepended to the unique part. - -*uniqstr* – Optional, if not passed the unique part of the resulting -filename will be random. If passed in it will be generated from this string -in a reproducable way. diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.html b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.html deleted file mode 100644 index cd55391a67a4ce..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - Code coverage report for __root__/ - - - - - - -
    -

    Code coverage report for __root__/

    -

    - Statements: 100% (4 / 4)      - Branches: 100% (2 / 2)      - Functions: 100% (1 / 1)      - Lines: 100% (4 / 4)      - Ignored: none      -

    -
    All files » __root__/
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    index.js100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
    -
    -
    - - - - - - diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.js.html b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.js.html deleted file mode 100644 index 02e5768d3fb647..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/__root__/index.js.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - Code coverage report for index.js - - - - - - -
    -

    Code coverage report for index.js

    -

    - Statements: 100% (4 / 4)      - Branches: 100% (2 / 2)      - Functions: 100% (1 / 1)      - Lines: 100% (4 / 4)      - Ignored: none      -

    -
    All files » __root__/ » index.js
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9  -1 -  -1 -  -1 -6 -  - 
    'use strict'
    -var path = require('path')
    - 
    -var uniqueSlug = require('unique-slug')
    - 
    -module.exports = function (filepath, prefix, uniq) {
    -  return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq))
    -}
    - 
    - -
    - - - - - - diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/base.css b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/base.css deleted file mode 100644 index a6a2f3284d0221..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/base.css +++ /dev/null @@ -1,182 +0,0 @@ -body, html { - margin:0; padding: 0; -} -body { - font-family: Helvetica Neue, Helvetica,Arial; - font-size: 10pt; -} -div.header, div.footer { - background: #eee; - padding: 1em; -} -div.header { - z-index: 100; - position: fixed; - top: 0; - border-bottom: 1px solid #666; - width: 100%; -} -div.footer { - border-top: 1px solid #666; -} -div.body { - margin-top: 10em; -} -div.meta { - font-size: 90%; - text-align: center; -} -h1, h2, h3 { - font-weight: normal; -} -h1 { - font-size: 12pt; -} -h2 { - font-size: 10pt; -} -pre { - font-family: Consolas, Menlo, Monaco, monospace; - margin: 0; - padding: 0; - line-height: 1.3; - font-size: 14px; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} - -div.path { font-size: 110%; } -div.path a:link, div.path a:visited { color: #000; } -table.coverage { border-collapse: collapse; margin:0; padding: 0 } - -table.coverage td { - margin: 0; - padding: 0; - color: #111; - vertical-align: top; -} -table.coverage td.line-count { - width: 50px; - text-align: right; - padding-right: 5px; -} -table.coverage td.line-coverage { - color: #777 !important; - text-align: right; - border-left: 1px solid #666; - border-right: 1px solid #666; -} - -table.coverage td.text { -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 40px; -} -table.coverage td span.cline-neutral { - background: #eee; -} -table.coverage td span.cline-yes { - background: #b5d592; - color: #999; -} -table.coverage td span.cline-no { - background: #fc8c84; -} - -.cstat-yes { color: #111; } -.cstat-no { background: #fc8c84; color: #111; } -.fstat-no { background: #ffc520; color: #111 !important; } -.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; } - -.missing-if-branch { - display: inline-block; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: black; - 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; -} - -.entity, .metric { font-weight: bold; } -.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; } -.metric small { font-size: 80%; font-weight: normal; color: #666; } - -div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; } -div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; } -div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; } -div.coverage-summary th.file { border-right: none !important; } -div.coverage-summary th.pic { border-left: none !important; text-align: right; } -div.coverage-summary th.pct { border-right: none !important; } -div.coverage-summary th.abs { border-left: none !important; text-align: right; } -div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; } -div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; } -div.coverage-summary td.file { border-left: 1px solid #666; white-space: nowrap; } -div.coverage-summary td.pic { min-width: 120px !important; } -div.coverage-summary a:link { text-decoration: none; color: #000; } -div.coverage-summary a:visited { text-decoration: none; color: #777; } -div.coverage-summary a:hover { text-decoration: underline; } -div.coverage-summary tfoot td { border-top: 1px solid #666; } - -div.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; -} -div.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -div.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} - -.high { background: #b5d592 !important; } -.medium { background: #ffe87c !important; } -.low { background: #fc8c84 !important; } - -span.cover-fill, span.cover-empty { - display:inline-block; - border:1px solid #444; - background: white; - height: 12px; -} -span.cover-fill { - background: #ccc; - border-right: 1px solid #444; -} -span.cover-empty { - background: white; - border-left: none; -} -span.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; } diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/index.html b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/index.html deleted file mode 100644 index b10d186cc3978e..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/index.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - Code coverage report for All files - - - - - - -
    -

    Code coverage report for All files

    -

    - Statements: 100% (4 / 4)      - Branches: 100% (2 / 2)      - Functions: 100% (1 / 1)      - Lines: 100% (4 / 4)      - Ignored: none      -

    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    __root__/100%(4 / 4)100%(2 / 2)100%(1 / 1)100%(4 / 4)
    -
    -
    - - - - - - diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.css b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.css deleted file mode 100644 index b317a7cda31a44..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.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/cacache/node_modules/unique-filename/coverage/prettify.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.js deleted file mode 100644 index ef51e03866898f..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/prettify.js +++ /dev/null @@ -1 +0,0 @@ -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/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.png b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.png deleted file mode 100644 index 03f704a609c6fd0dbfdac63466a7d7c958b5cbf3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 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) { - el = getNthColumn(i).querySelector('.sorter'); - 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/cacache/node_modules/unique-filename/index.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/index.js deleted file mode 100644 index 02bf1e273143c1..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' -var path = require('path') - -var uniqueSlug = require('unique-slug') - -module.exports = function (filepath, prefix, uniq) { - return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq)) -} diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/package.json b/deps/npm/node_modules/cacache/node_modules/unique-filename/package.json deleted file mode 100644 index 7f245898c08aba..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "unique-filename@^1.1.1", - "_id": "unique-filename@1.1.1", - "_inBundle": false, - "_integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "_location": "/cacache/unique-filename", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "unique-filename@^1.1.1", - "name": "unique-filename", - "escapedName": "unique-filename", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/cacache" - ], - "_resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "_shasum": "1d69769369ada0583103a1e6ae87681b56573230", - "_spec": "unique-filename@^1.1.1", - "_where": "/Users/aeschright/code/cli/node_modules/cacache", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org", - "url": "http://re-becca.org/" - }, - "bugs": { - "url": "https://github.com/iarna/unique-filename/issues" - }, - "bundleDependencies": false, - "dependencies": { - "unique-slug": "^2.0.0" - }, - "deprecated": false, - "description": "Generate a unique filename for use in temporary directories or caches.", - "devDependencies": { - "standard": "^5.4.1", - "tap": "^2.3.1" - }, - "homepage": "https://github.com/iarna/unique-filename", - "keywords": [], - "license": "ISC", - "main": "index.js", - "name": "unique-filename", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/unique-filename.git" - }, - "scripts": { - "test": "standard && tap test" - }, - "version": "1.1.1" -} diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js deleted file mode 100644 index 105b4e52e8b407..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js +++ /dev/null @@ -1,23 +0,0 @@ -'sue strict' -var t = require('tap') -var uniqueFilename = require('../index.js') - -t.plan(6) - -var randomTmpfile = uniqueFilename('tmp') -t.like(randomTmpfile, /^tmp.[a-f0-9]{8}$/, 'random tmp file') - -var randomAgain = uniqueFilename('tmp') -t.notEqual(randomAgain, randomTmpfile, 'random tmp files are not the same') - -var randomPrefixedTmpfile = uniqueFilename('tmp', 'my-test') -t.like(randomPrefixedTmpfile, /^tmp.my-test-[a-f0-9]{8}$/, 'random prefixed tmp file') - -var randomPrefixedAgain = uniqueFilename('tmp', 'my-test') -t.notEqual(randomPrefixedAgain, randomPrefixedTmpfile, 'random prefixed tmp files are not the same') - -var uniqueTmpfile = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') -t.like(uniqueTmpfile, /^tmp.testing-7ddd44c0$/, 'unique filename') - -var uniqueAgain = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') -t.is(uniqueTmpfile, uniqueAgain, 'same unique string component produces same filename') diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json index 7b45446dc710bc..c5cce2b1060c73 100644 --- a/deps/npm/node_modules/cacache/package.json +++ b/deps/npm/node_modules/cacache/package.json @@ -1,21 +1,26 @@ { - "_from": "cacache@11.3.2", - "_id": "cacache@11.3.2", + "_from": "cacache@^11.3.2", + "_id": "cacache@11.3.3", "_inBundle": false, - "_integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "_integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", "_location": "/cacache", "_phantomChildren": { - "unique-slug": "2.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "cacache@11.3.2", + "raw": "cacache@^11.3.2", "name": "cacache", "escapedName": "cacache", - "rawSpec": "11.3.2", + "rawSpec": "^11.3.2", "saveSpec": null, - "fetchSpec": "11.3.2" + "fetchSpec": "^11.3.2" }, "_requiredBy": [ "#USER", @@ -23,10 +28,10 @@ "/make-fetch-happen", "/pacote" ], - "_resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "_shasum": "2d81e308e3d258ca38125b676b98b2ac9ce69bfa", - "_spec": "cacache@11.3.2", - "_where": "/Users/aeschright/code/cli", + "_resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", + "_shasum": "8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc", + "_spec": "cacache@^11.3.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -58,17 +63,17 @@ } ], "dependencies": { - "bluebird": "^3.5.3", + "bluebird": "^3.5.5", "chownr": "^1.1.1", "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", + "glob": "^7.1.4", "graceful-fs": "^4.1.15", "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", + "rimraf": "^2.6.3", "ssri": "^6.0.1", "unique-filename": "^1.1.1", "y18n": "^4.0.0" @@ -77,15 +82,15 @@ "description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.", "devDependencies": { "benchmark": "^2.1.4", - "chalk": "^2.3.2", + "chalk": "^2.4.2", "cross-env": "^5.1.4", - "require-inject": "^1.4.2", - "standard": "^11.0.1", - "standard-version": "^4.4.0", - "tacks": "^1.2.7", - "tap": "^12.1.1", + "require-inject": "^1.4.4", + "standard": "^12.0.1", + "standard-version": "^6.0.1", + "tacks": "^1.3.0", + "tap": "^12.7.0", "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" + "weallcontribute": "^1.0.9" }, "files": [ "*.js", @@ -126,5 +131,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": "11.3.2" + "version": "11.3.3" } diff --git a/deps/npm/node_modules/cacache/put.js b/deps/npm/node_modules/cacache/put.js index 01b0dd84fc5ad5..cb4057fd5f8dd2 100644 --- a/deps/npm/node_modules/cacache/put.js +++ b/deps/npm/node_modules/cacache/put.js @@ -20,6 +20,7 @@ const PutOpts = figgyPudding({ gid: {}, single: {}, sep: {}, + error: {}, strict: {} }) @@ -28,7 +29,7 @@ function putData (cache, key, data, opts) { opts = PutOpts(opts) return write(cache, data, opts).then(res => { return index.insert( - cache, key, res.integrity, opts.concat({size: res.size}) + cache, key, res.integrity, opts.concat({ size: res.size }) ).then(entry => { if (opts.memoize) { memo.put(cache, entry, data, opts) @@ -63,7 +64,7 @@ function putStream (cache, key, opts) { }) }, cb => { contentStream.end(() => { - index.insert(cache, key, integrity, opts.concat({size})).then(entry => { + index.insert(cache, key, integrity, opts.concat({ size })).then(entry => { if (opts.memoize) { memo.put(cache, entry, Buffer.concat(memoData, memoTotal), opts) } diff --git a/deps/npm/node_modules/copy-concurrently/README.md~ b/deps/npm/node_modules/copy-concurrently/README.md~ new file mode 100644 index 00000000000000..8fbc31150f91b1 --- /dev/null +++ b/deps/npm/node_modules/copy-concurrently/README.md~ @@ -0,0 +1,127 @@ +# copy-concurrently + +Copy files, directories and symlinks + +``` +const copy = require('copy-concurrently') +copy('/path/to/thing', '/new/path/thing').then(() => { + // this is now copied +}).catch(err => { + // oh noooo +}) +``` + +Copies files, directories and symlinks. Ownership is maintained when +running as root, permissions are always maintained. On Windows, if symlinks +are unavailable then junctions will be used. + +## PUBLIC INTERFACE + +### copy(from, to, [options]) → Promise + +Recursively copies `from` to `to` and resolves its promise when finished. +If `to` already exists then the promise will be rejected with an `EEXIST` +error. + +Options are: + +* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once. +* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. + +Options can also include dependency injection: + +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. + +## EXTENSION INTERFACE + +Ordinarily you'd only call `copy` above. But it's possible to use it's +component functions directly. This is useful if, say, you're writing +[move-concurently](https://npmjs.com/package/move-concurrently). + +### copy.file(from, to, options) → Promise + +Copies a ordinary file `from` to destination `to`. Uses +`fs-write-stream-atomic` to ensure that the file is entirely copied or not +at all. + +Options are: + +* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to + set the user and group of `to`. If uid is present then gid must be too. +* mode - (Optional) If set then `to` will have its perms set to `mode`. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. + +### copy.symlink(from, to, options) → Promise + +Copies a symlink `from` to destination `to`. If on Windows then if +symlinking fails, a junction will be used instead. + +Options are: + +* top - The top level the copy is being run from. This is used to determine + if the symlink destination is within the set of files we're copying or + outside it. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. + +### copy.recurse(from, to, options) → Promise + +Reads all of the files in directory `from` and adds them to the `queue` +using `recurseWith` (by default `copy.item`). + +Options are: + +* queue - A [`run-queue`](https://npmjs.com/package/run-queue) object to add files found inside `from` to. +* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory. +* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to + set the user and group of `to`. If uid is present then gid must be too. +* mode - (Optional) If set then `to` will have its perms set to `mode`. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. + +### copy.item(from, to, options) → Promise + +Copies some kind of `from` to destination `to`. This looks at the filetype +and calls `copy.file`, `copy.symlink` or `copy.recurse` as appropriate. + +Symlink copies are queued with a priority such that they happen after all +file and directory copies as you can't create a junction on windows to a +file that doesn't exist yet. + +Options are: + +* top - The top level the copy is being run from. This is used to determine + if the symlink destination is within the set of files we're copying or + outside it. +* queue - The [`run-queue`](https://npmjs.com/package/run-queue) object to + pass to `copy.recurse` if `from` is a directory. +* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory. +* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to + set the user and group of `to`. If uid is present then gid must be too. +* mode - (Optional) If set then `to` will have its perms set to `mode`. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. diff --git a/deps/npm/node_modules/debug/.eslintrc b/deps/npm/node_modules/debug/.eslintrc new file mode 100644 index 00000000000000..146371edbe3251 --- /dev/null +++ b/deps/npm/node_modules/debug/.eslintrc @@ -0,0 +1,14 @@ +{ + "env": { + "browser": true, + "node": true + }, + "globals": { + "chrome": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/deps/npm/node_modules/define-properties/.editorconfig b/deps/npm/node_modules/define-properties/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/define-properties/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/define-properties/.eslintrc b/deps/npm/node_modules/define-properties/.eslintrc new file mode 100644 index 00000000000000..db992d7a90c021 --- /dev/null +++ b/deps/npm/node_modules/define-properties/.eslintrc @@ -0,0 +1,12 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [2, { "min": 1, "max": 35 }], + "max-lines-per-function": [2, 100], + "max-params": [2, 4], + "max-statements": [2, 13] + } +} diff --git a/deps/npm/node_modules/define-properties/.jscs.json b/deps/npm/node_modules/define-properties/.jscs.json new file mode 100644 index 00000000000000..30d54076557d92 --- /dev/null +++ b/deps/npm/node_modules/define-properties/.jscs.json @@ -0,0 +1,174 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 3 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/define-properties/.travis.yml b/deps/npm/node_modules/define-properties/.travis.yml new file mode 100644 index 00000000000000..ec72d5f3d36b78 --- /dev/null +++ b/deps/npm/node_modules/define-properties/.travis.yml @@ -0,0 +1,233 @@ +language: node_js +os: + - linux +node_js: + - "10.8" + - "9.11" + - "8.11" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/deps/npm/node_modules/define-properties/CHANGELOG.md b/deps/npm/node_modules/define-properties/CHANGELOG.md new file mode 100644 index 00000000000000..5cad1e26a01945 --- /dev/null +++ b/deps/npm/node_modules/define-properties/CHANGELOG.md @@ -0,0 +1,44 @@ +1.1.3 / 2018-08-14 +================= + * [Refactor] use a for loop instead of `foreach` to make for smaller bundle sizes + * [Robustness] cache `Array.prototype.concat` and `Object.defineProperty` + * [Deps] update `object-keys` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape`, `jscs`; remove unused eccheck script + dep + * [Tests] use pretest/posttest for linting/security + * [Tests] fix npm upgrades on older nodes + +1.1.2 / 2015-10-14 +================= + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Deps] Update `object-keys` + * [Dev Deps] update `jscs`, `tape`, `eslint`, `@ljharb/eslint-config`, `nsp` + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + +1.1.1 / 2015-07-21 +================= + * [Deps] Update `object-keys` + * [Dev Deps] Update `tape`, `eslint` + * [Tests] Test on `io.js` `v2.4` + +1.1.0 / 2015-07-01 +================= + * [New] Add support for symbol-valued properties. + * [Dev Deps] Update `nsp`, `eslint` + * [Tests] Test up to `io.js` `v2.3` + +1.0.3 / 2015-05-30 +================= + * Using a more reliable check for supported property descriptors. + +1.0.2 / 2015-05-23 +================= + * Test up to `io.js` `v2.0` + * Update `tape`, `jscs`, `nsp`, `eslint`, `object-keys`, `editorconfig-tools`, `covert` + +1.0.1 / 2015-01-06 +================= + * Update `object-keys` to fix ES3 support + +1.0.0 / 2015-01-04 +================= + * v1.0.0 diff --git a/deps/npm/node_modules/define-properties/LICENSE b/deps/npm/node_modules/define-properties/LICENSE new file mode 100644 index 00000000000000..8c271c14b62fa2 --- /dev/null +++ b/deps/npm/node_modules/define-properties/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2015 Jordan Harband + +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. \ No newline at end of file diff --git a/deps/npm/node_modules/define-properties/README.md b/deps/npm/node_modules/define-properties/README.md new file mode 100644 index 00000000000000..9b60c5f5b7efc8 --- /dev/null +++ b/deps/npm/node_modules/define-properties/README.md @@ -0,0 +1,85 @@ +#define-properties [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines. +Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides. + +## Example + +```js +var define = require('define-properties'); +var assert = require('assert'); + +var obj = define({ a: 1, b: 2 }, { + a: 10, + b: 20, + c: 30 +}); +assert(obj.a === 1); +assert(obj.b === 2); +assert(obj.c === 30); +if (define.supportsDescriptors) { + assert.deepEqual(Object.keys(obj), ['a', 'b']); + assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'c'), { + configurable: true, + enumerable: false, + value: 30, + writable: false + }); +} +``` + +Then, with predicates: +```js +var define = require('define-properties'); +var assert = require('assert'); + +var obj = define({ a: 1, b: 2, c: 3 }, { + a: 10, + b: 20, + c: 30 +}, { + a: function () { return false; }, + b: function () { return true; } +}); +assert(obj.a === 1); +assert(obj.b === 20); +assert(obj.c === 3); +if (define.supportsDescriptors) { + assert.deepEqual(Object.keys(obj), ['a', 'c']); + assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'b'), { + configurable: true, + enumerable: false, + value: 20, + writable: false + }); +} +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/define-properties +[npm-version-svg]: http://versionbadg.es/ljharb/define-properties.svg +[travis-svg]: https://travis-ci.org/ljharb/define-properties.svg +[travis-url]: https://travis-ci.org/ljharb/define-properties +[deps-svg]: https://david-dm.org/ljharb/define-properties.svg +[deps-url]: https://david-dm.org/ljharb/define-properties +[dev-deps-svg]: https://david-dm.org/ljharb/define-properties/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/define-properties#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/define-properties.png +[testling-url]: https://ci.testling.com/ljharb/define-properties +[npm-badge-png]: https://nodei.co/npm/define-properties.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/define-properties.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/define-properties.svg +[downloads-url]: http://npm-stat.com/charts.html?package=define-properties diff --git a/deps/npm/node_modules/define-properties/index.js b/deps/npm/node_modules/define-properties/index.js new file mode 100644 index 00000000000000..cb3ae1c7cb3986 --- /dev/null +++ b/deps/npm/node_modules/define-properties/index.js @@ -0,0 +1,58 @@ +'use strict'; + +var keys = require('object-keys'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var origDefineProperty = Object.defineProperty; + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var arePropertyDescriptorsSupported = function () { + var obj = {}; + try { + origDefineProperty(obj, 'x', { enumerable: false, value: obj }); + // eslint-disable-next-line no-unused-vars, no-restricted-syntax + for (var _ in obj) { // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { /* this is IE 8. */ + return false; + } +}; +var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value: value, + writable: true + }); + } else { + object[name] = value; + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; diff --git a/deps/npm/node_modules/define-properties/package.json b/deps/npm/node_modules/define-properties/package.json new file mode 100644 index 00000000000000..c6b2f975b775e7 --- /dev/null +++ b/deps/npm/node_modules/define-properties/package.json @@ -0,0 +1,69 @@ +{ + "name": "define-properties", + "version": "1.1.3", + "author": "Jordan Harband", + "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "node test/index.js", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "npm run --silent jscs && npm run --silent eslint", + "jscs": "jscs test/*.js *.js", + "eslint": "eslint test/*.js *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/define-properties.git" + }, + "keywords": [ + "Object.defineProperty", + "Object.defineProperties", + "object", + "property descriptor", + "descriptor", + "define", + "ES5" + ], + "dependencies": { + "object-keys": "^1.0.12" + }, + "devDependencies": { + "@ljharb/eslint-config": "^13.0.0", + "covert": "^1.1.0", + "eslint": "^5.3.0", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "tape": "^4.9.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz" +,"_integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==" +,"_from": "define-properties@1.1.3" +} \ No newline at end of file diff --git a/deps/npm/node_modules/define-properties/test/index.js b/deps/npm/node_modules/define-properties/test/index.js new file mode 100644 index 00000000000000..3387f6bc7bbe98 --- /dev/null +++ b/deps/npm/node_modules/define-properties/test/index.js @@ -0,0 +1,125 @@ +'use strict'; + +var define = require('../'); +var test = require('tape'); +var keys = require('object-keys'); + +var arePropertyDescriptorsSupported = function () { + var obj = { a: 1 }; + try { + Object.defineProperty(obj, 'x', { value: obj }); + return obj.x === obj; + } catch (e) { /* this is IE 8. */ + return false; + } +}; +var descriptorsSupported = !!Object.defineProperty && arePropertyDescriptorsSupported(); + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +test('defineProperties', function (dt) { + dt.test('with descriptor support', { skip: !descriptorsSupported }, function (t) { + var getDescriptor = function (value) { + return { + configurable: true, + enumerable: false, + value: value, + writable: true + }; + }; + + var obj = { + a: 1, + b: 2, + c: 3 + }; + t.deepEqual(keys(obj), ['a', 'b', 'c'], 'all literal-set keys start enumerable'); + define(obj, { + b: 3, + c: 4, + d: 5 + }); + t.deepEqual(obj, { + a: 1, + b: 2, + c: 3 + }, 'existing properties were not overridden'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'new property "d" was added and is not enumerable'); + t.deepEqual(['a', 'b', 'c'], keys(obj), 'new keys are not enumerable'); + + define(obj, { + a: 2, + b: 3, + c: 4 + }, { + a: function () { return true; }, + b: function () { return false; } + }); + t.deepEqual(obj, { + b: 2, + c: 3 + }, 'properties only overriden when predicate exists and returns true'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'existing property "d" remained and is not enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'a'), getDescriptor(2), 'existing property "a" was overridden and is not enumerable'); + t.deepEqual(['b', 'c'], keys(obj), 'overridden keys are not enumerable'); + + t.end(); + }); + + dt.test('without descriptor support', { skip: descriptorsSupported }, function (t) { + var obj = { + a: 1, + b: 2, + c: 3 + }; + define(obj, { + b: 3, + c: 4, + d: 5 + }); + t.deepEqual(obj, { + a: 1, + b: 2, + c: 3, + d: 5 + }, 'existing properties were not overridden, new properties were added'); + + define(obj, { + a: 2, + b: 3, + c: 4 + }, { + a: function () { return true; }, + b: function () { return false; } + }); + t.deepEqual(obj, { + a: 2, + b: 2, + c: 3, + d: 5 + }, 'properties only overriden when predicate exists and returns true'); + + t.end(); + }); + + dt.end(); +}); + +test('symbols', { skip: !hasSymbols }, function (t) { + var sym = Symbol('foo'); + var obj = {}; + var aValue = {}; + var bValue = {}; + var properties = { a: aValue }; + properties[sym] = bValue; + + define(obj, properties); + + t.deepEqual(Object.keys(obj), [], 'object has no enumerable keys'); + t.deepEqual(Object.getOwnPropertyNames(obj), ['a'], 'object has non-enumerable "a" key'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'object has non-enumerable symbol key'); + t.equal(obj.a, aValue, 'string keyed value is defined'); + t.equal(obj[sym], bValue, 'symbol keyed value is defined'); + + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/.editorconfig b/deps/npm/node_modules/es-abstract/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/es-abstract/.eslintrc b/deps/npm/node_modules/es-abstract/.eslintrc new file mode 100644 index 00000000000000..9478bfa1d345c2 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.eslintrc @@ -0,0 +1,23 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "complexity": 0, + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 30 }], + "max-lines": [2, 700], + "max-params": [2, 4], + "max-statements": [2, 24], + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "new-cap": 0, + "no-extra-parens": 1, + "operator-linebreak": [2, "before"], + "sort-keys": 0 + } +} diff --git a/deps/npm/node_modules/es-abstract/.jscs.json b/deps/npm/node_modules/es-abstract/.jscs.json new file mode 100644 index 00000000000000..a6ed539a81db81 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.jscs.json @@ -0,0 +1,173 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 9 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": false, + + "validateOrderInObjectKeys": false, + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": false, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/es-abstract/.nycrc b/deps/npm/node_modules/es-abstract/.nycrc new file mode 100644 index 00000000000000..1b02cf1848d847 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.nycrc @@ -0,0 +1,14 @@ +{ + "all": true, + "check-coverage": true, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 87.03, + "statements": 86.87, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "operations", + "test" + ] +} diff --git a/deps/npm/node_modules/es-abstract/.travis.yml b/deps/npm/node_modules/es-abstract/.travis.yml new file mode 100644 index 00000000000000..ce65a2f98159ae --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.travis.yml @@ -0,0 +1,232 @@ +language: node_js +os: + - linux +node_js: + - "10.2" + - "9.11" + - "8.11" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" + - "0.6" +cache: + directories: + - "$HOME/.npm" + - "$(nvm cache dir)" + - "$(nvm_version_path $(nvm_version_remote 0.4))" + - "$(nvm_version_path $(nvm_version_remote 0.6))" + - "$(nvm_version_path $(nvm_version_remote 0.10))" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage && bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "0.8" + env: COVERAGE=true + - node_js: "0.12" + env: COVERAGE=true + - node_js: "4" + env: COVERAGE=true + - node_js: "8" + env: COVERAGE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/deps/npm/node_modules/es-abstract/CHANGELOG.md b/deps/npm/node_modules/es-abstract/CHANGELOG.md new file mode 100644 index 00000000000000..daa7b660a8cfcb --- /dev/null +++ b/deps/npm/node_modules/es-abstract/CHANGELOG.md @@ -0,0 +1,175 @@ +1.12.0 / 2018-05-31 +================= + * [New] add `GetIntrinsic` entry point + * [New] `ES2015`+: add `ObjectCreate` + * [Robustness]: `ES2015+`: ensure `Math.{abs,floor}` and `Function.call` are cached + +1.11.0 / 2018-03-21 +================= + * [New] `ES2015+`: add iterator abstract ops + * [Dev Deps] update `eslint`, `nsp`, `object.assign`, `semver`, `tape` + * [Tests] up to `node` `v9.8`, `v8.10`, `v6.13` + +1.10.0 / 2017-11-24 +================= + * [New] ES2015+: `AdvanceStringIndex` + * [Dev Deps] update `eslint`, `nsp` + * [Tests] require node 0.6 to pass again + * [Tests] up to `node` `v9.2`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS + +1.9.0 / 2017-09-30 +================= + * [New] `es2015+`: add `ArraySpeciesCreate` + * [New] ES2015+: add `CreateDataProperty` and `CreateDataPropertyOrThrow` + * [Tests] consolidate duplicated tests + * [Tests] increase coverage + * [Dev Deps] update `nsp`, `eslint` + +1.8.2 / 2017-09-03 +================= + * [Fix] `es2015`+: `ToNumber`: provide the proper hint for Date objects (#27) + * [Dev Deps] update `eslint` + +1.8.1 / 2017-08-30 +================= + * [Fix] ES2015+: `ToPropertyKey`: should return a symbol for Symbols (#26) + * [Deps] update `function-bind` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + * [Docs] github broke markdown parsing + +1.8.0 / 2017-08-04 +================= + * [New] add ES2017 + * [New] move es6+ to es2015+; leave es6/es7 as aliases + * [New] ES5+: add `IsPropertyDescriptor`, `IsAccessorDescriptor`, `IsDataDescriptor`, `IsGenericDescriptor`, `FromPropertyDescriptor`, `ToPropertyDescriptor` + * [New] ES2015+: add `CompletePropertyDescriptor`, `Set`, `HasOwnProperty`, `HasProperty`, `IsConcatSpreadable`, `Invoke`, `CreateIterResultObject`, `RegExpExec` + * [Fix] es7/es2016: do not mutate ES6 + * [Fix] assign helper only supports one source + * [Deps] update `is-regex` + * [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `semver`, `tape` + * [Tests] add tests for missing and excess operations + * [Tests] add codecov for coverage + * [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v4.8`; newer npm breaks on older node + * [Tests] use same lists of value types across tests; ensure tests are the same when ops are the same + * [Tests] ES2015: add ToNumber symbol tests + * [Tests] switch to `nyc` for code coverage + * [Tests] make IsRegExp tests consistent across editions + +1.7.0 / 2017-01-22 +================= + * [New] ES6: Add `GetMethod` (#16) + * [New] ES6: Add `GetV` (#16) + * [New] ES6: Add `Get` (#17) + * [Tests] up to `node` `v7.4`, `v6.9`, `v4.6`; improve test matrix + * [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` + +1.6.1 / 2016-08-21 +================= + * [Fix] ES6: IsConstructor should return true for `class` constructors. + +1.6.0 / 2016-08-20 +================= + * [New] ES5 / ES6: add `Type` + * [New] ES6: `SpeciesConstructor` + * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`; add `safe-publish-latest` + * [Tests] up to `node` `v6.4`, `v5.12`, `v4.5` + +1.5.1 / 2016-05-30 +================= + * [Fix] `ES.IsRegExp`: actually look up `Symbol.match` on the argument + * [Refactor] create `isNaN` helper + * [Deps] update `is-callable`, `function-bind` + * [Deps] update `es-to-primitive`, fix ES5 tests + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape`, `nsp` + * [Tests] up to `node` `v6.2`, `v5.11`, `v4.4` + * [Tests] use pretest/posttest for linting/security + +1.5.0 / 2015-12-27 +================= + * [New] adds `Symbol.toPrimitive` support via `es-to-primitive` + * [Deps] update `is-callable`, `es-to-primitive` + * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape` + * [Tests] up to `node` `v5.3` + +1.4.3 / 2015-11-04 +================= + * [Fix] `ES6.ToNumber`: should give `NaN` for explicitly signed hex strings (#4) + * [Refactor] `ES6.ToNumber`: No need to double-trim + * [Refactor] group tests better + * [Tests] should still pass on `node` `v0.8` + +1.4.2 / 2015-11-02 +================= + * [Fix] ensure `ES.ToNumber` trims whitespace, and does not trim non-whitespace (#3) + +1.4.1 / 2015-10-31 +================= + * [Fix] ensure only 0-1 are valid binary and 0-7 are valid octal digits (#2) + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Tests] on `node` `v5.0` + * [Tests] fix npm upgrades for older node versions + * package.json: use object form of "authors", add "contributors" + +1.4.0 / 2015-09-26 +================= + * [Deps] update `is-callable` + * [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` + * [Tests] on `node` `v4.2` + * [New] Add `SameValueNonNumber` to ES7 + +1.3.2 / 2015-09-26 +================= + * [Fix] Fix `ES6.IsRegExp` to properly handle `Symbol.match`, per spec. + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` + +1.3.1 / 2015-08-15 +================= + * [Fix] Ensure that objects that `toString` to a binary or octal literal also convert properly + +1.3.0 / 2015-08-15 +================= + * [New] ES6’s ToNumber now supports binary and octal literals. + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Tests] up to `io.js` `v3.0` + +1.2.2 / 2015-07-28 +================= + * [Fix] Both `ES5.CheckObjectCoercible` and `ES6.RequireObjectCoercible` return the value if they don't throw. + * [Tests] Test on latest `io.js` versions. + * [Dev Deps] Update `eslint`, `jscs`, `tape`, `semver`, `covert`, `nsp` + +1.2.1 / 2015-03-20 +================= + * Fix `isFinite` helper. + +1.2.0 / 2015-03-19 +================= + * Use `es-to-primitive` for ToPrimitive methods. + * Test on latest `io.js` versions; allow failures on all but 2 latest `node`/`io.js` versions. + +1.1.2 / 2015-03-20 +================= + * Fix isFinite helper. + +1.1.1 / 2015-03-19 +================= + * Fix isPrimitive check for functions + * Update `eslint`, `editorconfig-tools`, `semver`, `nsp` + +1.1.0 / 2015-02-17 +================= + * Add ES7 export (non-default). + * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. + * Test on `iojs-v1.2`. + +1.0.1 / 2015-01-30 +================= + * Use `is-callable` instead of an internal function. + * Update `tape`, `jscs`, `nsp`, `eslint` + +1.0.0 / 2015-01-10 +================= + * v1.0.0 diff --git a/deps/npm/node_modules/es-abstract/GetIntrinsic.js b/deps/npm/node_modules/es-abstract/GetIntrinsic.js new file mode 100644 index 00000000000000..62dbf05d6379a2 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/GetIntrinsic.js @@ -0,0 +1,177 @@ +'use strict'; + +/* globals + Set, + Map, + WeakSet, + WeakMap, + + Promise, + + Symbol, + Proxy, + + Atomics, + SharedArrayBuffer, + + ArrayBuffer, + DataView, + Uint8Array, + Float32Array, + Float64Array, + Int8Array, + Int16Array, + Int32Array, + Uint8ClampedArray, + Uint16Array, + Uint32Array, +*/ + +var undefined; // eslint-disable-line no-shadow-restricted-names + +var ThrowTypeError = Object.getOwnPropertyDescriptor + ? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }()) + : function () { throw new TypeError(); }; + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var generator; // = function * () {}; +var generatorFunction = generator ? getProto(generator) : undefined; +var asyncFn; // async function() {}; +var asyncFunction = asyncFn ? asyncFn.constructor : undefined; +var asyncGen; // async function * () {}; +var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined; +var asyncGenIterator = asyncGen ? asyncGen() : undefined; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '$ %Array%': Array, + '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype, + '$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '$ %ArrayPrototype%': Array.prototype, + '$ %ArrayProto_entries%': Array.prototype.entries, + '$ %ArrayProto_forEach%': Array.prototype.forEach, + '$ %ArrayProto_keys%': Array.prototype.keys, + '$ %ArrayProto_values%': Array.prototype.values, + '$ %AsyncFromSyncIteratorPrototype%': undefined, + '$ %AsyncFunction%': asyncFunction, + '$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined, + '$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined, + '$ %AsyncGeneratorFunction%': asyncGenFunction, + '$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined, + '$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined, + '$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '$ %Boolean%': Boolean, + '$ %BooleanPrototype%': Boolean.prototype, + '$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype, + '$ %Date%': Date, + '$ %DatePrototype%': Date.prototype, + '$ %decodeURI%': decodeURI, + '$ %decodeURIComponent%': decodeURIComponent, + '$ %encodeURI%': encodeURI, + '$ %encodeURIComponent%': encodeURIComponent, + '$ %Error%': Error, + '$ %ErrorPrototype%': Error.prototype, + '$ %eval%': eval, // eslint-disable-line no-eval + '$ %EvalError%': EvalError, + '$ %EvalErrorPrototype%': EvalError.prototype, + '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype, + '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype, + '$ %Function%': Function, + '$ %FunctionPrototype%': Function.prototype, + '$ %Generator%': generator ? getProto(generator()) : undefined, + '$ %GeneratorFunction%': generatorFunction, + '$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined, + '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype, + '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype, + '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype, + '$ %isFinite%': isFinite, + '$ %isNaN%': isNaN, + '$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '$ %JSON%': JSON, + '$ %JSONParse%': JSON.parse, + '$ %Map%': typeof Map === 'undefined' ? undefined : Map, + '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype, + '$ %Math%': Math, + '$ %Number%': Number, + '$ %NumberPrototype%': Number.prototype, + '$ %Object%': Object, + '$ %ObjectPrototype%': Object.prototype, + '$ %ObjProto_toString%': Object.prototype.toString, + '$ %ObjProto_valueOf%': Object.prototype.valueOf, + '$ %parseFloat%': parseFloat, + '$ %parseInt%': parseInt, + '$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype, + '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then, + '$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all, + '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject, + '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve, + '$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '$ %RangeError%': RangeError, + '$ %RangeErrorPrototype%': RangeError.prototype, + '$ %ReferenceError%': ReferenceError, + '$ %ReferenceErrorPrototype%': ReferenceError.prototype, + '$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '$ %RegExp%': RegExp, + '$ %RegExpPrototype%': RegExp.prototype, + '$ %Set%': typeof Set === 'undefined' ? undefined : Set, + '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype, + '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype, + '$ %String%': String, + '$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '$ %StringPrototype%': String.prototype, + '$ %Symbol%': hasSymbols ? Symbol : undefined, + '$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined, + '$ %SyntaxError%': SyntaxError, + '$ %SyntaxErrorPrototype%': SyntaxError.prototype, + '$ %ThrowTypeError%': ThrowTypeError, + '$ %TypedArray%': TypedArray, + '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined, + '$ %TypeError%': TypeError, + '$ %TypeErrorPrototype%': TypeError.prototype, + '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype, + '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype, + '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype, + '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype, + '$ %URIError%': URIError, + '$ %URIErrorPrototype%': URIError.prototype, + '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype, + '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new TypeError('"allowMissing" argument must be a boolean'); + } + + var key = '$ ' + name; + if (!(key in INTRINSICS)) { + throw new SyntaxError('intrinsic ' + name + ' does not exist!'); + } + + // istanbul ignore if // hopefully this is impossible to test :-) + if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) { + throw new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + return INTRINSICS[key]; +}; diff --git a/deps/npm/node_modules/es-abstract/LICENSE b/deps/npm/node_modules/es-abstract/LICENSE new file mode 100644 index 00000000000000..8c271c14b62fa2 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2015 Jordan Harband + +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. \ No newline at end of file diff --git a/deps/npm/node_modules/es-abstract/Makefile b/deps/npm/node_modules/es-abstract/Makefile new file mode 100644 index 00000000000000..959bbd49c1def0 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js */*.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/es-abstract/README.md b/deps/npm/node_modules/es-abstract/README.md new file mode 100644 index 00000000000000..0fbf079ccb97dc --- /dev/null +++ b/deps/npm/node_modules/es-abstract/README.md @@ -0,0 +1,44 @@ +# es-abstract [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +ECMAScript spec abstract operations. +When different versions of the spec conflict, the default export will be the latest version of the abstract operation. +All abstract operations will also be available under an `es5`/`es2015`/`es2016` entry point, and exported property, if you require a specific version. + +## Example + +```js +var ES = require('es-abstract'); +var assert = require('assert'); + +assert(ES.isCallable(function () {})); +assert(!ES.isCallable(/a/g)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/es-abstract +[npm-version-svg]: http://versionbadg.es/ljharb/es-abstract.svg +[travis-svg]: https://travis-ci.org/ljharb/es-abstract.svg +[travis-url]: https://travis-ci.org/ljharb/es-abstract +[deps-svg]: https://david-dm.org/ljharb/es-abstract.svg +[deps-url]: https://david-dm.org/ljharb/es-abstract +[dev-deps-svg]: https://david-dm.org/ljharb/es-abstract/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-abstract#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/es-abstract.png +[testling-url]: https://ci.testling.com/ljharb/es-abstract +[npm-badge-png]: https://nodei.co/npm/es-abstract.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-abstract.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-abstract.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-abstract diff --git a/deps/npm/node_modules/es-abstract/es2015.js b/deps/npm/node_modules/es-abstract/es2015.js new file mode 100644 index 00000000000000..1a4d7de5608db1 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es2015.js @@ -0,0 +1,693 @@ +'use strict'; + +var has = require('has'); +var toPrimitive = require('es-to-primitive/es6'); + +var GetIntrinsic = require('./GetIntrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $Array = GetIntrinsic('%Array%'); +var $String = GetIntrinsic('%String%'); +var $Object = GetIntrinsic('%Object%'); +var $Number = GetIntrinsic('%Number%'); +var $Symbol = GetIntrinsic('%Symbol%', true); +var $RegExp = GetIntrinsic('%RegExp%'); + +var hasSymbols = !!$Symbol; + +var $isNaN = require('./helpers/isNaN'); +var $isFinite = require('./helpers/isFinite'); +var MAX_SAFE_INTEGER = $Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; + +var assign = require('./helpers/assign'); +var sign = require('./helpers/sign'); +var mod = require('./helpers/mod'); +var isPrimitive = require('./helpers/isPrimitive'); +var parseInteger = parseInt; +var bind = require('function-bind'); +var arraySlice = bind.call(Function.call, $Array.prototype.slice); +var strSlice = bind.call(Function.call, $String.prototype.slice); +var isBinary = bind.call(Function.call, $RegExp.prototype.test, /^0b[01]+$/i); +var isOctal = bind.call(Function.call, $RegExp.prototype.test, /^0o[0-7]+$/i); +var regexExec = bind.call(Function.call, $RegExp.prototype.exec); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = bind.call(Function.call, $RegExp.prototype.test, nonWSregex); +var invalidHexLiteral = /^[-+]0x[0-9a-f]+$/i; +var isInvalidHexLiteral = bind.call(Function.call, $RegExp.prototype.test, invalidHexLiteral); +var $charCodeAt = bind.call(Function.call, $String.prototype.charCodeAt); + +var toStr = bind.call(Function.call, Object.prototype.toString); + +var $floor = Math.floor; +var $abs = Math.abs; + +var $ObjectCreate = Object.create; +var $gOPD = $Object.getOwnPropertyDescriptor; + +var $isExtensible = $Object.isExtensible; + +// whitespace from: http://es5.github.io/#x15.5.4.20 +// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 +var ws = [ + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', + '\u2029\uFEFF' +].join(''); +var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g'); +var replace = bind.call(Function.call, $String.prototype.replace); +var trim = function (value) { + return replace(value, trimRegex, ''); +}; + +var ES5 = require('./es5'); + +var hasRegExpMatcher = require('is-regex'); + +// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-abstract-operations +var ES6 = assign(assign({}, ES5), { + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-call-f-v-args + Call: function Call(F, V) { + var args = arguments.length > 2 ? arguments[2] : []; + if (!this.IsCallable(F)) { + throw new $TypeError(F + ' is not a function'); + } + return F.apply(V, args); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toprimitive + ToPrimitive: toPrimitive, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toboolean + // ToBoolean: ES5.ToBoolean, + + // https://ecma-international.org/ecma-262/6.0/#sec-tonumber + ToNumber: function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : toPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return this.ToNumber(parseInteger(strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return this.ToNumber(parseInteger(strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } else { + var trimmed = trim(value); + if (trimmed !== value) { + return this.ToNumber(trimmed); + } + } + } + return $Number(value); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tointeger + // ToInteger: ES5.ToNumber, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint32 + // ToInt32: ES5.ToInt32, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint32 + // ToUint32: ES5.ToUint32, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint16 + ToInt16: function ToInt16(argument) { + var int16bit = this.ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint16 + // ToUint16: ES5.ToUint16, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint8 + ToInt8: function ToInt8(argument) { + var int8bit = this.ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8 + ToUint8: function ToUint8(argument) { + var number = this.ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = sign(number) * $floor($abs(number)); + return mod(posInt, 0x100); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8clamp + ToUint8Clamp: function ToUint8Clamp(argument) { + var number = this.ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = $floor(argument); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring + ToString: function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toobject + ToObject: function ToObject(value) { + this.RequireObjectCoercible(value); + return $Object(value); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-topropertykey + ToPropertyKey: function ToPropertyKey(argument) { + var key = this.ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : this.ToString(key); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength + ToLength: function ToLength(argument) { + var len = this.ToInteger(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring + CanonicalNumericIndexString: function CanonicalNumericIndexString(argument) { + if (toStr(argument) !== '[object String]') { + throw new $TypeError('must be a string'); + } + if (argument === '-0') { return -0; } + var n = this.ToNumber(argument); + if (this.SameValue(this.ToString(n), argument)) { return n; } + return void 0; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-requireobjectcoercible + RequireObjectCoercible: ES5.CheckObjectCoercible, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isarray + IsArray: $Array.isArray || function IsArray(argument) { + return toStr(argument) === '[object Array]'; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-iscallable + // IsCallable: ES5.IsCallable, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isconstructor + IsConstructor: function IsConstructor(argument) { + return typeof argument === 'function' && !!argument.prototype; // unfortunately there's no way to truly check this without try/catch `new argument` + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isextensible-o + IsExtensible: Object.preventExtensions + ? function IsExtensible(obj) { + if (isPrimitive(obj)) { + return false; + } + return $isExtensible(obj); + } + : function isExtensible(obj) { return true; }, // eslint-disable-line no-unused-vars + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isinteger + IsInteger: function IsInteger(argument) { + if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var abs = $abs(argument); + return $floor(abs) === abs; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ispropertykey + IsPropertyKey: function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-isregexp + IsRegExp: function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if (hasSymbols) { + var isRegExp = argument[$Symbol.match]; + if (typeof isRegExp !== 'undefined') { + return ES5.ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevalue + // SameValue: ES5.SameValue, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero + SameValueZero: function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); + }, + + /** + * 7.3.2 GetV (V, P) + * 1. Assert: IsPropertyKey(P) is true. + * 2. Let O be ToObject(V). + * 3. ReturnIfAbrupt(O). + * 4. Return O.[[Get]](P, V). + */ + GetV: function GetV(V, P) { + // 7.3.2.1 + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.2.2-3 + var O = this.ToObject(V); + + // 7.3.2.4 + return O[P]; + }, + + /** + * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod + * 1. Assert: IsPropertyKey(P) is true. + * 2. Let func be GetV(O, P). + * 3. ReturnIfAbrupt(func). + * 4. If func is either undefined or null, return undefined. + * 5. If IsCallable(func) is false, throw a TypeError exception. + * 6. Return func. + */ + GetMethod: function GetMethod(O, P) { + // 7.3.9.1 + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = this.GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!this.IsCallable(func)) { + throw new $TypeError(P + 'is not a function'); + } + + // 7.3.9.6 + return func; + }, + + /** + * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p + * 1. Assert: Type(O) is Object. + * 2. Assert: IsPropertyKey(P) is true. + * 3. Return O.[[Get]](P, O). + */ + Get: function Get(O, P) { + // 7.3.1.1 + if (this.Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + // 7.3.1.3 + return O[P]; + }, + + Type: function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + return ES5.Type(x); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor + SpeciesConstructor: function SpeciesConstructor(O, defaultConstructor) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (this.Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = hasSymbols && $Symbol.species ? C[$Symbol.species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (this.IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor + CompletePropertyDescriptor: function CompletePropertyDescriptor(Desc) { + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (this.IsGenericDescriptor(Desc) || this.IsDataDescriptor(Desc)) { + if (!has(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!has(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!has(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!has(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!has(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!has(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw + Set: function Set(O, P, V, Throw) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('O must be an Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('P must be a Property Key'); + } + if (this.Type(Throw) !== 'Boolean') { + throw new $TypeError('Throw must be a Boolean'); + } + if (Throw) { + O[P] = V; + return true; + } else { + try { + O[P] = V; + } catch (e) { + return false; + } + } + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty + HasOwnProperty: function HasOwnProperty(O, P) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('O must be an Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('P must be a Property Key'); + } + return has(O, P); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-hasproperty + HasProperty: function HasProperty(O, P) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('O must be an Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('P must be a Property Key'); + } + return P in O; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable + IsConcatSpreadable: function IsConcatSpreadable(O) { + if (this.Type(O) !== 'Object') { + return false; + } + if (hasSymbols && typeof $Symbol.isConcatSpreadable === 'symbol') { + var spreadable = this.Get(O, Symbol.isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return this.ToBoolean(spreadable); + } + } + return this.IsArray(O); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-invoke + Invoke: function Invoke(O, P) { + if (!this.IsPropertyKey(P)) { + throw new $TypeError('P must be a Property Key'); + } + var argumentsList = arraySlice(arguments, 2); + var func = this.GetV(O, P); + return this.Call(func, O, argumentsList); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-getiterator + GetIterator: function GetIterator(obj, method) { + if (!hasSymbols) { + throw new SyntaxError('ES.GetIterator depends on native iterator support.'); + } + + var actualMethod = method; + if (arguments.length < 2) { + actualMethod = this.GetMethod(obj, $Symbol.iterator); + } + var iterator = this.Call(actualMethod, obj); + if (this.Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratornext + IteratorNext: function IteratorNext(iterator, value) { + var result = this.Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (this.Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete + IteratorComplete: function IteratorComplete(iterResult) { + if (this.Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return this.ToBoolean(this.Get(iterResult, 'done')); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue + IteratorValue: function IteratorValue(iterResult) { + if (this.Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return this.Get(iterResult, 'value'); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep + IteratorStep: function IteratorStep(iterator) { + var result = this.IteratorNext(iterator); + var done = this.IteratorComplete(result); + return done === true ? false : result; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose + IteratorClose: function IteratorClose(iterator, completion) { + if (this.Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!this.IsCallable(completion)) { + throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); + } + var completionThunk = completion; + + var iteratorReturn = this.GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = this.Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionRecord = completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (this.Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject + CreateIterResultObject: function CreateIterResultObject(value, done) { + if (this.Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-regexpexec + RegExpExec: function RegExpExec(R, S) { + if (this.Type(R) !== 'Object') { + throw new $TypeError('R must be an Object'); + } + if (this.Type(S) !== 'String') { + throw new $TypeError('S must be a String'); + } + var exec = this.Get(R, 'exec'); + if (this.IsCallable(exec)) { + var result = this.Call(exec, R, [S]); + if (result === null || this.Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate + ArraySpeciesCreate: function ArraySpeciesCreate(originalArray, length) { + if (!this.IsInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + var len = length === 0 ? 0 : length; + var C; + var isArray = this.IsArray(originalArray); + if (isArray) { + C = this.Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (this.IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if (this.Type(C) === 'Object' && hasSymbols && $Symbol.species) { + C = this.Get(C, $Symbol.species); + if (C === null) { + C = void 0; + } + } + } + if (typeof C === 'undefined') { + return $Array(len); + } + if (!this.IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(len); // this.Construct(C, len); + }, + + CreateDataProperty: function CreateDataProperty(O, P, V) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var oldDesc = $gOPD(O, P); + var extensible = oldDesc || (typeof $isExtensible !== 'function' || $isExtensible(O)); + var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable); + if (immutable || !extensible) { + return false; + } + var newDesc = { + configurable: true, + enumerable: true, + value: V, + writable: true + }; + Object.defineProperty(O, P, newDesc); + return true; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow + CreateDataPropertyOrThrow: function CreateDataPropertyOrThrow(O, P, V) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = this.CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; + }, + + // https://www.ecma-international.org/ecma-262/6.0/#sec-objectcreate + ObjectCreate: function ObjectCreate(proto, internalSlotsList) { + if (proto !== null && this.Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: proto must be null or an object'); + } + var slots = arguments.length < 2 ? [] : internalSlotsList; + if (slots.length > 0) { + throw new $SyntaxError('es-abstract does not yet support internal slots'); + } + + if (proto === null && !$ObjectCreate) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + + return $ObjectCreate(proto); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex + AdvanceStringIndex: function AdvanceStringIndex(S, index, unicode) { + if (this.Type(S) !== 'String') { + throw new $TypeError('S must be a String'); + } + if (!this.IsInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: length must be an integer >= 0 and <= 2**53'); + } + if (this.Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: unicode must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + + var first = $charCodeAt(S, index); + if (first < 0xD800 || first > 0xDBFF) { + return index + 1; + } + + var second = $charCodeAt(S, index + 1); + if (second < 0xDC00 || second > 0xDFFF) { + return index + 1; + } + + return index + 2; + } +}); + +delete ES6.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible + +module.exports = ES6; diff --git a/deps/npm/node_modules/es-abstract/es2016.js b/deps/npm/node_modules/es-abstract/es2016.js new file mode 100644 index 00000000000000..c9166cea7f842a --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es2016.js @@ -0,0 +1,16 @@ +'use strict'; + +var ES2015 = require('./es2015'); +var assign = require('./helpers/assign'); + +var ES2016 = assign(assign({}, ES2015), { + // https://github.com/tc39/ecma262/pull/60 + SameValueNonNumber: function SameValueNonNumber(x, y) { + if (typeof x === 'number' || typeof x !== typeof y) { + throw new TypeError('SameValueNonNumber requires two non-number values of the same type.'); + } + return this.SameValue(x, y); + } +}); + +module.exports = ES2016; diff --git a/deps/npm/node_modules/es-abstract/es2017.js b/deps/npm/node_modules/es-abstract/es2017.js new file mode 100644 index 00000000000000..af3ff480663bbd --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es2017.js @@ -0,0 +1,25 @@ +'use strict'; + +var ES2016 = require('./es2016'); +var assign = require('./helpers/assign'); + +var ES2017 = assign(assign({}, ES2016), { + ToIndex: function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = this.ToInteger(value); + if (integerIndex < 0) { + throw new RangeError('index must be >= 0'); + } + var index = this.ToLength(integerIndex); + if (!this.SameValueZero(integerIndex, index)) { + throw new RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; + } +}); + +delete ES2017.EnumerableOwnNames; // replaced with EnumerableOwnProperties + +module.exports = ES2017; diff --git a/deps/npm/node_modules/es-abstract/es5.js b/deps/npm/node_modules/es-abstract/es5.js new file mode 100644 index 00000000000000..3af7e7ea3d5cff --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es5.js @@ -0,0 +1,242 @@ +'use strict'; + +var GetIntrinsic = require('./GetIntrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('./helpers/isNaN'); +var $isFinite = require('./helpers/isFinite'); + +var sign = require('./helpers/sign'); +var mod = require('./helpers/mod'); + +var IsCallable = require('is-callable'); +var toPrimitive = require('es-to-primitive/es5'); + +var has = require('has'); + +// https://es5.github.io/#x9 +var ES5 = { + ToPrimitive: toPrimitive, + + ToBoolean: function ToBoolean(value) { + return !!value; + }, + ToNumber: function ToNumber(value) { + return +value; // eslint-disable-line no-implicit-coercion + }, + ToInteger: function ToInteger(value) { + var number = this.ToNumber(value); + if ($isNaN(number)) { return 0; } + if (number === 0 || !$isFinite(number)) { return number; } + return sign(number) * Math.floor(Math.abs(number)); + }, + ToInt32: function ToInt32(x) { + return this.ToNumber(x) >> 0; + }, + ToUint32: function ToUint32(x) { + return this.ToNumber(x) >>> 0; + }, + ToUint16: function ToUint16(value) { + var number = this.ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = sign(number) * Math.floor(Math.abs(number)); + return mod(posInt, 0x10000); + }, + ToString: function ToString(value) { + return $String(value); + }, + ToObject: function ToObject(value) { + this.CheckObjectCoercible(value); + return $Object(value); + }, + CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) { + /* jshint eqnull:true */ + if (value == null) { + throw new $TypeError(optMessage || 'Cannot call method on ' + value); + } + return value; + }, + IsCallable: IsCallable, + SameValue: function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); + }, + + // https://www.ecma-international.org/ecma-262/5.1/#sec-8 + Type: function Type(x) { + if (x === null) { + return 'Null'; + } + if (typeof x === 'undefined') { + return 'Undefined'; + } + if (typeof x === 'function' || typeof x === 'object') { + return 'Object'; + } + if (typeof x === 'number') { + return 'Number'; + } + if (typeof x === 'boolean') { + return 'Boolean'; + } + if (typeof x === 'string') { + return 'String'; + } + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type + IsPropertyDescriptor: function IsPropertyDescriptor(Desc) { + if (this.Type(Desc) !== 'Object') { + return false; + } + var allowed = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true + }; + // jscs:disable + for (var key in Desc) { // eslint-disable-line + if (has(Desc, key) && !allowed[key]) { + return false; + } + } + // jscs:enable + var isData = has(Desc, '[[Value]]'); + var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); + if (isData && IsAccessor) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.1 + IsAccessorDescriptor: function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) { + return false; + } + + return true; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.2 + IsDataDescriptor: function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { + return false; + } + + return true; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.3 + IsGenericDescriptor: function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) { + return true; + } + + return false; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.4 + FromPropertyDescriptor: function FromPropertyDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return Desc; + } + + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (this.IsDataDescriptor(Desc)) { + return { + value: Desc['[[Value]]'], + writable: !!Desc['[[Writable]]'], + enumerable: !!Desc['[[Enumerable]]'], + configurable: !!Desc['[[Configurable]]'] + }; + } else if (this.IsAccessorDescriptor(Desc)) { + return { + get: Desc['[[Get]]'], + set: Desc['[[Set]]'], + enumerable: !!Desc['[[Enumerable]]'], + configurable: !!Desc['[[Configurable]]'] + }; + } else { + throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor'); + } + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5 + ToPropertyDescriptor: function ToPropertyDescriptor(Obj) { + if (this.Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (has(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable); + } + if (has(Obj, 'configurable')) { + desc['[[Configurable]]'] = this.ToBoolean(Obj.configurable); + } + if (has(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (has(Obj, 'writable')) { + desc['[[Writable]]'] = this.ToBoolean(Obj.writable); + } + if (has(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !this.IsCallable(getter)) { + throw new TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (has(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !this.IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; + } +}; + +module.exports = ES5; diff --git a/deps/npm/node_modules/es-abstract/es6.js b/deps/npm/node_modules/es-abstract/es6.js new file mode 100644 index 00000000000000..2d1f4dc927a904 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es6.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./es2015'); diff --git a/deps/npm/node_modules/es-abstract/es7.js b/deps/npm/node_modules/es-abstract/es7.js new file mode 100644 index 00000000000000..f2f15c0a88712c --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es7.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./es2016'); diff --git a/deps/npm/node_modules/es-abstract/helpers/assign.js b/deps/npm/node_modules/es-abstract/helpers/assign.js new file mode 100644 index 00000000000000..2533d20a361958 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/assign.js @@ -0,0 +1,17 @@ +var bind = require('function-bind'); +var has = bind.call(Function.call, Object.prototype.hasOwnProperty); + +var $assign = Object.assign; + +module.exports = function assign(target, source) { + if ($assign) { + return $assign(target, source); + } + + for (var key in source) { + if (has(source, key)) { + target[key] = source[key]; + } + } + return target; +}; diff --git a/deps/npm/node_modules/es-abstract/helpers/isFinite.js b/deps/npm/node_modules/es-abstract/helpers/isFinite.js new file mode 100644 index 00000000000000..46585376bbee5d --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/isFinite.js @@ -0,0 +1,3 @@ +var $isNaN = Number.isNaN || function (a) { return a !== a; }; + +module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; diff --git a/deps/npm/node_modules/es-abstract/helpers/isNaN.js b/deps/npm/node_modules/es-abstract/helpers/isNaN.js new file mode 100644 index 00000000000000..e4d4f95f316dd5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/isNaN.js @@ -0,0 +1,3 @@ +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; diff --git a/deps/npm/node_modules/es-abstract/helpers/isPrimitive.js b/deps/npm/node_modules/es-abstract/helpers/isPrimitive.js new file mode 100644 index 00000000000000..36691564527596 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/isPrimitive.js @@ -0,0 +1,3 @@ +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; diff --git a/deps/npm/node_modules/es-abstract/helpers/mod.js b/deps/npm/node_modules/es-abstract/helpers/mod.js new file mode 100644 index 00000000000000..5867fd979c0abf --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/mod.js @@ -0,0 +1,4 @@ +module.exports = function mod(number, modulo) { + var remain = number % modulo; + return Math.floor(remain >= 0 ? remain : remain + modulo); +}; diff --git a/deps/npm/node_modules/es-abstract/helpers/sign.js b/deps/npm/node_modules/es-abstract/helpers/sign.js new file mode 100644 index 00000000000000..2ac0bf1b1a0e9e --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/sign.js @@ -0,0 +1,3 @@ +module.exports = function sign(number) { + return number >= 0 ? 1 : -1; +}; diff --git a/deps/npm/node_modules/es-abstract/index.js b/deps/npm/node_modules/es-abstract/index.js new file mode 100644 index 00000000000000..cee856bbdeb9f5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var assign = require('./helpers/assign'); + +var ES5 = require('./es5'); +var ES2015 = require('./es2015'); +var ES2016 = require('./es2016'); +var ES2017 = require('./es2017'); + +var ES = { + ES5: ES5, + ES6: ES2015, + ES2015: ES2015, + ES7: ES2016, + ES2016: ES2016, + ES2017: ES2017 +}; +assign(ES, ES5); +delete ES.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible +assign(ES, ES2015); + +module.exports = ES; diff --git a/deps/npm/node_modules/es-abstract/operations/2015.js b/deps/npm/node_modules/es-abstract/operations/2015.js new file mode 100644 index 00000000000000..1df63c3f4ba8c5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/operations/2015.js @@ -0,0 +1,78 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type', + IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isaccessordescriptor', + IsDataDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor', + IsGenericDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isgenericdescriptor', + FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor', + ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-topropertydescriptor', + CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor', + ToPrimitive: 'https://ecma-international.org/ecma-262/6.0/#sec-toprimitive', + ToBoolean: 'https://ecma-international.org/ecma-262/6.0/#sec-toboolean', + ToNumber: 'https://ecma-international.org/ecma-262/6.0/#sec-tonumber', + ToInteger: 'https://ecma-international.org/ecma-262/6.0/#sec-tointeger', + ToInt32: 'https://ecma-international.org/ecma-262/6.0/#sec-toint32', + ToUint32: 'https://ecma-international.org/ecma-262/6.0/#sec-touint32', + ToInt16: 'https://ecma-international.org/ecma-262/6.0/#sec-toint16', + ToUint16: 'https://ecma-international.org/ecma-262/6.0/#sec-touint16', + ToInt8: 'https://ecma-international.org/ecma-262/6.0/#sec-toint8', + ToUint8: 'https://ecma-international.org/ecma-262/6.0/#sec-touint8', + ToUint8Clamp: 'https://ecma-international.org/ecma-262/6.0/#sec-touint8clamp', + ToString: 'https://ecma-international.org/ecma-262/6.0/#sec-tostring', + ToObject: 'https://ecma-international.org/ecma-262/6.0/#sec-toobject', + ToPropertyKey: 'https://ecma-international.org/ecma-262/6.0/#sec-topropertykey', + ToLength: 'https://ecma-international.org/ecma-262/6.0/#sec-tolength', + CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring', + RequireObjectCoercible: 'https://ecma-international.org/ecma-262/6.0/#sec-requireobjectcoercible', + IsArray: 'https://ecma-international.org/ecma-262/6.0/#sec-isarray', + IsCallable: 'https://ecma-international.org/ecma-262/6.0/#sec-iscallable', + IsConstructor: 'https://ecma-international.org/ecma-262/6.0/#sec-isconstructor', + IsExtensible: 'https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o', + IsInteger: 'https://ecma-international.org/ecma-262/6.0/#sec-isinteger', + IsPropertyKey: 'https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey', + IsRegExp: 'https://ecma-international.org/ecma-262/6.0/#sec-isregexp', + SameValue: 'https://ecma-international.org/ecma-262/6.0/#sec-samevalue', + SameValueZero: 'https://ecma-international.org/ecma-262/6.0/#sec-samevaluezero', + Get: 'https://ecma-international.org/ecma-262/6.0/#sec-get-o-p', + GetV: 'https://ecma-international.org/ecma-262/6.0/#sec-getv', + Set: 'https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw', + CreateDataProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty', + CreateMethodProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-createmethodproperty', + CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow', + DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow', + DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-deletepropertyorthrow', + GetMethod: 'https://ecma-international.org/ecma-262/6.0/#sec-getmethod', + HasProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-hasproperty', + HasOwnProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty', + Call: 'https://ecma-international.org/ecma-262/6.0/#sec-call', + Construct: 'https://ecma-international.org/ecma-262/6.0/#sec-construct', + SetIntegrityLevel: 'https://ecma-international.org/ecma-262/6.0/#sec-setintegritylevel', + TestIntegrityLevel: 'https://ecma-international.org/ecma-262/6.0/#sec-testintegritylevel', + CreateArrayFromList: 'https://ecma-international.org/ecma-262/6.0/#sec-createarrayfromlist', + CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/6.0/#sec-createlistfromarraylike', + Invoke: 'https://ecma-international.org/ecma-262/6.0/#sec-invoke', + OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/6.0/#sec-ordinaryhasinstance', + SpeciesConstructor: 'https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor', + EnumerableOwnNames: 'https://ecma-international.org/ecma-262/6.0/#sec-enumerableownnames', + GetIterator: 'https://ecma-international.org/ecma-262/6.0/#sec-getiterator', + IteratorNext: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratornext', + IteratorComplete: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete', + IteratorValue: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue', + IteratorStep: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep', + IteratorClose: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose', + CreateIterResultObject: 'https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject', + CreateListIterator: 'https://ecma-international.org/ecma-262/6.0/#sec-createlistiterator', + Type: 'https://ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types', + thisNumberValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object', + thisTimeValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object', + thisStringValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object', + RegExpExec: 'https://ecma-international.org/ecma-262/6.0/#sec-regexpexec', + RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/6.0/#sec-regexpbuiltinexec', + IsConcatSpreadable: 'https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable', + IsPromise: 'https://ecma-international.org/ecma-262/6.0/#sec-ispromise', + ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate', + ObjectCreate: 'https://ecma-international.org/ecma-262/6.0/#sec-objectcreate', + AdvanceStringIndex: 'https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex', + NormalCompletion: 'https://ecma-international.org/ecma-262/6.0/#sec-normalcompletion' +}; diff --git a/deps/npm/node_modules/es-abstract/operations/2016.js b/deps/npm/node_modules/es-abstract/operations/2016.js new file mode 100644 index 00000000000000..6ac8aae77c28a4 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/operations/2016.js @@ -0,0 +1,80 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-property-descriptor-specification-type', + IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isaccessordescriptor', + IsDataDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isdatadescriptor', + IsGenericDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isgenericdescriptor', + FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-frompropertydescriptor', + ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-topropertydescriptor', + CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-completepropertydescriptor', + ToPrimitive: 'https://ecma-international.org/ecma-262/7.0/#sec-toprimitive', + ToBoolean: 'https://ecma-international.org/ecma-262/7.0/#sec-toboolean', + ToNumber: 'https://ecma-international.org/ecma-262/7.0/#sec-tonumber', + ToInteger: 'https://ecma-international.org/ecma-262/7.0/#sec-tointeger', + ToInt32: 'https://ecma-international.org/ecma-262/7.0/#sec-toint32', + ToUint32: 'https://ecma-international.org/ecma-262/7.0/#sec-touint32', + ToInt16: 'https://ecma-international.org/ecma-262/7.0/#sec-toint16', + ToUint16: 'https://ecma-international.org/ecma-262/7.0/#sec-touint16', + ToInt8: 'https://ecma-international.org/ecma-262/7.0/#sec-toint8', + ToUint8: 'https://ecma-international.org/ecma-262/7.0/#sec-touint8', + ToUint8Clamp: 'https://ecma-international.org/ecma-262/7.0/#sec-touint8clamp', + ToString: 'https://ecma-international.org/ecma-262/7.0/#sec-tostring', + ToObject: 'https://ecma-international.org/ecma-262/7.0/#sec-toobject', + ToPropertyKey: 'https://ecma-international.org/ecma-262/7.0/#sec-topropertykey', + ToLength: 'https://ecma-international.org/ecma-262/7.0/#sec-tolength', + CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/7.0/#sec-canonicalnumericindexstring', + RequireObjectCoercible: 'https://ecma-international.org/ecma-262/7.0/#sec-requireobjectcoercible', + IsArray: 'https://ecma-international.org/ecma-262/7.0/#sec-isarray', + IsCallable: 'https://ecma-international.org/ecma-262/7.0/#sec-iscallable', + IsConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-isconstructor', + IsExtensible: 'https://ecma-international.org/ecma-262/7.0/#sec-isextensible-o', + IsInteger: 'https://ecma-international.org/ecma-262/7.0/#sec-isinteger', + IsPropertyKey: 'https://ecma-international.org/ecma-262/7.0/#sec-ispropertykey', + IsRegExp: 'https://ecma-international.org/ecma-262/7.0/#sec-isregexp', + SameValue: 'https://ecma-international.org/ecma-262/7.0/#sec-samevalue', + SameValueZero: 'https://ecma-international.org/ecma-262/7.0/#sec-samevaluezero', + SameValueNonNumber: 'https://ecma-international.org/ecma-262/7.0/#sec-samevaluenonnumber', + Get: 'https://ecma-international.org/ecma-262/7.0/#sec-get-o-p', + GetV: 'https://ecma-international.org/ecma-262/7.0/#sec-getv', + Set: 'https://ecma-international.org/ecma-262/7.0/#sec-set-o-p-v-throw', + CreateDataProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-createdataproperty', + CreateMethodProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-createmethodproperty', + CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-createdatapropertyorthrow', + DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-definepropertyorthrow', + DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-deletepropertyorthrow', + GetMethod: 'https://ecma-international.org/ecma-262/7.0/#sec-getmethod', + HasProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-hasproperty', + HasOwnProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-hasownproperty', + Call: 'https://ecma-international.org/ecma-262/7.0/#sec-call', + Construct: 'https://ecma-international.org/ecma-262/7.0/#sec-construct', + SetIntegrityLevel: 'https://ecma-international.org/ecma-262/7.0/#sec-setintegritylevel', + TestIntegrityLevel: 'https://ecma-international.org/ecma-262/7.0/#sec-testintegritylevel', + CreateArrayFromList: 'https://ecma-international.org/ecma-262/7.0/#sec-createarrayfromlist', + CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/7.0/#sec-createlistfromarraylike', + Invoke: 'https://ecma-international.org/ecma-262/7.0/#sec-invoke', + OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryhasinstance', + SpeciesConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-speciesconstructor', + EnumerableOwnNames: 'https://ecma-international.org/ecma-262/7.0/#sec-enumerableownnames', + GetIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-getiterator', + IteratorNext: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratornext', + IteratorComplete: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorcomplete', + IteratorValue: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorvalue', + IteratorStep: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorstep', + IteratorClose: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorclose', + CreateIterResultObject: 'https://ecma-international.org/ecma-262/7.0/#sec-createiterresultobject', + CreateListIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createlistiterator', + Type: 'https://ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types', + thisNumberValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-number-prototype-object', + thisTimeValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-date-prototype-object', + thisStringValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-string-prototype-object', + RegExpExec: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpexec', + RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpbuiltinexec', + IsConcatSpreadable: 'https://ecma-international.org/ecma-262/7.0/#sec-isconcatspreadable', + IsPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-ispromise', + ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-arrayspeciescreate', + ObjectCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-objectcreate', + AdvanceStringIndex: 'https://ecma-international.org/ecma-262/7.0/#sec-advancestringindex', + OrdinarySet: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryset', + NormalCompletion: 'https://ecma-international.org/ecma-262/7.0/#sec-normalcompletion' +}; diff --git a/deps/npm/node_modules/es-abstract/operations/2017.js b/deps/npm/node_modules/es-abstract/operations/2017.js new file mode 100644 index 00000000000000..c8c3aa499cc3f5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/operations/2017.js @@ -0,0 +1,82 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-property-descriptor-specification-type', + IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isaccessordescriptor', + IsDataDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isdatadescriptor', + IsGenericDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isgenericdescriptor', + FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-frompropertydescriptor', + ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-topropertydescriptor', + CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-completepropertydescriptor', + ToPrimitive: 'https://ecma-international.org/ecma-262/8.0/#sec-toprimitive', + ToBoolean: 'https://ecma-international.org/ecma-262/8.0/#sec-toboolean', + ToNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-tonumber', + ToInteger: 'https://ecma-international.org/ecma-262/8.0/#sec-tointeger', + ToInt32: 'https://ecma-international.org/ecma-262/8.0/#sec-toint32', + ToUint32: 'https://ecma-international.org/ecma-262/8.0/#sec-touint32', + ToInt16: 'https://ecma-international.org/ecma-262/8.0/#sec-toint16', + ToUint16: 'https://ecma-international.org/ecma-262/8.0/#sec-touint16', + ToInt8: 'https://ecma-international.org/ecma-262/8.0/#sec-toint8', + ToUint8: 'https://ecma-international.org/ecma-262/8.0/#sec-touint8', + ToUint8Clamp: 'https://ecma-international.org/ecma-262/8.0/#sec-touint8clamp', + ToString: 'https://ecma-international.org/ecma-262/8.0/#sec-tostring', + ToObject: 'https://ecma-international.org/ecma-262/8.0/#sec-toobject', + ToPropertyKey: 'https://ecma-international.org/ecma-262/8.0/#sec-topropertykey', + ToLength: 'https://ecma-international.org/ecma-262/8.0/#sec-tolength', + CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/8.0/#sec-canonicalnumericindexstring', + ToIndex: 'https://ecma-international.org/ecma-262/8.0/#sec-toindex', + RequireObjectCoercible: 'https://ecma-international.org/ecma-262/8.0/#sec-requireobjectcoercible', + IsArray: 'https://ecma-international.org/ecma-262/8.0/#sec-isarray', + IsCallable: 'https://ecma-international.org/ecma-262/8.0/#sec-iscallable', + IsConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-isconstructor', + IsExtensible: 'https://ecma-international.org/ecma-262/8.0/#sec-isextensible-o', + IsInteger: 'https://ecma-international.org/ecma-262/8.0/#sec-isinteger', + IsPropertyKey: 'https://ecma-international.org/ecma-262/8.0/#sec-ispropertykey', + IsRegExp: 'https://ecma-international.org/ecma-262/8.0/#sec-isregexp', + SameValue: 'https://ecma-international.org/ecma-262/8.0/#sec-samevalue', + SameValueZero: 'https://ecma-international.org/ecma-262/8.0/#sec-samevaluezero', + SameValueNonNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-samevaluenonnumber', + Get: 'https://ecma-international.org/ecma-262/8.0/#sec-get-o-p', + GetV: 'https://ecma-international.org/ecma-262/8.0/#sec-getv', + Set: 'https://ecma-international.org/ecma-262/8.0/#sec-set-o-p-v-throw', + CreateDataProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-createdataproperty', + CreateMethodProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-createmethodproperty', + CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-createdatapropertyorthrow', + DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-definepropertyorthrow', + DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-deletepropertyorthrow', + GetMethod: 'https://ecma-international.org/ecma-262/8.0/#sec-getmethod', + HasProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-hasproperty', + HasOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-hasownproperty', + Call: 'https://ecma-international.org/ecma-262/8.0/#sec-call', + Construct: 'https://ecma-international.org/ecma-262/8.0/#sec-construct', + SetIntegrityLevel: 'https://ecma-international.org/ecma-262/8.0/#sec-setintegritylevel', + TestIntegrityLevel: 'https://ecma-international.org/ecma-262/8.0/#sec-testintegritylevel', + CreateArrayFromList: 'https://ecma-international.org/ecma-262/8.0/#sec-createarrayfromlist', + CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/8.0/#sec-createlistfromarraylike', + Invoke: 'https://ecma-international.org/ecma-262/8.0/#sec-invoke', + OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryhasinstance', + SpeciesConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-speciesconstructor', + EnumerableOwnProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-enumerableownproperties', + GetIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-getiterator', + IteratorNext: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratornext', + IteratorComplete: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorcomplete', + IteratorValue: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorvalue', + IteratorStep: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorstep', + IteratorClose: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorclose', + CreateIterResultObject: 'https://ecma-international.org/ecma-262/8.0/#sec-createiterresultobject', + CreateListIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createlistiterator', + Type: 'https://ecma-international.org/ecma-262/8.0/#sec-ecmascript-language-types', + thisNumberValue: 'https://ecma-international.org/ecma-262/8.0/#sec-properties-of-the-number-prototype-object', + thisTimeValue: 'https://ecma-international.org/ecma-262/8.0/#sec-properties-of-the-date-prototype-object', + thisStringValue: 'https://ecma-international.org/ecma-262/8.0/#sec-properties-of-the-string-prototype-object', + RegExpExec: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpexec', + RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpbuiltinexec', + IsConcatSpreadable: 'https://ecma-international.org/ecma-262/8.0/#sec-isconcatspreadable', + IsPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-ispromise', + ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-arrayspeciescreate', + ObjectCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-objectcreate', + AdvanceStringIndex: 'https://ecma-international.org/ecma-262/8.0/#sec-advancestringindex', + OrdinarySet: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryset', + NormalCompletion: 'https://ecma-international.org/ecma-262/8.0/#sec-normalcompletion', + IsSharedArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-issharedarraybuffer', +}; diff --git a/deps/npm/node_modules/es-abstract/operations/es5.js b/deps/npm/node_modules/es-abstract/operations/es5.js new file mode 100644 index 00000000000000..205d1e681560e4 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/operations/es5.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10', + IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.1', + IsDataDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.2', + IsGenericDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.3', + FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.4', + ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.5' +}; diff --git a/deps/npm/node_modules/es-abstract/package.json b/deps/npm/node_modules/es-abstract/package.json new file mode 100644 index 00000000000000..9b5378b8afb7e7 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/package.json @@ -0,0 +1,102 @@ +{ + "name": "es-abstract", + "version": "1.12.0", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "ECMAScript spec abstract operations.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublish": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "npm run --silent security", + "tests-only": "node test", + "coverage": "nyc npm run --silent tests-only >/dev/null", + "postcoverage": "nyc report", + "lint": "npm run --silent jscs && npm run --silent eslint", + "jscs": "jscs test/*.js *.js", + "eslint": "eslint test/*.js *.js", + "eccheck": "editorconfig-tools check *.js **/*.js > /dev/null", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/es-abstract.git" + }, + "keywords": [ + "ECMAScript", + "ES", + "abstract", + "operation", + "abstract operation", + "JavaScript", + "ES5", + "ES6", + "ES7" + ], + "dependencies": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "editorconfig-tools": "^0.1.1", + "eslint": "^4.19.1", + "foreach": "^2.0.5", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "nyc": "^10.3.2", + "object-inspect": "^1.6.0", + "object-is": "^1.0.1", + "object.assign": "^4.1.0", + "replace": "^1.0.0", + "safe-publish-latest": "^1.1.1", + "semver": "^5.5.0", + "tape": "^4.9.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "greenkeeper": { + "//": "nyc is ignored because it requires node 4+, and we support older than that", + "ignore": [ + "nyc" + ] + } + +,"_resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz" +,"_integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==" +,"_from": "es-abstract@1.12.0" +} \ No newline at end of file diff --git a/deps/npm/node_modules/es-abstract/test/.eslintrc b/deps/npm/node_modules/es-abstract/test/.eslintrc new file mode 100644 index 00000000000000..904e833b4c25e5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/.eslintrc @@ -0,0 +1,11 @@ +{ + "rules": { + "id-length": 0, + "max-lines": 0, + "max-statements-per-line": [2, { "max": 3 }], + "max-nested-callbacks": [2, 3], + "max-statements": 0, + "no-implicit-coercion": [1], + "no-invalid-this": [1] + } +} diff --git a/deps/npm/node_modules/es-abstract/test/GetIntrinsic.js b/deps/npm/node_modules/es-abstract/test/GetIntrinsic.js new file mode 100644 index 00000000000000..ed8e7ecc636bd6 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/GetIntrinsic.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic'); + +var test = require('tape'); +var forEach = require('foreach'); +var debug = require('object-inspect'); + +var v = require('./helpers/values'); + +test('export', function (t) { + t.equal(typeof GetIntrinsic, 'function', 'it is a function'); + t.equal(GetIntrinsic.length, 2, 'function has length of 2'); + + t.end(); +}); + +test('throws', function (t) { + t['throws']( + function () { GetIntrinsic('not an intrinsic'); }, + SyntaxError, + 'nonexistent intrinsic throws a syntax error' + ); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { GetIntrinsic('%', nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/test/diffOps.js b/deps/npm/node_modules/es-abstract/test/diffOps.js new file mode 100644 index 00000000000000..2d870897c20595 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/diffOps.js @@ -0,0 +1,24 @@ +'use strict'; + +var keys = require('object-keys'); +var forEach = require('foreach'); + +module.exports = function diffOperations(actual, expected, expectedMissing) { + var actualKeys = keys(actual); + var expectedKeys = keys(expected); + + var extra = []; + var missing = []; + forEach(actualKeys, function (op) { + if (!(op in expected)) { + extra.push(op); + } + }); + forEach(expectedKeys, function (op) { + if (!(op in actual) && expectedMissing.indexOf(op) === -1) { + missing.push(op); + } + }); + + return { missing: missing, extra: extra }; +}; diff --git a/deps/npm/node_modules/es-abstract/test/es2015.js b/deps/npm/node_modules/es-abstract/test/es2015.js new file mode 100644 index 00000000000000..51b94d2e3eeb0a --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es2015.js @@ -0,0 +1,11 @@ +'use strict'; + +var ES = require('../').ES2015; + +var ops = require('../operations/2015'); + +// jscs:disable +var expectedMissing = ['CreateMethodProperty', 'DefinePropertyOrThrow', 'DeletePropertyOrThrow', 'Construct', 'SetIntegrityLevel', 'TestIntegrityLevel', 'CreateArrayFromList', 'CreateListFromArrayLike', 'OrdinaryHasInstance', 'EnumerableOwnNames', 'GetIterator', 'IteratorNext', 'IteratorComplete', 'IteratorValue', 'IteratorStep', 'IteratorClose', 'CreateListIterator', 'thisNumberValue', 'thisTimeValue', 'thisStringValue', 'RegExpBuiltinExec', 'IsPromise', 'NormalCompletion']; +// jscs:enable + +require('./tests').es2015(ES, ops, expectedMissing); diff --git a/deps/npm/node_modules/es-abstract/test/es2016.js b/deps/npm/node_modules/es-abstract/test/es2016.js new file mode 100644 index 00000000000000..4e9dd2af2e8c45 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es2016.js @@ -0,0 +1,11 @@ +'use strict'; + +var ES = require('../').ES2016; + +var ops = require('../operations/2016'); + +// jscs:disable +var expectedMissing = ['CreateMethodProperty', 'DefinePropertyOrThrow', 'DeletePropertyOrThrow', 'Construct', 'SetIntegrityLevel', 'TestIntegrityLevel', 'CreateArrayFromList', 'CreateListFromArrayLike', 'OrdinaryHasInstance', 'EnumerableOwnNames', 'GetIterator', 'IteratorNext', 'IteratorComplete', 'IteratorValue', 'IteratorStep', 'IteratorClose', 'CreateListIterator', 'thisNumberValue', 'thisTimeValue', 'thisStringValue', 'RegExpBuiltinExec', 'IsPromise', 'OrdinarySet', 'NormalCompletion']; +// jscs:enable + +require('./tests').es2016(ES, ops, expectedMissing); diff --git a/deps/npm/node_modules/es-abstract/test/es2017.js b/deps/npm/node_modules/es-abstract/test/es2017.js new file mode 100644 index 00000000000000..82533049a56c51 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es2017.js @@ -0,0 +1,11 @@ +'use strict'; + +var ES = require('../').ES2017; + +var ops = require('../operations/2017'); + +// jscs:disable +var expectedMissing = ['CreateMethodProperty', 'DefinePropertyOrThrow', 'DeletePropertyOrThrow', 'Construct', 'SetIntegrityLevel', 'TestIntegrityLevel', 'CreateArrayFromList', 'CreateListFromArrayLike', 'OrdinaryHasInstance', 'EnumerableOwnProperties', 'GetIterator', 'IteratorNext', 'IteratorComplete', 'IteratorValue', 'IteratorStep', 'IteratorClose', 'CreateListIterator', 'thisNumberValue', 'thisTimeValue', 'thisStringValue', 'RegExpBuiltinExec', 'IsPromise', 'OrdinarySet', 'NormalCompletion', 'IsSharedArrayBuffer']; +// jscs:enable + +require('./tests').es2017(ES, ops, expectedMissing); diff --git a/deps/npm/node_modules/es-abstract/test/es5.js b/deps/npm/node_modules/es-abstract/test/es5.js new file mode 100644 index 00000000000000..cca3030407d888 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es5.js @@ -0,0 +1,415 @@ +'use strict'; + +var ES = require('../').ES5; +var test = require('tape'); + +var forEach = require('foreach'); +var is = require('object-is'); + +var coercibleObject = { valueOf: function () { return '3'; }, toString: function () { return 42; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; +var objects = [{}, coercibleObject, toStringOnlyObject, valueOfOnlyObject]; +var numbers = [0, -0, Infinity, -Infinity, 42]; +var nonNullPrimitives = [true, false, 'foo', ''].concat(numbers); +var primitives = [undefined, null].concat(nonNullPrimitives); + +test('ToPrimitive', function (t) { + t.test('primitives', function (st) { + var testPrimitive = function (primitive) { + st.ok(is(ES.ToPrimitive(primitive), primitive), primitive + ' is returned correctly'); + }; + forEach(primitives, testPrimitive); + st.end(); + }); + + t.test('objects', function (st) { + st.equal(ES.ToPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject coerces to valueOf'); + st.equal(ES.ToPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + st.equal(ES.ToPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to toString'); + st.equal(ES.ToPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); + st.equal(ES.ToPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns toString'); + st.equal(ES.ToPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + st.equal(ES.ToPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); + st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + st.equal(ES.ToPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); + st['throws'](function () { return ES.ToPrimitive(uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](function () { return ES.ToPrimitive(uncoercibleFnObject); }, TypeError, 'uncoercibleFnObject throws a TypeError'); + st.end(); + }); + + t.end(); +}); + +test('ToBoolean', function (t) { + t.equal(false, ES.ToBoolean(undefined), 'undefined coerces to false'); + t.equal(false, ES.ToBoolean(null), 'null coerces to false'); + t.equal(false, ES.ToBoolean(false), 'false returns false'); + t.equal(true, ES.ToBoolean(true), 'true returns true'); + forEach([0, -0, NaN], function (falsyNumber) { + t.equal(false, ES.ToBoolean(falsyNumber), 'falsy number ' + falsyNumber + ' coerces to false'); + }); + forEach([Infinity, 42, 1, -Infinity], function (truthyNumber) { + t.equal(true, ES.ToBoolean(truthyNumber), 'truthy number ' + truthyNumber + ' coerces to true'); + }); + t.equal(false, ES.ToBoolean(''), 'empty string coerces to false'); + t.equal(true, ES.ToBoolean('foo'), 'nonempty string coerces to true'); + forEach(objects, function (obj) { + t.equal(true, ES.ToBoolean(obj), 'object coerces to true'); + }); + t.equal(true, ES.ToBoolean(uncoercibleObject), 'uncoercibleObject coerces to true'); + t.end(); +}); + +test('ToNumber', function (t) { + t.ok(is(NaN, ES.ToNumber(undefined)), 'undefined coerces to NaN'); + t.ok(is(ES.ToNumber(null), 0), 'null coerces to +0'); + t.ok(is(ES.ToNumber(false), 0), 'false coerces to +0'); + t.equal(1, ES.ToNumber(true), 'true coerces to 1'); + t.ok(is(NaN, ES.ToNumber(NaN)), 'NaN returns itself'); + forEach([0, -0, 42, Infinity, -Infinity], function (num) { + t.equal(num, ES.ToNumber(num), num + ' returns itself'); + }); + forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { + t.ok(is(+numString, ES.ToNumber(numString)), '"' + numString + '" coerces to ' + Number(numString)); + }); + forEach(objects, function (object) { + t.ok(is(ES.ToNumber(object), ES.ToNumber(ES.ToPrimitive(object))), 'object ' + object + ' coerces to same as ToPrimitive of object does'); + }); + t['throws'](function () { return ES.ToNumber(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.end(); +}); + +test('ToInteger', function (t) { + t.ok(is(0, ES.ToInteger(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity, 42], function (num) { + t.ok(is(num, ES.ToInteger(num)), num + ' returns itself'); + t.ok(is(-num, ES.ToInteger(-num)), '-' + num + ' returns itself'); + }); + t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); + t['throws'](function () { return ES.ToInteger(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.end(); +}); + +test('ToInt32', function (t) { + t.ok(is(0, ES.ToInt32(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToInt32(num)), num + ' returns +0'); + t.ok(is(0, ES.ToInt32(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToInt32(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToInt32(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToInt32(0x100000000 - 1), -1), '2^32 - 1 returns -1'); + t.ok(is(ES.ToInt32(0x80000000), -0x80000000), '2^31 returns -2^31'); + t.ok(is(ES.ToInt32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); + forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { + t.ok(is(ES.ToInt32(num), ES.ToInt32(ES.ToUint32(num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for 0x' + num.toString(16)); + t.ok(is(ES.ToInt32(-num), ES.ToInt32(ES.ToUint32(-num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for -0x' + num.toString(16)); + }); + t.end(); +}); + +test('ToUint32', function (t) { + t.ok(is(0, ES.ToUint32(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint32(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint32(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint32(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint32(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint32(0x100000000 - 1), 0x100000000 - 1), '2^32 - 1 returns 2^32 - 1'); + t.ok(is(ES.ToUint32(0x80000000), 0x80000000), '2^31 returns 2^31'); + t.ok(is(ES.ToUint32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); + forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { + t.ok(is(ES.ToUint32(num), ES.ToUint32(ES.ToInt32(num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for 0x' + num.toString(16)); + t.ok(is(ES.ToUint32(-num), ES.ToUint32(ES.ToInt32(-num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for -0x' + num.toString(16)); + }); + t.end(); +}); + +test('ToUint16', function (t) { + t.ok(is(0, ES.ToUint16(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint16(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint16(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint16(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint16(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint16(0x100000000 - 1), 0x10000 - 1), '2^32 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint16(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToUint16(0x80000000 - 1), 0x10000 - 1), '2^31 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint16(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToUint16(0x10000 - 1), 0x10000 - 1), '2^16 - 1 returns 2^16 - 1'); + t.end(); +}); + +test('ToString', function (t) { + t['throws'](function () { return ES.ToString(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.end(); +}); + +test('ToObject', function (t) { + t['throws'](function () { return ES.ToObject(undefined); }, TypeError, 'undefined throws'); + t['throws'](function () { return ES.ToObject(null); }, TypeError, 'null throws'); + forEach(numbers, function (number) { + var obj = ES.ToObject(number); + t.equal(typeof obj, 'object', 'number ' + number + ' coerces to object'); + t.equal(true, obj instanceof Number, 'object of ' + number + ' is Number object'); + t.ok(is(obj.valueOf(), number), 'object of ' + number + ' coerces to ' + number); + }); + t.end(); +}); + +test('CheckObjectCoercible', function (t) { + t['throws'](function () { return ES.CheckObjectCoercible(undefined); }, TypeError, 'undefined throws'); + t['throws'](function () { return ES.CheckObjectCoercible(null); }, TypeError, 'null throws'); + var checkCoercible = function (value) { + t.doesNotThrow(function () { return ES.CheckObjectCoercible(value); }, '"' + value + '" does not throw'); + }; + forEach(objects.concat(nonNullPrimitives), checkCoercible); + t.end(); +}); + +test('IsCallable', function (t) { + t.equal(true, ES.IsCallable(function () {}), 'function is callable'); + var nonCallables = [/a/g, {}, Object.prototype, NaN].concat(primitives); + forEach(nonCallables, function (nonCallable) { + t.equal(false, ES.IsCallable(nonCallable), nonCallable + ' is not callable'); + }); + t.end(); +}); + +test('SameValue', function (t) { + t.equal(true, ES.SameValue(NaN, NaN), 'NaN is SameValue as NaN'); + t.equal(false, ES.SameValue(0, -0), '+0 is not SameValue as -0'); + forEach(objects.concat(primitives), function (val) { + t.equal(val === val, ES.SameValue(val, val), '"' + val + '" is SameValue to itself'); + }); + t.end(); +}); + +test('Type', function (t) { + t.equal(ES.Type(), 'Undefined', 'Type() is Undefined'); + t.equal(ES.Type(undefined), 'Undefined', 'Type(undefined) is Undefined'); + t.equal(ES.Type(null), 'Null', 'Type(null) is Null'); + t.equal(ES.Type(true), 'Boolean', 'Type(true) is Boolean'); + t.equal(ES.Type(false), 'Boolean', 'Type(false) is Boolean'); + t.equal(ES.Type(0), 'Number', 'Type(0) is Number'); + t.equal(ES.Type(NaN), 'Number', 'Type(NaN) is Number'); + t.equal(ES.Type('abc'), 'String', 'Type("abc") is String'); + t.equal(ES.Type(function () {}), 'Object', 'Type(function () {}) is Object'); + t.equal(ES.Type({}), 'Object', 'Type({}) is Object'); + t.end(); +}); + +var bothDescriptor = function () { + return { '[[Get]]': function () {}, '[[Value]]': true }; +}; +var accessorDescriptor = function () { + return { + '[[Get]]': function () {}, + '[[Enumerable]]': true, + '[[Configurable]]': true + }; +}; +var mutatorDescriptor = function () { + return { + '[[Set]]': function () {}, + '[[Enumerable]]': true, + '[[Configurable]]': true + }; +}; +var dataDescriptor = function () { + return { + '[[Value]]': 42, + '[[Writable]]': false, + '[[Configurable]]': false + }; +}; +var genericDescriptor = function () { + return { + '[[Configurable]]': true, + '[[Enumerable]]': false + }; +}; + +test('IsPropertyDescriptor', function (t) { + forEach(primitives, function (primitive) { + t.equal(ES.IsPropertyDescriptor(primitive), false, primitive + ' is not a Property Descriptor'); + }); + + t.equal(ES.IsPropertyDescriptor({ invalid: true }), false, 'invalid keys not allowed on a Property Descriptor'); + + t.equal(ES.IsPropertyDescriptor({}), true, 'empty object is an incomplete Property Descriptor'); + + t.equal(ES.IsPropertyDescriptor(accessorDescriptor()), true, 'accessor descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(mutatorDescriptor()), true, 'mutator descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(dataDescriptor()), true, 'data descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(genericDescriptor()), true, 'generic descriptor is a Property Descriptor'); + + t['throws'](function () { + ES.IsPropertyDescriptor(bothDescriptor()); + }, TypeError, 'a Property Descriptor can not be both a Data and an Accessor Descriptor'); + + t.end(); +}); + +test('IsAccessorDescriptor', function (t) { + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws'](function () { ES.IsAccessorDescriptor(primitive); }, TypeError, primitive + ' is not a Property Descriptor'); + }); + + t.equal(ES.IsAccessorDescriptor(), false, 'no value is not an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(undefined), false, 'undefined value is not an Accessor Descriptor'); + + t.equal(ES.IsAccessorDescriptor(accessorDescriptor()), true, 'accessor descriptor is an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(mutatorDescriptor()), true, 'mutator descriptor is an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(dataDescriptor()), false, 'data descriptor is not an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(genericDescriptor()), false, 'generic descriptor is not an Accessor Descriptor'); + + t.end(); +}); + +test('IsDataDescriptor', function (t) { + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws'](function () { ES.IsDataDescriptor(primitive); }, TypeError, primitive + ' is not a Property Descriptor'); + }); + + t.equal(ES.IsDataDescriptor(), false, 'no value is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); + + t.equal(ES.IsDataDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(dataDescriptor()), true, 'data descriptor is a Data Descriptor'); + t.equal(ES.IsDataDescriptor(genericDescriptor()), false, 'generic descriptor is not a Data Descriptor'); + + t.end(); +}); + +test('IsGenericDescriptor', function (t) { + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws']( + function () { ES.IsGenericDescriptor(primitive); }, + TypeError, + primitive + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsGenericDescriptor(), false, 'no value is not a Data Descriptor'); + t.equal(ES.IsGenericDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); + + t.equal(ES.IsGenericDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a generic Descriptor'); + t.equal(ES.IsGenericDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a generic Descriptor'); + t.equal(ES.IsGenericDescriptor(dataDescriptor()), false, 'data descriptor is not a generic Descriptor'); + + t.equal(ES.IsGenericDescriptor(genericDescriptor()), true, 'generic descriptor is a generic Descriptor'); + + t.end(); +}); + +test('FromPropertyDescriptor', function (t) { + t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); + t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); + + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws']( + function () { ES.FromPropertyDescriptor(primitive); }, + TypeError, + primitive + ' is not a Property Descriptor' + ); + }); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(accessor), { + get: accessor['[[Get]]'], + set: accessor['[[Set]]'], + enumerable: !!accessor['[[Enumerable]]'], + configurable: !!accessor['[[Configurable]]'] + }); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(mutator), { + get: mutator['[[Get]]'], + set: mutator['[[Set]]'], + enumerable: !!mutator['[[Enumerable]]'], + configurable: !!mutator['[[Configurable]]'] + }); + var data = dataDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(data), { + value: data['[[Value]]'], + writable: data['[[Writable]]'], + enumerable: !!data['[[Enumerable]]'], + configurable: !!data['[[Configurable]]'] + }); + + t['throws']( + function () { ES.FromPropertyDescriptor(genericDescriptor()); }, + TypeError, + 'a complete Property Descriptor is required' + ); + + t.end(); +}); + +test('ToPropertyDescriptor', function (t) { + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws']( + function () { ES.ToPropertyDescriptor(primitive); }, + TypeError, + primitive + ' is not an Object' + ); + }); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + get: accessor['[[Get]]'], + enumerable: !!accessor['[[Enumerable]]'], + configurable: !!accessor['[[Configurable]]'] + }), accessor); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + set: mutator['[[Set]]'], + enumerable: !!mutator['[[Enumerable]]'], + configurable: !!mutator['[[Configurable]]'] + }), mutator); + + var data = dataDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + value: data['[[Value]]'], + writable: data['[[Writable]]'], + configurable: !!data['[[Configurable]]'] + }), data); + + var both = bothDescriptor(); + t['throws']( + function () { + ES.ToPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); + }, + TypeError, + 'data and accessor descriptors are mutually exclusive' + ); + + t['throws']( + function () { ES.ToPropertyDescriptor({ get: 'not callable' }); }, + TypeError, + '"get" must be undefined or callable' + ); + + t['throws']( + function () { ES.ToPropertyDescriptor({ set: 'not callable' }); }, + TypeError, + '"set" must be undefined or callable' + ); + + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/test/es6.js b/deps/npm/node_modules/es-abstract/test/es6.js new file mode 100644 index 00000000000000..e7c9d98a243fdb --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es6.js @@ -0,0 +1,18 @@ +'use strict'; + +var test = require('tape'); + +var ES = require('../'); +var ES6 = ES.ES6; +var ES2015 = ES.ES2015; +var ES6entry = require('../es6'); + +test('legacy es6 export', function (t) { + t.equal(ES6, ES2015, 'main ES6 === main ES2015'); + t.end(); +}); + +test('legacy es6 entry point', function (t) { + t.equal(ES6, ES6entry, 'main ES6 === ES6 entry point'); + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/test/es7.js b/deps/npm/node_modules/es-abstract/test/es7.js new file mode 100644 index 00000000000000..ee57e153b05b8d --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es7.js @@ -0,0 +1,18 @@ +'use strict'; + +var test = require('tape'); + +var ES = require('../'); +var ES7 = ES.ES7; +var ES2016 = ES.ES2016; +var ES7entry = require('../es7'); + +test('legacy es7 export', function (t) { + t.equal(ES7, ES2016, 'main ES7 === main ES2016'); + t.end(); +}); + +test('legacy es7 entry point', function (t) { + t.equal(ES7, ES7entry, 'main ES7 === ES7 entry point'); + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/test/helpers/values.js b/deps/npm/node_modules/es-abstract/test/helpers/values.js new file mode 100644 index 00000000000000..02408dd6bde594 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/helpers/values.js @@ -0,0 +1,53 @@ +'use strict'; + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var objects = [{}, coercibleObject, toStringOnlyObject, valueOfOnlyObject]; +var nullPrimitives = [undefined, null]; +var nonIntegerNumbers = [-1.3, 0.2, 1.8, 1 / 3]; +var numbers = [0, -0, Infinity, -Infinity, 42]; +var strings = ['', 'foo']; +var booleans = [true, false]; +var symbols = hasSymbols ? [Symbol.iterator, Symbol('foo')] : []; +var nonSymbolPrimitives = [].concat(nullPrimitives, booleans, strings, numbers); +var nonNumberPrimitives = [].concat(nullPrimitives, booleans, strings, symbols); +var nonNullPrimitives = [].concat(booleans, strings, numbers, symbols); +var nonUndefinedPrimitives = [].concat(null, nonNullPrimitives); +var nonStrings = [].concat(nullPrimitives, booleans, numbers, symbols, objects); +var primitives = [].concat(nullPrimitives, nonNullPrimitives); +var nonPropertyKeys = [].concat(nullPrimitives, booleans, numbers, objects); +var propertyKeys = [].concat(strings, symbols); +var nonBooleans = [].concat(nullPrimitives, strings, symbols, numbers, objects); +var falsies = [].concat(nullPrimitives, false, '', 0, -0, NaN); +var truthies = [].concat(true, 'foo', 42, symbols, objects); + +module.exports = { + coercibleObject: coercibleObject, + valueOfOnlyObject: valueOfOnlyObject, + toStringOnlyObject: toStringOnlyObject, + uncoercibleObject: uncoercibleObject, + objects: objects, + nullPrimitives: nullPrimitives, + numbers: numbers, + strings: strings, + booleans: booleans, + symbols: symbols, + hasSymbols: hasSymbols, + nonSymbolPrimitives: nonSymbolPrimitives, + nonNumberPrimitives: nonNumberPrimitives, + nonNullPrimitives: nonNullPrimitives, + nonUndefinedPrimitives: nonUndefinedPrimitives, + nonStrings: nonStrings, + nonNumbers: nonNumberPrimitives.concat(objects), + nonIntegerNumbers: nonIntegerNumbers, + primitives: primitives, + nonPropertyKeys: nonPropertyKeys, + propertyKeys: propertyKeys, + nonBooleans: nonBooleans, + falsies: falsies, + truthies: truthies +}; diff --git a/deps/npm/node_modules/es-abstract/test/index.js b/deps/npm/node_modules/es-abstract/test/index.js new file mode 100644 index 00000000000000..63271ac2006c60 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/index.js @@ -0,0 +1,28 @@ +'use strict'; + +var ES = require('../'); +var test = require('tape'); + +var ESkeys = Object.keys(ES).sort(); +var ES6keys = Object.keys(ES.ES6).sort(); + +test('exposed properties', function (t) { + t.deepEqual(ESkeys, ES6keys.concat(['ES2017', 'ES7', 'ES2016', 'ES6', 'ES2015', 'ES5']).sort(), 'main ES object keys match ES6 keys'); + t.end(); +}); + +test('methods match', function (t) { + ES6keys.forEach(function (key) { + t.equal(ES.ES6[key], ES[key], 'method ' + key + ' on main ES object is ES6 method'); + }); + t.end(); +}); + +require('./GetIntrinsic'); + +require('./es5'); +require('./es6'); +require('./es2015'); +require('./es7'); +require('./es2016'); +require('./es2017'); diff --git a/deps/npm/node_modules/es-abstract/test/tests.js b/deps/npm/node_modules/es-abstract/test/tests.js new file mode 100644 index 00000000000000..df52c82c7aafd3 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/tests.js @@ -0,0 +1,1610 @@ +'use strict'; + +var test = require('tape'); + +var forEach = require('foreach'); +var is = require('object-is'); +var debug = require('object-inspect'); +var assign = require('object.assign'); + +var v = require('./helpers/values'); +var diffOps = require('./diffOps'); + +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; + +var getArraySubclassWithSpeciesConstructor = function getArraySubclass(speciesConstructor) { + var Bar = function Bar() { + var inst = []; + Object.setPrototypeOf(inst, Bar.prototype); + Object.defineProperty(inst, 'constructor', { value: Bar }); + return inst; + }; + Bar.prototype = Object.create(Array.prototype); + Object.setPrototypeOf(Bar, Array); + Object.defineProperty(Bar, Symbol.species, { value: speciesConstructor }); + + return Bar; +}; + +var hasSpecies = v.hasSymbols && Symbol.species; + +var hasGroups = 'groups' in (/a/).exec('a'); +var groups = function groups(matchObject) { + return hasGroups ? assign(matchObject, { groups: matchObject.groups }) : matchObject; +}; + +var es2015 = function ES2015(ES, ops, expectedMissing) { + test('has expected operations', function (t) { + var diff = diffOps(ES, ops, expectedMissing); + + t.deepEqual(diff.extra, [], 'no extra ops'); + + t.deepEqual(diff.missing, [], 'no unexpected missing ops'); + + t.end(); + }); + + test('ToPrimitive', function (t) { + t.test('primitives', function (st) { + var testPrimitive = function (primitive) { + st.ok(is(ES.ToPrimitive(primitive), primitive), debug(primitive) + ' is returned correctly'); + }; + forEach(v.primitives, testPrimitive); + st.end(); + }); + + t.test('objects', function (st) { + st.equal(ES.ToPrimitive(v.coercibleObject), 3, 'coercibleObject with no hint coerces to valueOf'); + st.ok(is(ES.ToPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString'); + st.equal(ES.ToPrimitive(v.coercibleObject, Number), 3, 'coercibleObject with hint Number coerces to valueOf'); + st.ok(is(ES.ToPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to NaN'); + st.equal(ES.ToPrimitive(v.coercibleObject, String), 42, 'coercibleObject with hint String coerces to nonstringified toString'); + st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + st.equal(ES.ToPrimitive(v.toStringOnlyObject), 7, 'toStringOnlyObject returns non-stringified toString'); + st.equal(ES.ToPrimitive(v.valueOfOnlyObject), 4, 'valueOfOnlyObject returns valueOf'); + st['throws'](function () { return ES.ToPrimitive(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); + st.end(); + }); + + t.test('dates', function (st) { + var invalid = new Date(NaN); + st.equal(ES.ToPrimitive(invalid), Date.prototype.toString.call(invalid), 'invalid Date coerces to Date#toString'); + var now = new Date(); + st.equal(ES.ToPrimitive(now), Date.prototype.toString.call(now), 'Date coerces to Date#toString'); + st.end(); + }); + + t.end(); + }); + + test('ToBoolean', function (t) { + t.equal(false, ES.ToBoolean(undefined), 'undefined coerces to false'); + t.equal(false, ES.ToBoolean(null), 'null coerces to false'); + t.equal(false, ES.ToBoolean(false), 'false returns false'); + t.equal(true, ES.ToBoolean(true), 'true returns true'); + + t.test('numbers', function (st) { + forEach([0, -0, NaN], function (falsyNumber) { + st.equal(false, ES.ToBoolean(falsyNumber), 'falsy number ' + falsyNumber + ' coerces to false'); + }); + forEach([Infinity, 42, 1, -Infinity], function (truthyNumber) { + st.equal(true, ES.ToBoolean(truthyNumber), 'truthy number ' + truthyNumber + ' coerces to true'); + }); + + st.end(); + }); + + t.equal(false, ES.ToBoolean(''), 'empty string coerces to false'); + t.equal(true, ES.ToBoolean('foo'), 'nonempty string coerces to true'); + + t.test('objects', function (st) { + forEach(v.objects, function (obj) { + st.equal(true, ES.ToBoolean(obj), 'object coerces to true'); + }); + st.equal(true, ES.ToBoolean(v.uncoercibleObject), 'uncoercibleObject coerces to true'); + + st.end(); + }); + + t.end(); + }); + + test('ToNumber', function (t) { + t.ok(is(NaN, ES.ToNumber(undefined)), 'undefined coerces to NaN'); + t.ok(is(ES.ToNumber(null), 0), 'null coerces to +0'); + t.ok(is(ES.ToNumber(false), 0), 'false coerces to +0'); + t.equal(1, ES.ToNumber(true), 'true coerces to 1'); + + t.test('numbers', function (st) { + st.ok(is(NaN, ES.ToNumber(NaN)), 'NaN returns itself'); + forEach([0, -0, 42, Infinity, -Infinity], function (num) { + st.equal(num, ES.ToNumber(num), num + ' returns itself'); + }); + forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { + st.ok(is(+numString, ES.ToNumber(numString)), '"' + numString + '" coerces to ' + Number(numString)); + }); + st.end(); + }); + + t.test('objects', function (st) { + forEach(v.objects, function (object) { + st.ok(is(ES.ToNumber(object), ES.ToNumber(ES.ToPrimitive(object))), 'object ' + object + ' coerces to same as ToPrimitive of object does'); + }); + st['throws'](function () { return ES.ToNumber(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + st.end(); + }); + + t.test('binary literals', function (st) { + st.equal(ES.ToNumber('0b10'), 2, '0b10 is 2'); + st.equal(ES.ToNumber({ toString: function () { return '0b11'; } }), 3, 'Object that toStrings to 0b11 is 3'); + + st.equal(true, is(ES.ToNumber('0b12'), NaN), '0b12 is NaN'); + st.equal(true, is(ES.ToNumber({ toString: function () { return '0b112'; } }), NaN), 'Object that toStrings to 0b112 is NaN'); + st.end(); + }); + + t.test('octal literals', function (st) { + st.equal(ES.ToNumber('0o10'), 8, '0o10 is 8'); + st.equal(ES.ToNumber({ toString: function () { return '0o11'; } }), 9, 'Object that toStrings to 0o11 is 9'); + + st.equal(true, is(ES.ToNumber('0o18'), NaN), '0o18 is NaN'); + st.equal(true, is(ES.ToNumber({ toString: function () { return '0o118'; } }), NaN), 'Object that toStrings to 0o118 is NaN'); + st.end(); + }); + + t.test('signed hex numbers', function (st) { + st.equal(true, is(ES.ToNumber('-0xF'), NaN), '-0xF is NaN'); + st.equal(true, is(ES.ToNumber(' -0xF '), NaN), 'space-padded -0xF is NaN'); + st.equal(true, is(ES.ToNumber('+0xF'), NaN), '+0xF is NaN'); + st.equal(true, is(ES.ToNumber(' +0xF '), NaN), 'space-padded +0xF is NaN'); + + st.end(); + }); + + t.test('trimming of whitespace and non-whitespace characters', function (st) { + var whitespace = ' \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'; + st.equal(0, ES.ToNumber(whitespace + 0 + whitespace), 'whitespace is trimmed'); + + // Zero-width space (zws), next line character (nel), and non-character (bom) are not whitespace. + var nonWhitespaces = { + '\\u0085': '\u0085', + '\\u200b': '\u200b', + '\\ufffe': '\ufffe' + }; + + forEach(nonWhitespaces, function (desc, nonWS) { + st.equal(true, is(ES.ToNumber(nonWS + 0 + nonWS), NaN), 'non-whitespace ' + desc + ' not trimmed'); + }); + + st.end(); + }); + + forEach(v.symbols, function (symbol) { + t['throws']( + function () { ES.ToNumber(symbol); }, + TypeError, + 'Symbols can’t be converted to a Number: ' + debug(symbol) + ); + }); + + t.test('dates', function (st) { + var invalid = new Date(NaN); + st.ok(is(ES.ToNumber(invalid), NaN), 'invalid Date coerces to NaN'); + var now = Date.now(); + st.equal(ES.ToNumber(new Date(now)), now, 'Date coerces to timestamp'); + st.end(); + }); + + t.end(); + }); + + test('ToInteger', function (t) { + t.ok(is(0, ES.ToInteger(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity, 42], function (num) { + t.ok(is(num, ES.ToInteger(num)), num + ' returns itself'); + t.ok(is(-num, ES.ToInteger(-num)), '-' + num + ' returns itself'); + }); + t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); + t['throws'](function () { return ES.ToInteger(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.end(); + }); + + test('ToInt32', function (t) { + t.ok(is(0, ES.ToInt32(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToInt32(num)), num + ' returns +0'); + t.ok(is(0, ES.ToInt32(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToInt32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToInt32(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToInt32(0x100000000 - 1), -1), '2^32 - 1 returns -1'); + t.ok(is(ES.ToInt32(0x80000000), -0x80000000), '2^31 returns -2^31'); + t.ok(is(ES.ToInt32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); + forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { + t.ok(is(ES.ToInt32(num), ES.ToInt32(ES.ToUint32(num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for 0x' + num.toString(16)); + t.ok(is(ES.ToInt32(-num), ES.ToInt32(ES.ToUint32(-num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for -0x' + num.toString(16)); + }); + t.end(); + }); + + test('ToUint32', function (t) { + t.ok(is(0, ES.ToUint32(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint32(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint32(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint32(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint32(0x100000000 - 1), 0x100000000 - 1), '2^32 - 1 returns 2^32 - 1'); + t.ok(is(ES.ToUint32(0x80000000), 0x80000000), '2^31 returns 2^31'); + t.ok(is(ES.ToUint32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); + forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { + t.ok(is(ES.ToUint32(num), ES.ToUint32(ES.ToInt32(num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for 0x' + num.toString(16)); + t.ok(is(ES.ToUint32(-num), ES.ToUint32(ES.ToInt32(-num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for -0x' + num.toString(16)); + }); + t.end(); + }); + + test('ToInt16', function (t) { + t.ok(is(0, ES.ToInt16(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToInt16(num)), num + ' returns +0'); + t.ok(is(0, ES.ToInt16(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToInt16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToInt16(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToInt16(0x100000000 - 1), -1), '2^32 - 1 returns -1'); + t.ok(is(ES.ToInt16(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToInt16(0x80000000 - 1), -1), '2^31 - 1 returns -1'); + t.ok(is(ES.ToInt16(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToInt16(0x10000 - 1), -1), '2^16 - 1 returns -1'); + t.end(); + }); + + test('ToUint16', function (t) { + t.ok(is(0, ES.ToUint16(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint16(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint16(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint16(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint16(0x100000000 - 1), 0x10000 - 1), '2^32 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint16(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToUint16(0x80000000 - 1), 0x10000 - 1), '2^31 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint16(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToUint16(0x10000 - 1), 0x10000 - 1), '2^16 - 1 returns 2^16 - 1'); + t.end(); + }); + + test('ToInt8', function (t) { + t.ok(is(0, ES.ToInt8(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToInt8(num)), num + ' returns +0'); + t.ok(is(0, ES.ToInt8(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToInt8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToInt8(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToInt8(0x100000000 - 1), -1), '2^32 - 1 returns -1'); + t.ok(is(ES.ToInt8(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToInt8(0x80000000 - 1), -1), '2^31 - 1 returns -1'); + t.ok(is(ES.ToInt8(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToInt8(0x10000 - 1), -1), '2^16 - 1 returns -1'); + t.ok(is(ES.ToInt8(0x100), 0), '2^8 returns +0'); + t.ok(is(ES.ToInt8(0x100 - 1), -1), '2^8 - 1 returns -1'); + t.ok(is(ES.ToInt8(0x10), 0x10), '2^4 returns 2^4'); + t.end(); + }); + + test('ToUint8', function (t) { + t.ok(is(0, ES.ToUint8(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint8(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint8(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint8(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint8(0x100000000 - 1), 0x100 - 1), '2^32 - 1 returns 2^8 - 1'); + t.ok(is(ES.ToUint8(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToUint8(0x80000000 - 1), 0x100 - 1), '2^31 - 1 returns 2^8 - 1'); + t.ok(is(ES.ToUint8(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToUint8(0x10000 - 1), 0x100 - 1), '2^16 - 1 returns 2^8 - 1'); + t.ok(is(ES.ToUint8(0x100), 0), '2^8 returns +0'); + t.ok(is(ES.ToUint8(0x100 - 1), 0x100 - 1), '2^8 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint8(0x10), 0x10), '2^4 returns 2^4'); + t.ok(is(ES.ToUint8(0x10 - 1), 0x10 - 1), '2^4 - 1 returns 2^4 - 1'); + t.end(); + }); + + test('ToUint8Clamp', function (t) { + t.ok(is(0, ES.ToUint8Clamp(NaN)), 'NaN coerces to +0'); + t.ok(is(0, ES.ToUint8Clamp(0)), '+0 returns +0'); + t.ok(is(0, ES.ToUint8Clamp(-0)), '-0 returns +0'); + t.ok(is(0, ES.ToUint8Clamp(-Infinity)), '-Infinity returns +0'); + t['throws'](function () { return ES.ToUint8Clamp(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + forEach([255, 256, 0x100000, Infinity], function (number) { + t.ok(is(255, ES.ToUint8Clamp(number)), number + ' coerces to 255'); + }); + t.equal(1, ES.ToUint8Clamp(1.49), '1.49 coerces to 1'); + t.equal(2, ES.ToUint8Clamp(1.5), '1.5 coerces to 2, because 2 is even'); + t.equal(2, ES.ToUint8Clamp(1.51), '1.51 coerces to 2'); + + t.equal(2, ES.ToUint8Clamp(2.49), '2.49 coerces to 2'); + t.equal(2, ES.ToUint8Clamp(2.5), '2.5 coerces to 2, because 2 is even'); + t.equal(3, ES.ToUint8Clamp(2.51), '2.51 coerces to 3'); + t.end(); + }); + + test('ToString', function (t) { + forEach(v.objects.concat(v.nonSymbolPrimitives), function (item) { + t.equal(ES.ToString(item), String(item), 'ES.ToString(' + debug(item) + ') ToStrings to String(' + debug(item) + ')'); + }); + + t['throws'](function () { return ES.ToString(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + + forEach(v.symbols, function (symbol) { + t['throws'](function () { return ES.ToString(symbol); }, TypeError, debug(symbol) + ' throws'); + }); + t.end(); + }); + + test('ToObject', function (t) { + t['throws'](function () { return ES.ToObject(undefined); }, TypeError, 'undefined throws'); + t['throws'](function () { return ES.ToObject(null); }, TypeError, 'null throws'); + forEach(v.numbers, function (number) { + var obj = ES.ToObject(number); + t.equal(typeof obj, 'object', 'number ' + number + ' coerces to object'); + t.equal(true, obj instanceof Number, 'object of ' + number + ' is Number object'); + t.ok(is(obj.valueOf(), number), 'object of ' + number + ' coerces to ' + number); + }); + t.end(); + }); + + test('RequireObjectCoercible', function (t) { + t.equal(false, 'CheckObjectCoercible' in ES, 'CheckObjectCoercible -> RequireObjectCoercible in ES6'); + t['throws'](function () { return ES.RequireObjectCoercible(undefined); }, TypeError, 'undefined throws'); + t['throws'](function () { return ES.RequireObjectCoercible(null); }, TypeError, 'null throws'); + var isCoercible = function (value) { + t.doesNotThrow(function () { return ES.RequireObjectCoercible(value); }, debug(value) + ' does not throw'); + }; + forEach(v.objects.concat(v.nonNullPrimitives), isCoercible); + t.end(); + }); + + test('IsCallable', function (t) { + t.equal(true, ES.IsCallable(function () {}), 'function is callable'); + var nonCallables = [/a/g, {}, Object.prototype, NaN].concat(v.primitives); + forEach(nonCallables, function (nonCallable) { + t.equal(false, ES.IsCallable(nonCallable), debug(nonCallable) + ' is not callable'); + }); + t.end(); + }); + + test('SameValue', function (t) { + t.equal(true, ES.SameValue(NaN, NaN), 'NaN is SameValue as NaN'); + t.equal(false, ES.SameValue(0, -0), '+0 is not SameValue as -0'); + forEach(v.objects.concat(v.primitives), function (val) { + t.equal(val === val, ES.SameValue(val, val), debug(val) + ' is SameValue to itself'); + }); + t.end(); + }); + + test('SameValueZero', function (t) { + t.equal(true, ES.SameValueZero(NaN, NaN), 'NaN is SameValueZero as NaN'); + t.equal(true, ES.SameValueZero(0, -0), '+0 is SameValueZero as -0'); + forEach(v.objects.concat(v.primitives), function (val) { + t.equal(val === val, ES.SameValueZero(val, val), debug(val) + ' is SameValueZero to itself'); + }); + t.end(); + }); + + test('ToPropertyKey', function (t) { + forEach(v.objects.concat(v.nonSymbolPrimitives), function (value) { + t.equal(ES.ToPropertyKey(value), String(value), 'ToPropertyKey(value) === String(value) for non-Symbols'); + }); + + forEach(v.symbols, function (symbol) { + t.equal( + ES.ToPropertyKey(symbol), + symbol, + 'ToPropertyKey(' + debug(symbol) + ') === ' + debug(symbol) + ); + t.equal( + ES.ToPropertyKey(Object(symbol)), + symbol, + 'ToPropertyKey(' + debug(Object(symbol)) + ') === ' + debug(symbol) + ); + }); + + t.end(); + }); + + test('ToLength', function (t) { + t['throws'](function () { return ES.ToLength(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); + t.equal(3, ES.ToLength(v.coercibleObject), 'coercibleObject coerces to 3'); + t.equal(42, ES.ToLength('42.5'), '"42.5" coerces to 42'); + t.equal(7, ES.ToLength(7.3), '7.3 coerces to 7'); + forEach([-0, -1, -42, -Infinity], function (negative) { + t.ok(is(0, ES.ToLength(negative)), negative + ' coerces to +0'); + }); + t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 1), '2^53 coerces to 2^53 - 1'); + t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 3), '2^53 + 2 coerces to 2^53 - 1'); + t.end(); + }); + + test('IsArray', function (t) { + t.equal(true, ES.IsArray([]), '[] is array'); + t.equal(false, ES.IsArray({}), '{} is not array'); + t.equal(false, ES.IsArray({ length: 1, 0: true }), 'arraylike object is not array'); + forEach(v.objects.concat(v.primitives), function (value) { + t.equal(false, ES.IsArray(value), debug(value) + ' is not array'); + }); + t.end(); + }); + + test('IsRegExp', function (t) { + forEach([/a/g, new RegExp('a', 'g')], function (regex) { + t.equal(true, ES.IsRegExp(regex), regex + ' is regex'); + }); + + forEach(v.objects.concat(v.primitives), function (nonRegex) { + t.equal(false, ES.IsRegExp(nonRegex), debug(nonRegex) + ' is not regex'); + }); + + t.test('Symbol.match', { skip: !v.hasSymbols || !Symbol.match }, function (st) { + var obj = {}; + obj[Symbol.match] = true; + st.equal(true, ES.IsRegExp(obj), 'object with truthy Symbol.match is regex'); + + var regex = /a/; + regex[Symbol.match] = false; + st.equal(false, ES.IsRegExp(regex), 'regex with falsy Symbol.match is not regex'); + + st.end(); + }); + + t.end(); + }); + + test('IsPropertyKey', function (t) { + forEach(v.numbers.concat(v.objects), function (notKey) { + t.equal(false, ES.IsPropertyKey(notKey), debug(notKey) + ' is not property key'); + }); + + t.equal(true, ES.IsPropertyKey('foo'), 'string is property key'); + + forEach(v.symbols, function (symbol) { + t.equal(true, ES.IsPropertyKey(symbol), debug(symbol) + ' is property key'); + }); + t.end(); + }); + + test('IsInteger', function (t) { + for (var i = -100; i < 100; i += 10) { + t.equal(true, ES.IsInteger(i), i + ' is integer'); + t.equal(false, ES.IsInteger(i + 0.2), (i + 0.2) + ' is not integer'); + } + t.equal(true, ES.IsInteger(-0), '-0 is integer'); + var notInts = v.nonNumbers.concat(v.nonIntegerNumbers, [Infinity, -Infinity, NaN, [], new Date()]); + forEach(notInts, function (notInt) { + t.equal(false, ES.IsInteger(notInt), debug(notInt) + ' is not integer'); + }); + t.equal(false, ES.IsInteger(v.uncoercibleObject), 'uncoercibleObject is not integer'); + t.end(); + }); + + test('IsExtensible', function (t) { + forEach(v.objects, function (object) { + t.equal(true, ES.IsExtensible(object), debug(object) + ' object is extensible'); + }); + forEach(v.primitives, function (primitive) { + t.equal(false, ES.IsExtensible(primitive), debug(primitive) + ' is not extensible'); + }); + if (Object.preventExtensions) { + t.equal(false, ES.IsExtensible(Object.preventExtensions({})), 'object with extensions prevented is not extensible'); + } + t.end(); + }); + + test('CanonicalNumericIndexString', function (t) { + var throwsOnNonString = function (notString) { + t['throws']( + function () { return ES.CanonicalNumericIndexString(notString); }, + TypeError, + debug(notString) + ' is not a string' + ); + }; + forEach(v.objects.concat(v.numbers), throwsOnNonString); + t.ok(is(-0, ES.CanonicalNumericIndexString('-0')), '"-0" returns -0'); + for (var i = -50; i < 50; i += 10) { + t.equal(i, ES.CanonicalNumericIndexString(String(i)), '"' + i + '" returns ' + i); + t.equal(undefined, ES.CanonicalNumericIndexString(String(i) + 'a'), '"' + i + 'a" returns undefined'); + } + t.end(); + }); + + test('IsConstructor', function (t) { + t.equal(true, ES.IsConstructor(function () {}), 'function is constructor'); + t.equal(false, ES.IsConstructor(/a/g), 'regex is not constructor'); + forEach(v.objects, function (object) { + t.equal(false, ES.IsConstructor(object), object + ' object is not constructor'); + }); + + try { + var foo = Function('return class Foo {}')(); // eslint-disable-line no-new-func + t.equal(ES.IsConstructor(foo), true, 'class is constructor'); + } catch (e) { + t.comment('SKIP: class syntax not supported.'); + } + t.end(); + }); + + test('Call', function (t) { + var receiver = {}; + var notFuncs = v.objects.concat(v.primitives).concat([/a/g, new RegExp('a', 'g')]); + t.plan(notFuncs.length + 4); + var throwsIfNotCallable = function (notFunc) { + t['throws']( + function () { return ES.Call(notFunc, receiver); }, + TypeError, + debug(notFunc) + ' (' + typeof notFunc + ') is not callable' + ); + }; + forEach(notFuncs, throwsIfNotCallable); + ES.Call(function (a, b) { + t.equal(this, receiver, 'context matches expected'); + t.deepEqual([a, b], [1, 2], 'named args are correct'); + t.equal(arguments.length, 3, 'extra argument was passed'); + t.equal(arguments[2], 3, 'extra argument was correct'); + }, receiver, [1, 2, 3]); + t.end(); + }); + + test('GetV', function (t) { + t['throws'](function () { return ES.GetV({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); + var obj = { a: function () {} }; + t.equal(ES.GetV(obj, 'a'), obj.a, 'returns property if it exists'); + t.equal(ES.GetV(obj, 'b'), undefined, 'returns undefiend if property does not exist'); + t.end(); + }); + + test('GetMethod', function (t) { + t['throws'](function () { return ES.GetMethod({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); + t.equal(ES.GetMethod({}, 'a'), undefined, 'returns undefined in property is undefined'); + t.equal(ES.GetMethod({ a: null }, 'a'), undefined, 'returns undefined if property is null'); + t.equal(ES.GetMethod({ a: undefined }, 'a'), undefined, 'returns undefined if property is undefined'); + var obj = { a: function () {} }; + t['throws'](function () { ES.GetMethod({ a: 'b' }, 'a'); }, TypeError, 'throws TypeError if property exists and is not callable'); + t.equal(ES.GetMethod(obj, 'a'), obj.a, 'returns property if it is callable'); + t.end(); + }); + + test('Get', function (t) { + t['throws'](function () { return ES.Get('a', 'a'); }, TypeError, 'Throws a TypeError if `O` is not an Object'); + t['throws'](function () { return ES.Get({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); + + var value = {}; + t.test('Symbols', { skip: !v.hasSymbols }, function (st) { + var sym = Symbol('sym'); + var obj = {}; + obj[sym] = value; + st.equal(ES.Get(obj, sym), value, 'returns property `P` if it exists on object `O`'); + st.end(); + }); + t.equal(ES.Get({ a: value }, 'a'), value, 'returns property `P` if it exists on object `O`'); + t.end(); + }); + + test('Type', { skip: !v.hasSymbols }, function (t) { + t.equal(ES.Type(Symbol.iterator), 'Symbol', 'Type(Symbol.iterator) is Symbol'); + t.end(); + }); + + test('SpeciesConstructor', function (t) { + t['throws'](function () { ES.SpeciesConstructor(null); }, TypeError); + t['throws'](function () { ES.SpeciesConstructor(undefined); }, TypeError); + + var defaultConstructor = function Foo() {}; + + t.equal( + ES.SpeciesConstructor({ constructor: undefined }, defaultConstructor), + defaultConstructor, + 'undefined constructor returns defaultConstructor' + ); + + t['throws']( + function () { return ES.SpeciesConstructor({ constructor: null }, defaultConstructor); }, + TypeError, + 'non-undefined non-object constructor throws' + ); + + t.test('with Symbol.species', { skip: !hasSpecies }, function (st) { + var Bar = function Bar() {}; + Bar[Symbol.species] = null; + + st.equal( + ES.SpeciesConstructor(new Bar(), defaultConstructor), + defaultConstructor, + 'undefined/null Symbol.species returns default constructor' + ); + + var Baz = function Baz() {}; + Baz[Symbol.species] = Bar; + st.equal( + ES.SpeciesConstructor(new Baz(), defaultConstructor), + Bar, + 'returns Symbol.species constructor value' + ); + + Baz[Symbol.species] = {}; + st['throws']( + function () { ES.SpeciesConstructor(new Baz(), defaultConstructor); }, + TypeError, + 'throws when non-constructor non-null non-undefined species value found' + ); + + st.end(); + }); + + t.end(); + }); + + var bothDescriptor = function () { + return { '[[Get]]': function () {}, '[[Value]]': true }; + }; + var accessorDescriptor = function () { + return { + '[[Get]]': function () {}, + '[[Enumerable]]': true, + '[[Configurable]]': true + }; + }; + var mutatorDescriptor = function () { + return { + '[[Set]]': function () {}, + '[[Enumerable]]': true, + '[[Configurable]]': true + }; + }; + var dataDescriptor = function () { + return { + '[[Value]]': 42, + '[[Writable]]': false + }; + }; + var genericDescriptor = function () { + return { + '[[Configurable]]': true, + '[[Enumerable]]': false + }; + }; + + test('IsPropertyDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t.equal( + ES.IsPropertyDescriptor(primitive), + false, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsPropertyDescriptor({ invalid: true }), false, 'invalid keys not allowed on a Property Descriptor'); + + t.equal(ES.IsPropertyDescriptor({}), true, 'empty object is an incomplete Property Descriptor'); + + t.equal(ES.IsPropertyDescriptor(accessorDescriptor()), true, 'accessor descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(mutatorDescriptor()), true, 'mutator descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(dataDescriptor()), true, 'data descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(genericDescriptor()), true, 'generic descriptor is a Property Descriptor'); + + t['throws'](function () { + ES.IsPropertyDescriptor(bothDescriptor()); + }, TypeError, 'a Property Descriptor can not be both a Data and an Accessor Descriptor'); + + t.end(); + }); + + test('IsAccessorDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.IsAccessorDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsAccessorDescriptor(), false, 'no value is not an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(undefined), false, 'undefined value is not an Accessor Descriptor'); + + t.equal(ES.IsAccessorDescriptor(accessorDescriptor()), true, 'accessor descriptor is an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(mutatorDescriptor()), true, 'mutator descriptor is an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(dataDescriptor()), false, 'data descriptor is not an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(genericDescriptor()), false, 'generic descriptor is not an Accessor Descriptor'); + + t.end(); + }); + + test('IsDataDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.IsDataDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsDataDescriptor(), false, 'no value is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); + + t.equal(ES.IsDataDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(dataDescriptor()), true, 'data descriptor is a Data Descriptor'); + t.equal(ES.IsDataDescriptor(genericDescriptor()), false, 'generic descriptor is not a Data Descriptor'); + + t.end(); + }); + + test('IsGenericDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.IsGenericDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsGenericDescriptor(), false, 'no value is not a Data Descriptor'); + t.equal(ES.IsGenericDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); + + t.equal(ES.IsGenericDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a generic Descriptor'); + t.equal(ES.IsGenericDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a generic Descriptor'); + t.equal(ES.IsGenericDescriptor(dataDescriptor()), false, 'data descriptor is not a generic Descriptor'); + + t.equal(ES.IsGenericDescriptor(genericDescriptor()), true, 'generic descriptor is a generic Descriptor'); + + t.end(); + }); + + test('FromPropertyDescriptor', function (t) { + t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); + t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); + + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.FromPropertyDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(accessor), { + get: accessor['[[Get]]'], + set: accessor['[[Set]]'], + enumerable: !!accessor['[[Enumerable]]'], + configurable: !!accessor['[[Configurable]]'] + }); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(mutator), { + get: mutator['[[Get]]'], + set: mutator['[[Set]]'], + enumerable: !!mutator['[[Enumerable]]'], + configurable: !!mutator['[[Configurable]]'] + }); + var data = dataDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(data), { + value: data['[[Value]]'], + writable: data['[[Writable]]'], + enumerable: !!data['[[Enumerable]]'], + configurable: !!data['[[Configurable]]'] + }); + + t['throws']( + function () { ES.FromPropertyDescriptor(genericDescriptor()); }, + TypeError, + 'a complete Property Descriptor is required' + ); + + t.end(); + }); + + test('ToPropertyDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.ToPropertyDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not an Object' + ); + }); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + get: accessor['[[Get]]'], + enumerable: !!accessor['[[Enumerable]]'], + configurable: !!accessor['[[Configurable]]'] + }), accessor); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + set: mutator['[[Set]]'], + enumerable: !!mutator['[[Enumerable]]'], + configurable: !!mutator['[[Configurable]]'] + }), mutator); + + var data = dataDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + value: data['[[Value]]'], + writable: data['[[Writable]]'], + configurable: !!data['[[Configurable]]'] + }), assign(data, { '[[Configurable]]': false })); + + var both = bothDescriptor(); + t['throws']( + function () { + ES.FromPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); + }, + TypeError, + 'data and accessor descriptors are mutually exclusive' + ); + + t.end(); + }); + + test('CompletePropertyDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.CompletePropertyDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + var generic = genericDescriptor(); + t.deepEqual(ES.CompletePropertyDescriptor(generic), { + '[[Configurable]]': !!generic['[[Configurable]]'], + '[[Enumerable]]': !!generic['[[Enumerable]]'], + '[[Value]]': undefined, + '[[Writable]]': false + }, 'completes a Generic Descriptor'); + + var data = dataDescriptor(); + t.deepEqual(ES.CompletePropertyDescriptor(data), { + '[[Configurable]]': !!data['[[Configurable]]'], + '[[Enumerable]]': false, + '[[Value]]': data['[[Value]]'], + '[[Writable]]': !!data['[[Writable]]'] + }, 'completes a Data Descriptor'); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.CompletePropertyDescriptor(accessor), { + '[[Get]]': accessor['[[Get]]'], + '[[Enumerable]]': !!accessor['[[Enumerable]]'], + '[[Configurable]]': !!accessor['[[Configurable]]'], + '[[Set]]': undefined + }, 'completes an Accessor Descriptor'); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.CompletePropertyDescriptor(mutator), { + '[[Set]]': mutator['[[Set]]'], + '[[Enumerable]]': !!mutator['[[Enumerable]]'], + '[[Configurable]]': !!mutator['[[Configurable]]'], + '[[Get]]': undefined + }, 'completes a mutator Descriptor'); + + t['throws']( + function () { ES.CompletePropertyDescriptor(bothDescriptor()); }, + TypeError, + 'data and accessor descriptors are mutually exclusive' + ); + + t.end(); + }); + + test('Set', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.Set(primitive, '', null, false); }, + TypeError, + debug(primitive) + ' is not an Object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonKey) { + t['throws']( + function () { ES.Set({}, nonKey, null, false); }, + TypeError, + debug(nonKey) + ' is not a Property Key' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { ES.Set({}, '', null, nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + var o = {}; + var value = {}; + ES.Set(o, 'key', value, true); + t.deepEqual(o, { key: value }, 'key is set'); + + t.test('nonwritable', { skip: !Object.defineProperty }, function (st) { + var obj = { a: value }; + Object.defineProperty(obj, 'a', { writable: false }); + + st['throws']( + function () { ES.Set(obj, 'a', value, true); }, + TypeError, + 'can not Set nonwritable property' + ); + + st.doesNotThrow( + function () { ES.Set(obj, 'a', value, false); }, + 'setting Throw to false prevents an exception' + ); + + st.end(); + }); + + t.test('nonconfigurable', { skip: !Object.defineProperty }, function (st) { + var obj = { a: value }; + Object.defineProperty(obj, 'a', { configurable: false }); + + ES.Set(obj, 'a', value, true); + st.deepEqual(obj, { a: value }, 'key is set'); + + st.end(); + }); + + t.end(); + }); + + test('HasOwnProperty', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.HasOwnProperty(primitive, 'key'); }, + TypeError, + debug(primitive) + ' is not an Object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonKey) { + t['throws']( + function () { ES.HasOwnProperty({}, nonKey); }, + TypeError, + debug(nonKey) + ' is not a Property Key' + ); + }); + + t.equal(ES.HasOwnProperty({}, 'toString'), false, 'inherited properties are not own'); + t.equal( + ES.HasOwnProperty({ toString: 1 }, 'toString'), + true, + 'shadowed inherited own properties are own' + ); + t.equal(ES.HasOwnProperty({ a: 1 }, 'a'), true, 'own properties are own'); + + t.end(); + }); + + test('HasProperty', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.HasProperty(primitive, 'key'); }, + TypeError, + debug(primitive) + ' is not an Object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonKey) { + t['throws']( + function () { ES.HasProperty({}, nonKey); }, + TypeError, + debug(nonKey) + ' is not a Property Key' + ); + }); + + t.equal(ES.HasProperty({}, 'nope'), false, 'object does not have nonexistent properties'); + t.equal(ES.HasProperty({}, 'toString'), true, 'object has inherited properties'); + t.equal( + ES.HasProperty({ toString: 1 }, 'toString'), + true, + 'object has shadowed inherited own properties' + ); + t.equal(ES.HasProperty({ a: 1 }, 'a'), true, 'object has own properties'); + + t.end(); + }); + + test('IsConcatSpreadable', function (t) { + forEach(v.primitives, function (primitive) { + t.equal(ES.IsConcatSpreadable(primitive), false, debug(primitive) + ' is not an Object'); + }); + + var hasSymbolConcatSpreadable = v.hasSymbols && Symbol.isConcatSpreadable; + t.test('Symbol.isConcatSpreadable', { skip: !hasSymbolConcatSpreadable }, function (st) { + forEach(v.falsies, function (falsy) { + var obj = {}; + obj[Symbol.isConcatSpreadable] = falsy; + st.equal( + ES.IsConcatSpreadable(obj), + false, + 'an object with ' + debug(falsy) + ' as Symbol.isConcatSpreadable is not concat spreadable' + ); + }); + + forEach(v.truthies, function (truthy) { + var obj = {}; + obj[Symbol.isConcatSpreadable] = truthy; + st.equal( + ES.IsConcatSpreadable(obj), + true, + 'an object with ' + debug(truthy) + ' as Symbol.isConcatSpreadable is concat spreadable' + ); + }); + + st.end(); + }); + + forEach(v.objects, function (object) { + t.equal( + ES.IsConcatSpreadable(object), + false, + 'non-array without Symbol.isConcatSpreadable is not concat spreadable' + ); + }); + + t.equal(ES.IsConcatSpreadable([]), true, 'arrays are concat spreadable'); + + t.end(); + }); + + test('Invoke', function (t) { + forEach(v.nonPropertyKeys, function (nonKey) { + t['throws']( + function () { ES.Invoke({}, nonKey); }, + TypeError, + debug(nonKey) + ' is not a Property Key' + ); + }); + + t['throws'](function () { ES.Invoke({ o: false }, 'o'); }, TypeError, 'fails on a non-function'); + + t.test('invoked callback', function (st) { + var aValue = {}; + var bValue = {}; + var obj = { + f: function (a) { + st.equal(arguments.length, 2, '2 args passed'); + st.equal(a, aValue, 'first arg is correct'); + st.equal(arguments[1], bValue, 'second arg is correct'); + } + }; + st.plan(3); + ES.Invoke(obj, 'f', aValue, bValue); + }); + + t.end(); + }); + + test('GetIterator', { skip: true }); + + test('IteratorNext', { skip: true }); + + test('IteratorComplete', { skip: true }); + + test('IteratorValue', { skip: true }); + + test('IteratorStep', { skip: true }); + + test('IteratorClose', { skip: true }); + + test('CreateIterResultObject', function (t) { + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { ES.CreateIterResultObject({}, nonBoolean); }, + TypeError, + '"done" argument must be a boolean; ' + debug(nonBoolean) + ' is not' + ); + }); + + var value = {}; + t.deepEqual(ES.CreateIterResultObject(value, true), { + value: value, + done: true + }, 'creates a "done" iteration result'); + t.deepEqual(ES.CreateIterResultObject(value, false), { + value: value, + done: false + }, 'creates a "not done" iteration result'); + + t.end(); + }); + + test('RegExpExec', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.RegExpExec(primitive); }, + TypeError, + '"R" argument must be an object; ' + debug(primitive) + ' is not' + ); + }); + + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { ES.RegExpExec({}, nonString); }, + TypeError, + '"S" argument must be a String; ' + debug(nonString) + ' is not' + ); + }); + + t.test('gets and calls a callable "exec"', function (st) { + var str = '123'; + var o = { + exec: function (S) { + st.equal(this, o, '"exec" receiver is R'); + st.equal(S, str, '"exec" argument is S'); + + return null; + } + }; + st.plan(2); + ES.RegExpExec(o, str); + st.end(); + }); + + t.test('throws if a callable "exec" returns a non-null non-object', function (st) { + var str = '123'; + st.plan(v.nonNullPrimitives.length); + forEach(v.nonNullPrimitives, function (nonNullPrimitive) { + st['throws']( + function () { ES.RegExpExec({ exec: function () { return nonNullPrimitive; } }, str); }, + TypeError, + '"exec" method must return `null` or an Object; ' + debug(nonNullPrimitive) + ' is not' + ); + }); + st.end(); + }); + + t.test('actual regex that should match against a string', function (st) { + var S = 'aabc'; + var R = /a/g; + var match1 = ES.RegExpExec(R, S); + var match2 = ES.RegExpExec(R, S); + var match3 = ES.RegExpExec(R, S); + st.deepEqual(match1, assign(['a'], groups({ index: 0, input: S })), 'match object 1 is as expected'); + st.deepEqual(match2, assign(['a'], groups({ index: 1, input: S })), 'match object 2 is as expected'); + st.equal(match3, null, 'match 3 is null as expected'); + st.end(); + }); + + t.test('actual regex that should match against a string, with shadowed "exec"', function (st) { + var S = 'aabc'; + var R = /a/g; + R.exec = undefined; + var match1 = ES.RegExpExec(R, S); + var match2 = ES.RegExpExec(R, S); + var match3 = ES.RegExpExec(R, S); + st.deepEqual(match1, assign(['a'], groups({ index: 0, input: S })), 'match object 1 is as expected'); + st.deepEqual(match2, assign(['a'], groups({ index: 1, input: S })), 'match object 2 is as expected'); + st.equal(match3, null, 'match 3 is null as expected'); + st.end(); + }); + t.end(); + }); + + test('ArraySpeciesCreate', function (t) { + t.test('errors', function (st) { + var testNonNumber = function (nonNumber) { + st['throws']( + function () { ES.ArraySpeciesCreate([], nonNumber); }, + TypeError, + debug(nonNumber) + ' is not a number' + ); + }; + forEach(v.nonNumbers, testNonNumber); + + st['throws']( + function () { ES.ArraySpeciesCreate([], -1); }, + TypeError, + '-1 is not >= 0' + ); + st['throws']( + function () { ES.ArraySpeciesCreate([], -Infinity); }, + TypeError, + '-Infinity is not >= 0' + ); + + var testNonIntegers = function (nonInteger) { + st['throws']( + function () { ES.ArraySpeciesCreate([], nonInteger); }, + TypeError, + debug(nonInteger) + ' is not an integer' + ); + }; + forEach(v.nonIntegerNumbers, testNonIntegers); + + st.end(); + }); + + t.test('works with a non-array', function (st) { + forEach(v.objects.concat(v.primitives), function (nonArray) { + var arr = ES.ArraySpeciesCreate(nonArray, 0); + st.ok(ES.IsArray(arr), 'is an array'); + st.equal(arr.length, 0, 'length is correct'); + st.equal(arr.constructor, Array, 'constructor is correct'); + }); + + st.end(); + }); + + t.test('works with a normal array', function (st) { + var len = 2; + var orig = [1, 2, 3]; + var arr = ES.ArraySpeciesCreate(orig, len); + + st.ok(ES.IsArray(arr), 'is an array'); + st.equal(arr.length, len, 'length is correct'); + st.equal(arr.constructor, orig.constructor, 'constructor is correct'); + + st.end(); + }); + + t.test('-0 length produces +0 length', function (st) { + var len = -0; + st.ok(is(len, -0), '-0 is negative zero'); + st.notOk(is(len, 0), '-0 is not positive zero'); + + var orig = [1, 2, 3]; + var arr = ES.ArraySpeciesCreate(orig, len); + + st.equal(ES.IsArray(arr), true); + st.ok(is(arr.length, 0)); + st.equal(arr.constructor, orig.constructor); + + st.end(); + }); + + t.test('works with species construtor', { skip: !hasSpecies }, function (st) { + var sentinel = {}; + var Foo = function Foo(len) { + this.length = len; + this.sentinel = sentinel; + }; + var Bar = getArraySubclassWithSpeciesConstructor(Foo); + var bar = new Bar(); + + t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); + + var arr = ES.ArraySpeciesCreate(bar, 3); + st.equal(arr.constructor, Foo, 'result used species constructor'); + st.equal(arr.length, 3, 'length property is correct'); + st.equal(arr.sentinel, sentinel, 'Foo constructor was exercised'); + + st.end(); + }); + + t.test('works with null species constructor', { skip: !hasSpecies }, function (st) { + var Bar = getArraySubclassWithSpeciesConstructor(null); + var bar = new Bar(); + + t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); + + var arr = ES.ArraySpeciesCreate(bar, 3); + st.equal(arr.constructor, Array, 'result used default constructor'); + st.equal(arr.length, 3, 'length property is correct'); + + st.end(); + }); + + t.test('works with undefined species constructor', { skip: !hasSpecies }, function (st) { + var Bar = getArraySubclassWithSpeciesConstructor(); + var bar = new Bar(); + + t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); + + var arr = ES.ArraySpeciesCreate(bar, 3); + st.equal(arr.constructor, Array, 'result used default constructor'); + st.equal(arr.length, 3, 'length property is correct'); + + st.end(); + }); + + t.test('throws with object non-construtor species constructor', { skip: !hasSpecies }, function (st) { + forEach(v.objects, function (obj) { + var Bar = getArraySubclassWithSpeciesConstructor(obj); + var bar = new Bar(); + + st.equal(ES.IsArray(bar), true, 'Bar instance is an array'); + + st['throws']( + function () { ES.ArraySpeciesCreate(bar, 3); }, + TypeError, + debug(obj) + ' is not a constructor' + ); + }); + + st.end(); + }); + + t.end(); + }); + + test('CreateDataProperty', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.CreateDataProperty(primitive); }, + TypeError, + debug(primitive) + ' is not an object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonPropertyKey) { + t['throws']( + function () { ES.CreateDataProperty({}, nonPropertyKey); }, + TypeError, + debug(nonPropertyKey) + ' is not a property key' + ); + }); + + var sentinel = {}; + forEach(v.propertyKeys, function (propertyKey) { + var obj = {}; + var status = ES.CreateDataProperty(obj, propertyKey, sentinel); + t.equal(status, true, 'status is true'); + t.equal( + obj[propertyKey], + sentinel, + debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' + ); + + if (typeof Object.defineProperty === 'function') { + var nonWritable = Object.defineProperty({}, propertyKey, { configurable: true, writable: false }); + + var nonWritableStatus = ES.CreateDataProperty(nonWritable, propertyKey, sentinel); + t.equal(nonWritableStatus, false, 'create data property failed'); + t.notEqual( + nonWritable[propertyKey], + sentinel, + debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonwritable' + ); + + var nonConfigurable = Object.defineProperty({}, propertyKey, { configurable: false, writable: true }); + + var nonConfigurableStatus = ES.CreateDataProperty(nonConfigurable, propertyKey, sentinel); + t.equal(nonConfigurableStatus, false, 'create data property failed'); + t.notEqual( + nonConfigurable[propertyKey], + sentinel, + debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonconfigurable' + ); + } + }); + + t.end(); + }); + + test('CreateDataPropertyOrThrow', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.CreateDataPropertyOrThrow(primitive); }, + TypeError, + debug(primitive) + ' is not an object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonPropertyKey) { + t['throws']( + function () { ES.CreateDataPropertyOrThrow({}, nonPropertyKey); }, + TypeError, + debug(nonPropertyKey) + ' is not a property key' + ); + }); + + var sentinel = {}; + forEach(v.propertyKeys, function (propertyKey) { + var obj = {}; + var status = ES.CreateDataPropertyOrThrow(obj, propertyKey, sentinel); + t.equal(status, true, 'status is true'); + t.equal( + obj[propertyKey], + sentinel, + debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' + ); + + if (typeof Object.preventExtensions === 'function') { + var notExtensible = {}; + Object.preventExtensions(notExtensible); + + t['throws']( + function () { ES.CreateDataPropertyOrThrow(notExtensible, propertyKey, sentinel); }, + TypeError, + 'can not install ' + debug(propertyKey) + ' on non-extensible object' + ); + t.notEqual( + notExtensible[propertyKey], + sentinel, + debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object' + ); + } + }); + + t.end(); + }); + + test('ObjectCreate', function (t) { + forEach(v.nonNullPrimitives, function (value) { + t['throws']( + function () { ES.ObjectCreate(value); }, + TypeError, + debug(value) + ' is not null, or an object' + ); + }); + + t.test('proto arg', function (st) { + var Parent = function Parent() {}; + Parent.prototype.foo = {}; + var child = ES.ObjectCreate(Parent.prototype); + st.equal(child instanceof Parent, true, 'child is instanceof Parent'); + st.equal(child.foo, Parent.prototype.foo, 'child inherits properties from Parent.prototype'); + + st.end(); + }); + + t.test('internal slots arg', function (st) { + st.doesNotThrow(function () { ES.ObjectCreate(null, []); }, 'an empty slot list is valid'); + + st['throws']( + function () { ES.ObjectCreate(null, ['a']); }, + SyntaxError, + 'internal slots are not supported' + ); + + st.end(); + }); + + t.test('null proto', { skip: !Object.create }, function (st) { + st.equal('toString' in ({}), true, 'normal objects have toString'); + st.equal('toString' in ES.ObjectCreate(null), false, 'makes a null object'); + + st.end(); + }); + + t.test('null proto when no native Object.create', { skip: Object.create }, function (st) { + st['throws']( + function () { ES.ObjectCreate(null); }, + SyntaxError, + 'without a native Object.create, can not create null objects' + ); + + st.end(); + }); + + t.end(); + }); + + test('AdvanceStringIndex', function (t) { + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { ES.AdvanceStringIndex(nonString); }, + TypeError, + '"S" argument must be a String; ' + debug(nonString) + ' is not' + ); + }); + + var notInts = v.nonNumbers.concat( + v.nonIntegerNumbers, + [Infinity, -Infinity, NaN, [], new Date(), Math.pow(2, 53), -1] + ); + forEach(notInts, function (nonInt) { + t['throws']( + function () { ES.AdvanceStringIndex('abc', nonInt); }, + TypeError, + '"index" argument must be an integer, ' + debug(nonInt) + ' is not.' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { ES.AdvanceStringIndex('abc', 0, nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + var str = 'a\uD83D\uDCA9c'; + + t.test('non-unicode mode', function (st) { + for (var i = 0; i < str.length + 2; i += 1) { + st.equal(ES.AdvanceStringIndex(str, i, false), i + 1, i + ' advances to ' + (i + 1)); + } + + st.end(); + }); + + t.test('unicode mode', function (st) { + st.equal(ES.AdvanceStringIndex(str, 0, true), 1, '0 advances to 1'); + st.equal(ES.AdvanceStringIndex(str, 1, true), 3, '1 advances to 3'); + st.equal(ES.AdvanceStringIndex(str, 2, true), 3, '2 advances to 3'); + st.equal(ES.AdvanceStringIndex(str, 3, true), 4, '3 advances to 4'); + st.equal(ES.AdvanceStringIndex(str, 4, true), 5, '4 advances to 5'); + + st.end(); + }); + + t.test('lone surrogates', function (st) { + var halfPoo = 'a\uD83Dc'; + + st.equal(ES.AdvanceStringIndex(halfPoo, 0, true), 1, '0 advances to 1'); + st.equal(ES.AdvanceStringIndex(halfPoo, 1, true), 2, '1 advances to 2'); + st.equal(ES.AdvanceStringIndex(halfPoo, 2, true), 3, '2 advances to 3'); + st.equal(ES.AdvanceStringIndex(halfPoo, 3, true), 4, '3 advances to 4'); + + st.end(); + }); + + t.test('surrogate pairs', function (st) { + var lowestPair = String.fromCharCode('0xD800') + String.fromCharCode('0xDC00'); + var highestPair = String.fromCharCode('0xDBFF') + String.fromCharCode('0xDFFF'); + var poop = String.fromCharCode('0xD83D') + String.fromCharCode('0xDCA9'); + + st.equal(ES.AdvanceStringIndex(lowestPair, 0, true), 2, 'lowest surrogate pair, 0 -> 2'); + st.equal(ES.AdvanceStringIndex(highestPair, 0, true), 2, 'highest surrogate pair, 0 -> 2'); + st.equal(ES.AdvanceStringIndex(poop, 0, true), 2, 'poop, 0 -> 2'); + + st.end(); + }); + + t.end(); + }); +}; + +var es2016 = function ES2016(ES, ops, expectedMissing) { + es2015(ES, ops, expectedMissing); + + test('SameValueNonNumber', function (t) { + var willThrow = [ + [3, 4], + [NaN, 4], + [4, ''], + ['abc', true], + [{}, false] + ]; + forEach(willThrow, function (nums) { + t['throws'](function () { return ES.SameValueNonNumber.apply(ES, nums); }, TypeError, 'value must be same type and non-number'); + }); + + forEach(v.objects.concat(v.nonNumberPrimitives), function (val) { + t.equal(val === val, ES.SameValueNonNumber(val, val), debug(val) + ' is SameValueNonNumber to itself'); + }); + + t.end(); + }); +}; + +var es2017 = function E2017(ES, ops, expectedMissing) { + es2016(ES, ops, expectedMissing); + + test('ToIndex', function (t) { + t.ok(is(ES.ToIndex(), 0), 'no value gives 0'); + t.ok(is(ES.ToIndex(undefined), 0), 'undefined value gives 0'); + + t['throws'](function () { ES.ToIndex(-1); }, RangeError, 'negative numbers throw'); + + t['throws'](function () { ES.ToIndex(MAX_SAFE_INTEGER + 1); }, RangeError, 'too large numbers throw'); + + t.equal(ES.ToIndex(3), 3, 'numbers work'); + t.equal(ES.ToIndex(v.valueOfOnlyObject), 4, 'coercible objects are coerced'); + + t.end(); + }); +}; + +module.exports = { + es2015: es2015, + es2016: es2016, + es2017: es2017 +}; diff --git a/deps/npm/node_modules/es-to-primitive/.editorconfig b/deps/npm/node_modules/es-to-primitive/.editorconfig new file mode 100644 index 00000000000000..bc228f8269443b --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/deps/npm/node_modules/es-to-primitive/.eslintrc b/deps/npm/node_modules/es-to-primitive/.eslintrc new file mode 100644 index 00000000000000..09e0c6c26c6dc2 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 14], + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 24, "properties": "never" }], + "max-lines-per-function": [2, { "max": 68 }], + "max-statements": [2, 20], + "new-cap": [2, { "capIsNewExceptions": ["GetMethod"] }] + } +} diff --git a/deps/npm/node_modules/es-to-primitive/.jscs.json b/deps/npm/node_modules/es-to-primitive/.jscs.json new file mode 100644 index 00000000000000..32edc7054c7282 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 12 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": false, + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array", "GetMethod"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/es-to-primitive/.travis.yml b/deps/npm/node_modules/es-to-primitive/.travis.yml new file mode 100644 index 00000000000000..c9ee1ece78cb6c --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/.travis.yml @@ -0,0 +1,243 @@ +language: node_js +cache: + directories: + - "$(nvm cache dir)" +os: + - linux +node_js: + - "10.11" + - "9.11" + - "8.12" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.11" + - "0.10" + - "0.8" + - "0.6" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true + - node_js: "0.6" diff --git a/deps/npm/node_modules/es-to-primitive/CHANGELOG.md b/deps/npm/node_modules/es-to-primitive/CHANGELOG.md new file mode 100644 index 00000000000000..962986969d1f79 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/CHANGELOG.md @@ -0,0 +1,38 @@ +1.2.0 / 2018-09-27 +================= + * [New] create ES2015 entry point/property, to replace ES6 + * [Fix] Ensure optional arguments are not part of the length (#29) + * [Deps] update `is-callable` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `object-inspect`, `replace` + * [Tests] avoid util.inspect bug with `new Date(NaN)` on node v6.0 and v6.1. + * [Tests] up to `node` `v10.11`, `v9.11`, `v8.12`, `v6.14`, `v4.9` + +1.1.1 / 2016-01-03 +================= + * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) + +1.1.0 / 2015-12-27 +================= + * [New] add `Symbol.toPrimitive` support + * [Deps] update `is-callable`, `is-date-object` + * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` + * [Dev Deps] remove unused deps + * [Tests] up to `node` `v5.3` + * [Tests] fix npm upgrades on older node versions + * [Tests] fix testling + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.1 / 2016-01-03 +================= + * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) + * [Deps] update `is-callable`, `is-date-object` + * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` + * [Dev Deps] remove unused deps + * [Tests] up to `node` `v5.3` + * [Tests] fix npm upgrades on older node versions + * [Tests] fix testling + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.0 / 2015-03-19 +================= + * Initial release. diff --git a/deps/npm/node_modules/es-to-primitive/LICENSE b/deps/npm/node_modules/es-to-primitive/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. diff --git a/deps/npm/node_modules/es-to-primitive/Makefile b/deps/npm/node_modules/es-to-primitive/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/es-to-primitive/README.md b/deps/npm/node_modules/es-to-primitive/README.md new file mode 100644 index 00000000000000..1831ecf39564f8 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/README.md @@ -0,0 +1,51 @@ +# es-to-primitive [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions. +When different versions of the spec conflict, the default export will be the latest version of the abstract operation. +Alternative versions will also be available under an `es5`/`es2015` exported property if you require a specific version. + +## Example + +```js +var toPrimitive = require('es-to-primitive'); +var assert = require('assert'); + +assert(toPrimitive(function () {}) === String(function () {})); + +var date = new Date(); +assert(toPrimitive(date) === String(date)); + +assert(toPrimitive({ valueOf: function () { return 3; } }) === 3); + +assert(toPrimitive(['a', 'b', 3]) === String(['a', 'b', 3])); + +var sym = Symbol(); +assert(toPrimitive(Object(sym)) === sym); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/es-to-primitive +[npm-version-svg]: http://versionbadg.es/ljharb/es-to-primitive.svg +[travis-svg]: https://travis-ci.org/ljharb/es-to-primitive.svg +[travis-url]: https://travis-ci.org/ljharb/es-to-primitive +[deps-svg]: https://david-dm.org/ljharb/es-to-primitive.svg +[deps-url]: https://david-dm.org/ljharb/es-to-primitive +[dev-deps-svg]: https://david-dm.org/ljharb/es-to-primitive/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-to-primitive#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/es-to-primitive.png +[testling-url]: https://ci.testling.com/ljharb/es-to-primitive +[npm-badge-png]: https://nodei.co/npm/es-to-primitive.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/es-to-primitive.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/es-to-primitive.svg +[downloads-url]: http://npm-stat.com/charts.html?package=es-to-primitive diff --git a/deps/npm/node_modules/es-to-primitive/es2015.js b/deps/npm/node_modules/es-to-primitive/es2015.js new file mode 100644 index 00000000000000..4a11a346c608c9 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/es2015.js @@ -0,0 +1,75 @@ +'use strict'; + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var isPrimitive = require('./helpers/isPrimitive'); +var isCallable = require('is-callable'); +var isDate = require('is-date-object'); +var isSymbol = require('is-symbol'); + +var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { + if (typeof O === 'undefined' || O === null) { + throw new TypeError('Cannot call method on ' + O); + } + if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { + throw new TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive(result)) { + return result; + } + } + } + throw new TypeError('No default value'); +}; + +var GetMethod = function GetMethod(O, P) { + var func = O[P]; + if (func !== null && typeof func !== 'undefined') { + if (!isCallable(func)) { + throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); + } + return func; + } + return void 0; +}; + +// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + var hint = 'default'; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = 'string'; + } else if (arguments[1] === Number) { + hint = 'number'; + } + } + + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod(input, Symbol.toPrimitive); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== 'undefined') { + var result = exoticToPrim.call(input, hint); + if (isPrimitive(result)) { + return result; + } + throw new TypeError('unable to convert exotic object to primitive'); + } + if (hint === 'default' && (isDate(input) || isSymbol(input))) { + hint = 'string'; + } + return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); +}; diff --git a/deps/npm/node_modules/es-to-primitive/es5.js b/deps/npm/node_modules/es-to-primitive/es5.js new file mode 100644 index 00000000000000..602aa362c7e3e3 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/es5.js @@ -0,0 +1,45 @@ +'use strict'; + +var toStr = Object.prototype.toString; + +var isPrimitive = require('./helpers/isPrimitive'); + +var isCallable = require('is-callable'); + +// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8 +var ES5internalSlots = { + '[[DefaultValue]]': function (O) { + var actualHint; + if (arguments.length > 1) { + actualHint = arguments[1]; + } else { + actualHint = toStr.call(O) === '[object Date]' ? String : Number; + } + + if (actualHint === String || actualHint === Number) { + var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var value, i; + for (i = 0; i < methods.length; ++i) { + if (isCallable(O[methods[i]])) { + value = O[methods[i]](); + if (isPrimitive(value)) { + return value; + } + } + } + throw new TypeError('No default value'); + } + throw new TypeError('invalid [[DefaultValue]] hint supplied'); + } +}; + +// http://ecma-international.org/ecma-262/5.1/#sec-9.1 +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + if (arguments.length > 1) { + return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]); + } + return ES5internalSlots['[[DefaultValue]]'](input); +}; diff --git a/deps/npm/node_modules/es-to-primitive/es6.js b/deps/npm/node_modules/es-to-primitive/es6.js new file mode 100644 index 00000000000000..2d1f4dc927a904 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/es6.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./es2015'); diff --git a/deps/npm/node_modules/es-to-primitive/helpers/isPrimitive.js b/deps/npm/node_modules/es-to-primitive/helpers/isPrimitive.js new file mode 100644 index 00000000000000..36691564527596 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/helpers/isPrimitive.js @@ -0,0 +1,3 @@ +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; diff --git a/deps/npm/node_modules/es-to-primitive/index.js b/deps/npm/node_modules/es-to-primitive/index.js new file mode 100644 index 00000000000000..e60d912e113325 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var ES5 = require('./es5'); +var ES6 = require('./es6'); +var ES2015 = require('./es2015'); + +if (Object.defineProperty) { + Object.defineProperty(ES2015, 'ES5', { enumerable: false, value: ES5 }); + Object.defineProperty(ES2015, 'ES6', { enumerable: false, value: ES6 }); + Object.defineProperty(ES2015, 'ES2015', { enumerable: false, value: ES2015 }); +} else { + ES6.ES5 = ES5; + ES6.ES6 = ES6; + ES6.ES2015 = ES2015; +} + +module.exports = ES2015; diff --git a/deps/npm/node_modules/es-to-primitive/package.json b/deps/npm/node_modules/es-to-primitive/package.json new file mode 100644 index 00000000000000..c3191f047e29c2 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/package.json @@ -0,0 +1,86 @@ +{ + "name": "es-to-primitive", + "version": "1.2.0", + "author": "Jordan Harband", + "description": "ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "node --es-staging test", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "npm run --silent jscs && npm run --silent eslint", + "jscs": "jscs test/*.js *.js", + "eslint": "eslint test/*.js *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/es-to-primitive.git" + }, + "keywords": [ + "primitive", + "abstract", + "ecmascript", + "es5", + "es6", + "es2015", + "toPrimitive", + "coerce", + "type", + "object", + "string", + "number", + "boolean", + "symbol", + "null", + "undefined" + ], + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^13.0.0", + "covert": "^1.1.0", + "eslint": "^5.6.0", + "foreach": "^2.0.5", + "function.prototype.name": "^1.1.0", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "object-inspect": "^1.6.0", + "object-is": "^1.0.1", + "replace": "^1.0.0", + "semver": "^5.5.1", + "tape": "^4.9.1" + }, + "testling": { + "files": "test", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz" +,"_integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==" +,"_from": "es-to-primitive@1.2.0" +} \ No newline at end of file diff --git a/deps/npm/node_modules/es-to-primitive/test/.eslintrc b/deps/npm/node_modules/es-to-primitive/test/.eslintrc new file mode 100644 index 00000000000000..9beb88c75250a8 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 3 }], + "no-magic-numbers": [0], + "sort-keys": [0] + } +} diff --git a/deps/npm/node_modules/es-to-primitive/test/es2015.js b/deps/npm/node_modules/es-to-primitive/test/es2015.js new file mode 100644 index 00000000000000..80f4083dd93152 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/es2015.js @@ -0,0 +1,151 @@ +'use strict'; + +var test = require('tape'); +var toPrimitive = require('../es2015'); +var is = require('object-is'); +var forEach = require('foreach'); +var functionName = require('function.prototype.name'); +var debug = require('object-inspect'); + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; +var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; + +test('function properties', function (t) { + t.equal(toPrimitive.length, 1, 'length is 1'); + t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); + + t.end(); +}); + +var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; + +test('primitives', function (t) { + forEach(primitives, function (i) { + t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); + t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); + t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); + }); + t.end(); +}); + +test('Symbols', { skip: !hasSymbols }, function (t) { + var symbols = [ + Symbol('foo'), + Symbol.iterator, + Symbol['for']('foo') // eslint-disable-line no-restricted-properties + ]; + forEach(symbols, function (sym) { + t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); + t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); + t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); + }); + + var primitiveSym = Symbol('primitiveSym'); + var objectSym = Object(primitiveSym); + t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); + t.end(); +}); + +test('Arrays', function (t) { + var arrays = [[], ['a', 'b'], [1, 2]]; + forEach(arrays, function (arr) { + t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + }); + t.end(); +}); + +test('Dates', function (t) { + var dates = [new Date(), new Date(0), new Date(NaN)]; + forEach(dates, function (date) { + t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); + }); + t.end(); +}); + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; + +test('Objects', function (t) { + t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); + t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); + t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + + t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); + + t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); + + t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { + var overriddenObject = { toString: st.fail, valueOf: st.fail }; + overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; + + st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); + st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); + st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); + + var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; + nullToPrimitive[Symbol.toPrimitive] = null; + st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); + + st.test('exceptions', function (sst) { + var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + nonFunctionToPrimitive[Symbol.toPrimitive] = {}; + sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); + + var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { + return { toString: function () { return hint; } }; + }; + sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); + + var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; + sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); + + sst.end(); + }); + + st.end(); + }); + + t.test('exceptions', function (st) { + st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); + + st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); + st.end(); + }); + t.end(); +}); diff --git a/deps/npm/node_modules/es-to-primitive/test/es5.js b/deps/npm/node_modules/es-to-primitive/test/es5.js new file mode 100644 index 00000000000000..8b80ff5bd968ad --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/es5.js @@ -0,0 +1,94 @@ +'use strict'; + +var test = require('tape'); +var toPrimitive = require('../es5'); +var is = require('object-is'); +var forEach = require('foreach'); +var functionName = require('function.prototype.name'); +var debug = require('object-inspect'); + +test('function properties', function (t) { + t.equal(toPrimitive.length, 1, 'length is 1'); + t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); + + t.end(); +}); + +var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; + +test('primitives', function (t) { + forEach(primitives, function (i) { + t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); + t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); + t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); + }); + t.end(); +}); + +test('Arrays', function (t) { + var arrays = [[], ['a', 'b'], [1, 2]]; + forEach(arrays, function (arr) { + t.ok(is(toPrimitive(arr), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); + t.equal(toPrimitive(arr, String), arr.toString(), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); + t.ok(is(toPrimitive(arr, Number), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); + }); + t.end(); +}); + +test('Dates', function (t) { + var dates = [new Date(), new Date(0), new Date(NaN)]; + forEach(dates, function (date) { + t.equal(toPrimitive(date), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); + t.equal(toPrimitive(date, String), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); + t.ok(is(toPrimitive(date, Number), date.valueOf()), 'toPrimitive(' + debug(date) + ') returns valueOf of the date'); + }); + t.end(); +}); + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; + +test('Objects', function (t) { + t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to toString'); + t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + + t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); + t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to toString'); + t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to toString'); + + t.ok(is(toPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString'); + t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + t.ok(is(toPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to Object#toString'); + + t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns toString'); + t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns toString'); + t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns toString'); + + t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); + + t.test('exceptions', function (st) { + st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); + + st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); + st.end(); + }); + + t.end(); +}); diff --git a/deps/npm/node_modules/es-to-primitive/test/es6.js b/deps/npm/node_modules/es-to-primitive/test/es6.js new file mode 100644 index 00000000000000..c6df63fb6dc086 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/es6.js @@ -0,0 +1,151 @@ +'use strict'; + +var test = require('tape'); +var toPrimitive = require('../es6'); +var is = require('object-is'); +var forEach = require('foreach'); +var functionName = require('function.prototype.name'); +var debug = require('object-inspect'); + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; +var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; + +test('function properties', function (t) { + t.equal(toPrimitive.length, 1, 'length is 1'); + t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); + + t.end(); +}); + +var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; + +test('primitives', function (t) { + forEach(primitives, function (i) { + t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); + t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); + t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); + }); + t.end(); +}); + +test('Symbols', { skip: !hasSymbols }, function (t) { + var symbols = [ + Symbol('foo'), + Symbol.iterator, + Symbol['for']('foo') // eslint-disable-line no-restricted-properties + ]; + forEach(symbols, function (sym) { + t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); + t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); + t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); + }); + + var primitiveSym = Symbol('primitiveSym'); + var objectSym = Object(primitiveSym); + t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); + t.end(); +}); + +test('Arrays', function (t) { + var arrays = [[], ['a', 'b'], [1, 2]]; + forEach(arrays, function (arr) { + t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + }); + t.end(); +}); + +test('Dates', function (t) { + var dates = [new Date(), new Date(0), new Date(NaN)]; + forEach(dates, function (date) { + t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); + }); + t.end(); +}); + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; + +test('Objects', function (t) { + t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); + t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); + t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + + t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); + + t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); + + t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { + var overriddenObject = { toString: st.fail, valueOf: st.fail }; + overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; + + st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); + st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); + st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); + + var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; + nullToPrimitive[Symbol.toPrimitive] = null; + st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); + + st.test('exceptions', function (sst) { + var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + nonFunctionToPrimitive[Symbol.toPrimitive] = {}; + sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); + + var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { + return { toString: function () { return hint; } }; + }; + sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); + + var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; + sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); + + sst.end(); + }); + + st.end(); + }); + + t.test('exceptions', function (st) { + st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); + + st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); + st.end(); + }); + t.end(); +}); diff --git a/deps/npm/node_modules/es-to-primitive/test/index.js b/deps/npm/node_modules/es-to-primitive/test/index.js new file mode 100644 index 00000000000000..ad71f39e2581e7 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/index.js @@ -0,0 +1,20 @@ +'use strict'; + +var toPrimitive = require('../'); +var ES5 = require('../es5'); +var ES6 = require('../es6'); +var ES2015 = require('../es2015'); + +var test = require('tape'); + +test('default export', function (t) { + t.equal(toPrimitive, ES2015, 'default export is ES2015'); + t.equal(toPrimitive.ES5, ES5, 'ES5 property has ES5 method'); + t.equal(toPrimitive.ES6, ES6, 'ES6 property has ES6 method'); + t.equal(toPrimitive.ES2015, ES2015, 'ES2015 property has ES2015 method'); + t.end(); +}); + +require('./es5'); +require('./es6'); +require('./es2015'); diff --git a/deps/npm/node_modules/extend/.eslintrc b/deps/npm/node_modules/extend/.eslintrc new file mode 100644 index 00000000000000..a34cf2831b7c38 --- /dev/null +++ b/deps/npm/node_modules/extend/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 20], + "eqeqeq": [2, "allow-null"], + "func-name-matching": [1], + "max-depth": [1, 4], + "max-statements": [2, 26], + "no-extra-parens": [1], + "no-magic-numbers": [0], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], + "sort-keys": [0], + } +} diff --git a/deps/npm/node_modules/find-npm-prefix/test/find-prefix.js~ b/deps/npm/node_modules/find-npm-prefix/test/find-prefix.js~ new file mode 100644 index 00000000000000..76886cec678c53 --- /dev/null +++ b/deps/npm/node_modules/find-npm-prefix/test/find-prefix.js~ @@ -0,0 +1,79 @@ +'use strict' +const Bluebird = require('bluebird') +const test = require('tap').test +const requireInject = require('require-inject') +const findPrefix = requireInject('../find-prefix.js', { + fs: { + readdir: mockReaddir + } +}) + +test('find-prefix', t => { + const tests = { + '/Users/example/code/test1/node_modules': '/Users/example/code/test1', + '/Users/example/code/test1/node_modules/node_modules': '/Users/example/code/test1', + '/Users/example/code/test1/sub1': '/Users/example/code/test1', + '/Users/example/code/test1/sub1/sub1a': '/Users/example/code/test1', + '/Users/example/code/test2': '/Users/example/code/test2', + '/Users/example/code/test2/sub2': '/Users/example/code/test2', + '/Users/example/code': '/Users/example/code', + '/Users/example': '/Users/example', + '/does/not/exist': '/does/not/exist' + } + t.plan(Object.keys(tests).length) + return Bluebird.map(Object.keys(tests), dir => { + return findPrefix(dir).then(pre => { + t.is(pre, tests[dir], dir) + }) + }) +}) + +test('fail-prefix', t => { + return findPrefix('/Users/example/eperm').then(pre => { + t.fail('no eperm') + }).catch(err => { + t.is(err.code, 'EPERM', 'got perm error') + }) +}) + +const fixture = { + 'Users': { + 'example': { + 'code': { + 'test1': { + 'node_modules': { + 'node_modules': {} + }, + 'sub1': { + 'sub1a': {} + } + }, + 'test2': { + 'package.json': {}, + 'sub2': {} + } + } + } + } +} + +function mockReaddir (dir, cb) { + if (/eperm/.test(dir)) { + const err = new Error('Can not read: ' + dir) + err.code = 'EPERM' + return cb(err) + } + const parts = dir.split(/\//).slice(1) + let cwd = fixture + let part + while (part = parts.shift()) { + if (part in cwd) { + cwd = cwd[part] + } else { + const err = new Error('Does not exist: ' + dir + ' * ' + part) + err.code = 'ENOENT' + return cb(err) + } + } + return cb(null, Object.keys(cwd)) +} diff --git a/deps/npm/node_modules/fs-minipass/index.js b/deps/npm/node_modules/fs-minipass/index.js index 0f15c810ebf5f9..6bb7f102d80226 100644 --- a/deps/npm/node_modules/fs-minipass/index.js +++ b/deps/npm/node_modules/fs-minipass/index.js @@ -6,7 +6,7 @@ const fs = require('fs') // for writev const binding = process.binding('fs') const writeBuffers = binding.writeBuffers -const FSReqWrap = binding.FSReqWrap +const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback const _autoClose = Symbol('_autoClose') const _close = Symbol('_close') diff --git a/deps/npm/node_modules/fs-minipass/package.json b/deps/npm/node_modules/fs-minipass/package.json index c2f925e8895a60..dd3186653953b8 100644 --- a/deps/npm/node_modules/fs-minipass/package.json +++ b/deps/npm/node_modules/fs-minipass/package.json @@ -1,8 +1,8 @@ { "_from": "fs-minipass@^1.2.5", - "_id": "fs-minipass@1.2.5", + "_id": "fs-minipass@1.2.6", "_inBundle": false, - "_integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "_integrity": "sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==", "_location": "/fs-minipass", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/tar" ], - "_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "_shasum": "06c277218454ec288df77ada54a03b8702aacb9d", + "_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz", + "_shasum": "2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07", "_spec": "fs-minipass@^1.2.5", - "_where": "/Users/rebecca/code/npm/node_modules/tar", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/tar", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -38,7 +38,7 @@ "description": "fs read and write streams based on minipass", "devDependencies": { "mutate-fs": "^2.0.1", - "tap": "^10.7.2" + "tap": "^13.1.9" }, "files": [ "index.js" @@ -53,10 +53,13 @@ "url": "git+https://github.com/npm/fs-minipass.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", - "test": "tap test/*.js --100 -J" + "test": "tap" }, - "version": "1.2.5" + "tap": { + "check-coverage": true + }, + "version": "1.2.6" } diff --git a/deps/npm/node_modules/fstream/.npmignore b/deps/npm/node_modules/fstream/.npmignore deleted file mode 100644 index 494272a81afb6f..00000000000000 --- a/deps/npm/node_modules/fstream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules/ -examples/deep-copy/ -examples/path/ -examples/filter-copy/ diff --git a/deps/npm/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/fstream/lib/writer.js index 140e449e06dd5b..3f10547820fad9 100644 --- a/deps/npm/node_modules/fstream/lib/writer.js +++ b/deps/npm/node_modules/fstream/lib/writer.js @@ -147,7 +147,7 @@ Writer.prototype._stat = function (current) { // if it's a type change, then we need to clobber or error. // if it's not a type change, then let the impl take care of it. - if (currentType !== self.type) { + if (currentType !== self.type || self.type === 'File' && current.nlink > 1) { return rimraf(self._path, function (er) { if (er) return self.error(er) self._old = null diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json index 25418b6709e64a..f90ce2c450ee86 100644 --- a/deps/npm/node_modules/fstream/package.json +++ b/deps/npm/node_modules/fstream/package.json @@ -1,8 +1,8 @@ { "_from": "fstream@^1.0.0", - "_id": "fstream@1.0.11", + "_id": "fstream@1.0.12", "_inBundle": false, - "_integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "_integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", "_location": "/fstream", "_phantomChildren": {}, "_requested": { @@ -19,10 +19,10 @@ "/node-gyp", "/node-gyp/tar" ], - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "_shasum": "5c1fb1f117477114f0632a0eb4b71b3cb0fd3171", + "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "_shasum": "4e8ba8ee2d48be4f7d0de505455548eae5932045", "_spec": "fstream@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/node-gyp", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -58,5 +58,5 @@ "scripts": { "test": "standard && tap examples/*.js" }, - "version": "1.0.11" + "version": "1.0.12" } diff --git a/deps/npm/node_modules/function-bind/.editorconfig b/deps/npm/node_modules/function-bind/.editorconfig new file mode 100644 index 00000000000000..ac29adef0361c6 --- /dev/null +++ b/deps/npm/node_modules/function-bind/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/deps/npm/node_modules/function-bind/.eslintrc b/deps/npm/node_modules/function-bind/.eslintrc new file mode 100644 index 00000000000000..9b33d8edffcc82 --- /dev/null +++ b/deps/npm/node_modules/function-bind/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "max-nested-callbacks": [2, 3], + "max-params": [2, 3], + "max-statements": [2, 20], + "no-new-func": [1], + "strict": [0] + } +} diff --git a/deps/npm/node_modules/function-bind/.jscs.json b/deps/npm/node_modules/function-bind/.jscs.json new file mode 100644 index 00000000000000..773f4ced19400f --- /dev/null +++ b/deps/npm/node_modules/function-bind/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 8 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/function-bind/.npmignore b/deps/npm/node_modules/function-bind/.npmignore new file mode 100644 index 00000000000000..dbb555fd1f9f59 --- /dev/null +++ b/deps/npm/node_modules/function-bind/.npmignore @@ -0,0 +1,22 @@ +# gitignore +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript +coverage +node_modules + +# Only apps should have lockfiles +npm-shrinkwrap.json +package-lock.json +yarn.lock diff --git a/deps/npm/node_modules/function-bind/.travis.yml b/deps/npm/node_modules/function-bind/.travis.yml new file mode 100644 index 00000000000000..85f70d2464f393 --- /dev/null +++ b/deps/npm/node_modules/function-bind/.travis.yml @@ -0,0 +1,168 @@ +language: node_js +os: + - linux +node_js: + - "8.4" + - "7.10" + - "6.11" + - "5.12" + - "4.8" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/deps/npm/node_modules/function-bind/LICENSE b/deps/npm/node_modules/function-bind/LICENSE new file mode 100644 index 00000000000000..5b1b5dc3683d91 --- /dev/null +++ b/deps/npm/node_modules/function-bind/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Raynos. + +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. diff --git a/deps/npm/node_modules/function-bind/README.md b/deps/npm/node_modules/function-bind/README.md new file mode 100644 index 00000000000000..81862a02cb940c --- /dev/null +++ b/deps/npm/node_modules/function-bind/README.md @@ -0,0 +1,48 @@ +# function-bind + + + + + +Implementation of function.prototype.bind + +## Example + +I mainly do this for unit tests I run on phantomjs. +PhantomJS does not have Function.prototype.bind :( + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + + [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg + [travis-url]: https://travis-ci.org/Raynos/function-bind + [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg + [npm-url]: https://npmjs.org/package/function-bind + [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png + [6]: https://coveralls.io/r/Raynos/function-bind + [7]: https://gemnasium.com/Raynos/function-bind.png + [8]: https://gemnasium.com/Raynos/function-bind + [deps-svg]: https://david-dm.org/Raynos/function-bind.svg + [deps-url]: https://david-dm.org/Raynos/function-bind + [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg + [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies + [11]: https://ci.testling.com/Raynos/function-bind.png + [12]: https://ci.testling.com/Raynos/function-bind diff --git a/deps/npm/node_modules/function-bind/implementation.js b/deps/npm/node_modules/function-bind/implementation.js new file mode 100644 index 00000000000000..cc4daec1b080a1 --- /dev/null +++ b/deps/npm/node_modules/function-bind/implementation.js @@ -0,0 +1,52 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/deps/npm/node_modules/function-bind/index.js b/deps/npm/node_modules/function-bind/index.js new file mode 100644 index 00000000000000..3bb6b9609889f8 --- /dev/null +++ b/deps/npm/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/deps/npm/node_modules/function-bind/package.json b/deps/npm/node_modules/function-bind/package.json new file mode 100644 index 00000000000000..426db8c4d8705e --- /dev/null +++ b/deps/npm/node_modules/function-bind/package.json @@ -0,0 +1,67 @@ +{ + "name": "function-bind", + "version": "1.1.1", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": "git://github.com/Raynos/function-bind.git", + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.5.0", + "jscs": "^3.0.7", + "tape": "^4.8.0" + }, + "license": "MIT", + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "npm run coverage -- --quiet", + "tests-only": "node test", + "coverage": "covert test/*.js", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js */*.js", + "eslint": "eslint *.js */*.js" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } + +,"_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" +,"_integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" +,"_from": "function-bind@1.1.1" +} \ No newline at end of file diff --git a/deps/npm/node_modules/function-bind/test/.eslintrc b/deps/npm/node_modules/function-bind/test/.eslintrc new file mode 100644 index 00000000000000..8a56d5b72fb008 --- /dev/null +++ b/deps/npm/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/deps/npm/node_modules/function-bind/test/index.js b/deps/npm/node_modules/function-bind/test/index.js new file mode 100644 index 00000000000000..2edecce2f0fa5a --- /dev/null +++ b/deps/npm/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json index a17913f2210437..eabcee1a8b3461 100644 --- a/deps/npm/node_modules/graceful-fs/package.json +++ b/deps/npm/node_modules/graceful-fs/package.json @@ -1,19 +1,19 @@ { - "_from": "graceful-fs@4.1.15", - "_id": "graceful-fs@4.1.15", + "_from": "graceful-fs@^4.1.15", + "_id": "graceful-fs@4.2.0", "_inBundle": false, - "_integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "_integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", "_location": "/graceful-fs", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "graceful-fs@4.1.15", + "raw": "graceful-fs@^4.1.15", "name": "graceful-fs", "escapedName": "graceful-fs", - "rawSpec": "4.1.15", + "rawSpec": "^4.1.15", "saveSpec": null, - "fetchSpec": "4.1.15" + "fetchSpec": "^4.1.15" }, "_requiredBy": [ "#USER", @@ -22,6 +22,7 @@ "/cacache", "/cmd-shim", "/configstore", + "/cp-file", "/flat-cache", "/fs-vacuum", "/fs-write-stream-atomic", @@ -31,31 +32,32 @@ "/load-json-file", "/node-gyp", "/npm-lifecycle", - "/npm-registry-client", - "/npm-registry-fetch/cacache", + "/package-hash", "/pkg-conf/load-json-file", "/read-cmd-shim", "/read-installed", "/read-package-json", "/readdir-scoped-modules", "/sha", + "/test-exclude/load-json-file", "/write-file-atomic" ], - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "_shasum": "ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00", - "_spec": "graceful-fs@4.1.15", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "_shasum": "8d8fdc73977cb04104721cb53666c1ca64cd328b", + "_spec": "graceful-fs@^4.1.15", + "_where": "/Users/isaacs/dev/npm/cli", "bugs": { "url": "https://github.com/isaacs/node-graceful-fs/issues" }, "bundleDependencies": false, + "dependencies": {}, "deprecated": false, "description": "A drop-in replacement for fs, making various improvements.", "devDependencies": { "import-fresh": "^2.0.0", "mkdirp": "^0.5.0", "rimraf": "^2.2.8", - "tap": "^12.0.1" + "tap": "^12.7.0" }, "directories": { "test": "test" @@ -92,10 +94,10 @@ "url": "git+https://github.com/isaacs/node-graceful-fs.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", "test": "node test.js | tap -" }, - "version": "4.1.15" + "version": "4.2.0" } diff --git a/deps/npm/node_modules/graceful-fs/polyfills.js b/deps/npm/node_modules/graceful-fs/polyfills.js index b964ed0806ceeb..ab692016c90b04 100644 --- a/deps/npm/node_modules/graceful-fs/polyfills.js +++ b/deps/npm/node_modules/graceful-fs/polyfills.js @@ -272,18 +272,24 @@ function patch (fs) { } } - function statFix (orig) { if (!orig) return orig // Older versions of Node erroneously returned signed integers for // uid + gid. - return function (target, cb) { - return orig.call(fs, target, function (er, stats) { - if (!stats) return cb.apply(this, arguments) - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } if (cb) cb.apply(this, arguments) - }) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) } } @@ -291,8 +297,9 @@ function patch (fs) { if (!orig) return orig // Older versions of Node erroneously returned signed integers for // uid + gid. - return function (target) { - var stats = orig.call(fs, target) + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) if (stats.uid < 0) stats.uid += 0x100000000 if (stats.gid < 0) stats.gid += 0x100000000 return stats; diff --git a/deps/npm/node_modules/has-symbols/.eslintrc b/deps/npm/node_modules/has-symbols/.eslintrc new file mode 100644 index 00000000000000..f78f6f181f67dc --- /dev/null +++ b/deps/npm/node_modules/has-symbols/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0 + } +} diff --git a/deps/npm/node_modules/has-symbols/.npmignore b/deps/npm/node_modules/has-symbols/.npmignore new file mode 100644 index 00000000000000..5148e527a7e286 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/.npmignore @@ -0,0 +1,37 @@ +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules +jspm_packages + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history diff --git a/deps/npm/node_modules/has-symbols/.travis.yml b/deps/npm/node_modules/has-symbols/.travis.yml new file mode 100644 index 00000000000000..3b3331a3b488a0 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/.travis.yml @@ -0,0 +1,113 @@ +language: node_js +node_js: + - "6.6" + - "6.5" + - "6.4" + - "6.3" + - "6.2" + - "6.1" + - "6.0" + - "5.12" + - "5.11" + - "5.10" + - "5.9" + - "5.8" + - "5.7" + - "5.6" + - "5.5" + - "5.4" + - "5.3" + - "5.2" + - "5.1" + - "5.0" + - "4.5" + - "4.4" + - "4.3" + - "4.2" + - "4.1" + - "4.0" + - "iojs-v3.3" + - "iojs-v3.2" + - "iojs-v3.1" + - "iojs-v3.0" + - "iojs-v2.5" + - "iojs-v2.4" + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +script: + - 'if [ -n "${LINT-}" ]; then npm run lint ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: LINT=true + allow_failures: + - node_js: "6.5" + - node_js: "6.4" + - node_js: "6.3" + - node_js: "6.2" + - node_js: "6.1" + - node_js: "6.0" + - node_js: "5.11" + - node_js: "5.10" + - node_js: "5.9" + - node_js: "5.8" + - node_js: "5.7" + - node_js: "5.6" + - node_js: "5.5" + - node_js: "5.4" + - node_js: "5.3" + - node_js: "5.2" + - node_js: "5.1" + - node_js: "5.0" + - node_js: "4.4" + - node_js: "4.3" + - node_js: "4.2" + - node_js: "4.1" + - node_js: "4.0" + - node_js: "iojs-v3.2" + - node_js: "iojs-v3.1" + - node_js: "iojs-v3.0" + - node_js: "iojs-v2.4" + - node_js: "iojs-v2.3" + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.6" + - node_js: "0.4" diff --git a/deps/npm/node_modules/has-symbols/CHANGELOG.md b/deps/npm/node_modules/has-symbols/CHANGELOG.md new file mode 100644 index 00000000000000..da7f9da7ea2077 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/CHANGELOG.md @@ -0,0 +1,3 @@ +1.0.0 / 2016-09-19 +================= + * Initial release. diff --git a/deps/npm/node_modules/has-symbols/LICENSE b/deps/npm/node_modules/has-symbols/LICENSE new file mode 100644 index 00000000000000..df31cbf3c064d0 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jordan Harband + +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. diff --git a/deps/npm/node_modules/has-symbols/README.md b/deps/npm/node_modules/has-symbols/README.md new file mode 100644 index 00000000000000..b27b31acbc71bc --- /dev/null +++ b/deps/npm/node_modules/has-symbols/README.md @@ -0,0 +1,45 @@ +# has-symbols [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has Symbol support. Supports spec, or shams. + +## Example + +```js +var hasSymbols = require('has-symbols'); + +hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. + +var hasSymbolsKinda = require('has-symbols/shams'); +hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-symbols +[2]: http://versionbadg.es/ljharb/has-symbols.svg +[3]: https://travis-ci.org/ljharb/has-symbols.svg +[4]: https://travis-ci.org/ljharb/has-symbols +[5]: https://david-dm.org/ljharb/has-symbols.svg +[6]: https://david-dm.org/ljharb/has-symbols +[7]: https://david-dm.org/ljharb/has-symbols/dev-status.svg +[8]: https://david-dm.org/ljharb/has-symbols#info=devDependencies +[9]: https://ci.testling.com/ljharb/has-symbols.png +[10]: https://ci.testling.com/ljharb/has-symbols +[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/has-symbols.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/has-symbols.svg +[downloads-url]: http://npm-stat.com/charts.html?package=has-symbols diff --git a/deps/npm/node_modules/has-symbols/index.js b/deps/npm/node_modules/has-symbols/index.js new file mode 100644 index 00000000000000..f72159e0ac7dcd --- /dev/null +++ b/deps/npm/node_modules/has-symbols/index.js @@ -0,0 +1,13 @@ +'use strict'; + +var origSymbol = global.Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; diff --git a/deps/npm/node_modules/has-symbols/package.json b/deps/npm/node_modules/has-symbols/package.json new file mode 100644 index 00000000000000..0999461218e0d0 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/package.json @@ -0,0 +1,82 @@ +{ + "name": "has-symbols", + "version": "1.0.0", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublish": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "npm run --silent test:stock && npm run --silent test:staging && npm run --silent test:shams", + "test:stock": "node test", + "test:staging": "node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "node test/shams/get-own-property-symbols.js", + "lint": "eslint *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/has-symbols.git" + }, + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "dependencies": {}, + "devDependencies": { + "tape": "^4.6.0", + "nsp": "^2.6.1", + "safe-publish-latest": "^1.0.1", + "eslint": "^3.5.0", + "@ljharb/eslint-config": "^8.0.0", + "get-own-property-symbols": "^0.9.2", + "core-js": "^2.4.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz" +,"_integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" +,"_from": "has-symbols@1.0.0" +} \ No newline at end of file diff --git a/deps/npm/node_modules/has-symbols/shams.js b/deps/npm/node_modules/has-symbols/shams.js new file mode 100644 index 00000000000000..f6c1ff4a236371 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/shams.js @@ -0,0 +1,42 @@ +'use strict'; + +/* eslint complexity: [2, 17], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/deps/npm/node_modules/has-symbols/test/index.js b/deps/npm/node_modules/has-symbols/test/index.js new file mode 100644 index 00000000000000..352129ca356c8c --- /dev/null +++ b/deps/npm/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); diff --git a/deps/npm/node_modules/has-symbols/test/shams/core-js.js b/deps/npm/node_modules/has-symbols/test/shams/core-js.js new file mode 100644 index 00000000000000..df5365c23ed741 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/deps/npm/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/deps/npm/node_modules/has-symbols/test/shams/get-own-property-symbols.js new file mode 100644 index 00000000000000..9191b248baa14b --- /dev/null +++ b/deps/npm/node_modules/has-symbols/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/deps/npm/node_modules/has-symbols/test/tests.js b/deps/npm/node_modules/has-symbols/test/tests.js new file mode 100644 index 00000000000000..93ff0eae90f039 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/test/tests.js @@ -0,0 +1,54 @@ +'use strict'; + +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + + if (typeof Symbol !== 'function') { return false }; + + t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); + + /* + t.equal( + Symbol.prototype.toString.call(Symbol('foo')), + Symbol.prototype.toString.call(Symbol('foo')), + 'two symbols with the same description stringify the same' + ); + */ + + var foo = Symbol('foo'); + + /* + t.notEqual( + String(foo), + String(Symbol('bar')), + 'two symbols with different descriptions do not stringify the same' + ); + */ + + t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); + // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); + + t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + t.notEqual(typeof sym, 'string', 'Symbol is not a string'); + t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } + + t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); + t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); + t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { + configurable: true, + enumerable: true, + value: 42, + writable: true + }, 'property descriptor is correct'); +}; diff --git a/deps/npm/node_modules/has/LICENSE-MIT b/deps/npm/node_modules/has/LICENSE-MIT new file mode 100644 index 00000000000000..ae7014d385df3d --- /dev/null +++ b/deps/npm/node_modules/has/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Thiago de Arruda + +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. diff --git a/deps/npm/node_modules/has/README.md b/deps/npm/node_modules/has/README.md new file mode 100644 index 00000000000000..635e3a4baab00b --- /dev/null +++ b/deps/npm/node_modules/has/README.md @@ -0,0 +1,18 @@ +# has + +> Object.prototype.hasOwnProperty.call shortcut + +## Installation + +```sh +npm install --save has +``` + +## Usage + +```js +var has = require('has'); + +has({}, 'hasOwnProperty'); // false +has(Object.prototype, 'hasOwnProperty'); // true +``` diff --git a/deps/npm/node_modules/has/package.json b/deps/npm/node_modules/has/package.json new file mode 100644 index 00000000000000..86203ce1659660 --- /dev/null +++ b/deps/npm/node_modules/has/package.json @@ -0,0 +1,52 @@ +{ + "name": "has", + "description": "Object.prototype.hasOwnProperty.call shortcut", + "version": "1.0.3", + "homepage": "https://github.com/tarruda/has", + "author": { + "name": "Thiago de Arruda", + "email": "tpadilha84@gmail.com" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/tarruda/has.git" + }, + "bugs": { + "url": "https://github.com/tarruda/has/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" + } + ], + "main": "./src", + "dependencies": { + "function-bind": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "eslint": "^4.19.1", + "tape": "^4.9.0" + }, + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "tape test" + } + +,"_resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz" +,"_integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==" +,"_from": "has@1.0.3" +} \ No newline at end of file diff --git a/deps/npm/node_modules/has/src/index.js b/deps/npm/node_modules/has/src/index.js new file mode 100644 index 00000000000000..dd92dd9094edb0 --- /dev/null +++ b/deps/npm/node_modules/has/src/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/deps/npm/node_modules/has/test/index.js b/deps/npm/node_modules/has/test/index.js new file mode 100644 index 00000000000000..43d480b2c2e763 --- /dev/null +++ b/deps/npm/node_modules/has/test/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var test = require('tape'); +var has = require('../'); + +test('has', function (t) { + t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); + t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); + t.end(); +}); diff --git a/deps/npm/node_modules/is-callable/.editorconfig b/deps/npm/node_modules/is-callable/.editorconfig new file mode 100644 index 00000000000000..bc228f8269443b --- /dev/null +++ b/deps/npm/node_modules/is-callable/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/deps/npm/node_modules/is-callable/.eslintrc b/deps/npm/node_modules/is-callable/.eslintrc new file mode 100644 index 00000000000000..db619b50ce084d --- /dev/null +++ b/deps/npm/node_modules/is-callable/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": 0, + "max-statements": [2, 12], + "max-statements-per-line": [2, { "max": 2 }] + } +} diff --git a/deps/npm/node_modules/is-callable/.istanbul.yml b/deps/npm/node_modules/is-callable/.istanbul.yml new file mode 100644 index 00000000000000..9affe0bc3e67ab --- /dev/null +++ b/deps/npm/node_modules/is-callable/.istanbul.yml @@ -0,0 +1,47 @@ +verbose: false +instrumentation: + root: . + extensions: + - .js + - .jsx + default-excludes: true + excludes: [] + variable: __coverage__ + compact: true + preserve-comments: false + complete-copy: false + save-baseline: false + baseline-file: ./coverage/coverage-baseline.raw.json + include-all-sources: false + include-pid: false + es-modules: false + auto-wrap: false +reporting: + print: summary + reports: + - html + dir: ./coverage + summarizer: pkg + report-config: {} + watermarks: + statements: [50, 80] + functions: [50, 80] + branches: [50, 80] + lines: [50, 80] +hooks: + hook-run-in-context: false + post-require-hook: null + handle-sigint: false +check: + global: + statements: 100 + lines: 100 + branches: 100 + functions: 100 + excludes: [] + each: + statements: 100 + lines: 100 + branches: 100 + functions: 100 + excludes: [] diff --git a/deps/npm/node_modules/is-callable/.jscs.json b/deps/npm/node_modules/is-callable/.jscs.json new file mode 100644 index 00000000000000..759bd65c52915d --- /dev/null +++ b/deps/npm/node_modules/is-callable/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/is-callable/.travis.yml b/deps/npm/node_modules/is-callable/.travis.yml new file mode 100644 index 00000000000000..767256c8dd4843 --- /dev/null +++ b/deps/npm/node_modules/is-callable/.travis.yml @@ -0,0 +1,225 @@ +language: node_js +os: + - linux +node_js: + - "10.4" + - "9.11" + - "8.11" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/deps/npm/node_modules/is-callable/CHANGELOG.md b/deps/npm/node_modules/is-callable/CHANGELOG.md new file mode 100644 index 00000000000000..58286a0535b74d --- /dev/null +++ b/deps/npm/node_modules/is-callable/CHANGELOG.md @@ -0,0 +1,56 @@ +1.1.4 / 2018-07-02 +================= + * [Fix] improve `class` and arrow function detection (#30, #31) + * [Tests] on all latest node minors; improve matrix + * [Dev Deps] update all dev deps + +1.1.3 / 2016-02-27 +================= + * [Fix] ensure “class “ doesn’t screw up “class” detection + * [Tests] up to `node` `v5.7`, `v4.3` + * [Dev Deps] update to `eslint` v2, `@ljharb/eslint-config`, `jscs` + +1.1.2 / 2016-01-15 +================= + * [Fix] Make sure comments don’t screw up “class” detection (#4) + * [Tests] up to `node` `v5.3` + * [Tests] Add `parallelshell`, run both `--es-staging` and stock tests at once + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Refactor] convert `isNonES6ClassFn` into `isES6ClassFn` + +1.1.1 / 2015-11-30 +================= + * [Fix] do not throw when a non-function has a function in its [[Prototype]] (#2) + * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `jscs`, `nsp`, `semver` + * [Tests] up to `node` `v5.1` + * [Tests] no longer allow node 0.8 to fail. + * [Tests] fix npm upgrades in older nodes + +1.1.0 / 2015-10-02 +================= + * [Fix] Some browsers report TypedArray constructors as `typeof object` + * [New] return false for "class" constructors, when possible. + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + * [Dev Deps] update `eslint`, `editorconfig-tools`, `nsp`, `tape`, `semver`, `jscs`, `covert`, `make-arrow-function` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.4 / 2015-01-30 +================= + * If @@toStringTag is not present, use the old-school Object#toString test. + +1.0.3 / 2015-01-29 +================= + * Add tests to ensure arrow functions are callable. + * Refactor to aid optimization of non-try/catch code. + +1.0.2 / 2015-01-29 +================= + * Fix broken package.json + +1.0.1 / 2015-01-29 +================= + * Add early exit for typeof not "function" + +1.0.0 / 2015-01-29 +================= + * Initial release. diff --git a/deps/npm/node_modules/is-callable/LICENSE b/deps/npm/node_modules/is-callable/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/is-callable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. diff --git a/deps/npm/node_modules/is-callable/Makefile b/deps/npm/node_modules/is-callable/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/is-callable/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/is-callable/README.md b/deps/npm/node_modules/is-callable/README.md new file mode 100644 index 00000000000000..0cb65879972bfb --- /dev/null +++ b/deps/npm/node_modules/is-callable/README.md @@ -0,0 +1,59 @@ +# is-callable [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +[![browser support][9]][10] + +Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag. + +## Example + +```js +var isCallable = require('is-callable'); +var assert = require('assert'); + +assert.notOk(isCallable(undefined)); +assert.notOk(isCallable(null)); +assert.notOk(isCallable(false)); +assert.notOk(isCallable(true)); +assert.notOk(isCallable([])); +assert.notOk(isCallable({})); +assert.notOk(isCallable(/a/g)); +assert.notOk(isCallable(new RegExp('a', 'g'))); +assert.notOk(isCallable(new Date())); +assert.notOk(isCallable(42)); +assert.notOk(isCallable(NaN)); +assert.notOk(isCallable(Infinity)); +assert.notOk(isCallable(new Number(42))); +assert.notOk(isCallable('foo')); +assert.notOk(isCallable(Object('foo'))); + +assert.ok(isCallable(function () {})); +assert.ok(isCallable(function* () {})); +assert.ok(isCallable(x => x * x)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-callable +[2]: http://versionbadg.es/ljharb/is-callable.svg +[3]: https://travis-ci.org/ljharb/is-callable.svg +[4]: https://travis-ci.org/ljharb/is-callable +[5]: https://david-dm.org/ljharb/is-callable.svg +[6]: https://david-dm.org/ljharb/is-callable +[7]: https://david-dm.org/ljharb/is-callable/dev-status.svg +[8]: https://david-dm.org/ljharb/is-callable#info=devDependencies +[9]: https://ci.testling.com/ljharb/is-callable.png +[10]: https://ci.testling.com/ljharb/is-callable +[11]: https://nodei.co/npm/is-callable.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/is-callable.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/is-callable.svg +[downloads-url]: http://npm-stat.com/charts.html?package=is-callable diff --git a/deps/npm/node_modules/is-callable/index.js b/deps/npm/node_modules/is-callable/index.js new file mode 100644 index 00000000000000..d9820b51fd4ad5 --- /dev/null +++ b/deps/npm/node_modules/is-callable/index.js @@ -0,0 +1,37 @@ +'use strict'; + +var fnToStr = Function.prototype.toString; + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; +}; diff --git a/deps/npm/node_modules/is-callable/package.json b/deps/npm/node_modules/is-callable/package.json new file mode 100644 index 00000000000000..50531dfc901657 --- /dev/null +++ b/deps/npm/node_modules/is-callable/package.json @@ -0,0 +1,98 @@ +{ + "name": "is-callable", + "version": "1.1.4", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "npm run --silent test:stock && npm run --silent test:staging", + "test:stock": "node test.js", + "test:staging": "node --es-staging test.js", + "coverage": "npm run --silent istanbul", + "covert": "covert test.js", + "covert:quiet": "covert test.js --quiet", + "istanbul": "npm run --silent istanbul:clean && npm run --silent istanbul:std && npm run --silent istanbul:harmony && npm run --silent istanbul:merge && istanbul check", + "istanbul:clean": "rimraf coverage coverage-std coverage-harmony", + "istanbul:merge": "istanbul-merge --out coverage/coverage.raw.json coverage-harmony/coverage.raw.json coverage-std/coverage.raw.json && istanbul report html", + "istanbul:harmony": "node --harmony ./node_modules/istanbul/lib/cli.js cover test.js --dir coverage-harmony", + "istanbul:std": "istanbul cover test.js --report html --dir coverage-std", + "prelint": "editorconfig-tools check *", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js", + "eslint": "eslint *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-callable.git" + }, + "keywords": [ + "Function", + "function", + "callable", + "generator", + "generator function", + "arrow", + "arrow function", + "ES6", + "toStringTag", + "@@toStringTag" + ], + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "editorconfig-tools": "^0.1.1", + "eslint": "^4.19.1", + "foreach": "^2.0.5", + "istanbul": "1.1.0-alpha.1", + "istanbul-merge": "^1.1.1", + "jscs": "^3.0.7", + "make-arrow-function": "^1.1.0", + "make-generator-function": "^1.1.0", + "nsp": "^3.2.1", + "rimraf": "^2.6.2", + "semver": "^5.5.0", + "tape": "^4.9.1" + }, + "testling": { + "files": "test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz" +,"_integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" +,"_from": "is-callable@1.1.4" +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-callable/test.js b/deps/npm/node_modules/is-callable/test.js new file mode 100644 index 00000000000000..f5be51d82e212d --- /dev/null +++ b/deps/npm/node_modules/is-callable/test.js @@ -0,0 +1,158 @@ +'use strict'; + +/* eslint no-magic-numbers: 1 */ + +var test = require('tape'); +var isCallable = require('./'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; +var genFn = require('make-generator-function'); +var arrowFn = require('make-arrow-function')(); +var weirdlyCommentedArrowFn; +var asyncFn; +var asyncArrowFn; +try { + /* eslint no-new-func: 0 */ + weirdlyCommentedArrowFn = Function('return cl/*/**/=>/**/ass - 1;')(); + asyncFn = Function('return async function foo() {};')(); + asyncArrowFn = Function('return async () => {};')(); +} catch (e) { /**/ } +var forEach = require('foreach'); + +var noop = function () {}; +var classFake = function classFake() { }; // eslint-disable-line func-name-matching +var returnClass = function () { return ' class '; }; +var return3 = function () { return 3; }; +/* for coverage */ +noop(); +classFake(); +returnClass(); +return3(); +/* end for coverage */ + +var invokeFunction = function invokeFunctionString(str) { + var result; + try { + /* eslint-disable no-new-func */ + var fn = Function(str); + /* eslint-enable no-new-func */ + result = fn(); + } catch (e) {} + return result; +}; + +var classConstructor = invokeFunction('"use strict"; return class Foo {}'); + +var commentedClass = invokeFunction('"use strict"; return class/*kkk*/\n//blah\n Bar\n//blah\n {}'); +var commentedClassOneLine = invokeFunction('"use strict"; return class/**/A{}'); +var classAnonymous = invokeFunction('"use strict"; return class{}'); +var classAnonymousCommentedOneLine = invokeFunction('"use strict"; return class/*/*/{}'); + +test('not callables', function (t) { + t.test('non-number/string primitives', function (st) { + st.notOk(isCallable(), 'undefined is not callable'); + st.notOk(isCallable(null), 'null is not callable'); + st.notOk(isCallable(false), 'false is not callable'); + st.notOk(isCallable(true), 'true is not callable'); + st.end(); + }); + + t.notOk(isCallable([]), 'array is not callable'); + t.notOk(isCallable({}), 'object is not callable'); + t.notOk(isCallable(/a/g), 'regex literal is not callable'); + t.notOk(isCallable(new RegExp('a', 'g')), 'regex object is not callable'); + t.notOk(isCallable(new Date()), 'new Date() is not callable'); + + t.test('numbers', function (st) { + st.notOk(isCallable(42), 'number is not callable'); + st.notOk(isCallable(Object(42)), 'number object is not callable'); + st.notOk(isCallable(NaN), 'NaN is not callable'); + st.notOk(isCallable(Infinity), 'Infinity is not callable'); + st.end(); + }); + + t.test('strings', function (st) { + st.notOk(isCallable('foo'), 'string primitive is not callable'); + st.notOk(isCallable(Object('foo')), 'string object is not callable'); + st.end(); + }); + + t.test('non-function with function in its [[Prototype]] chain', function (st) { + var Foo = function Bar() {}; + Foo.prototype = noop; + st.equal(true, isCallable(Foo), 'sanity check: Foo is callable'); + st.equal(false, isCallable(new Foo()), 'instance of Foo is not callable'); + st.end(); + }); + + t.end(); +}); + +test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { + var fakeFunction = { + toString: function () { return String(return3); }, + valueOf: return3 + }; + fakeFunction[Symbol.toStringTag] = 'Function'; + t.equal(String(fakeFunction), String(return3)); + t.equal(Number(fakeFunction), return3()); + t.notOk(isCallable(fakeFunction), 'fake Function with @@toStringTag "Function" is not callable'); + t.end(); +}); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array' +]; + +test('Functions', function (t) { + t.ok(isCallable(noop), 'function is callable'); + t.ok(isCallable(classFake), 'function with name containing "class" is callable'); + t.ok(isCallable(returnClass), 'function with string " class " is callable'); + t.ok(isCallable(isCallable), 'isCallable is callable'); + t.end(); +}); + +test('Typed Arrays', function (st) { + forEach(typedArrayNames, function (typedArray) { + /* istanbul ignore if : covered in node 0.6 */ + if (typeof global[typedArray] === 'undefined') { + st.comment('# SKIP typed array "' + typedArray + '" not supported'); + } else { + st.ok(isCallable(global[typedArray]), typedArray + ' is callable'); + } + }); + st.end(); +}); + +test('Generators', { skip: !genFn }, function (t) { + t.ok(isCallable(genFn), 'generator function is callable'); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.ok(isCallable(arrowFn), 'arrow function is callable'); + t.ok(isCallable(weirdlyCommentedArrowFn), 'weirdly commented arrow functions are callable'); + t.end(); +}); + +test('"Class" constructors', { skip: !classConstructor || !commentedClass || !commentedClassOneLine || !classAnonymous }, function (t) { + t.notOk(isCallable(classConstructor), 'class constructors are not callable'); + t.notOk(isCallable(commentedClass), 'class constructors with comments in the signature are not callable'); + t.notOk(isCallable(commentedClassOneLine), 'one-line class constructors with comments in the signature are not callable'); + t.notOk(isCallable(classAnonymous), 'anonymous class constructors are not callable'); + t.notOk(isCallable(classAnonymousCommentedOneLine), 'anonymous one-line class constructors with comments in the signature are not callable'); + t.end(); +}); + +test('`async function`s', { skip: !asyncFn }, function (t) { + t.ok(isCallable(asyncFn), '`async function`s are callable'); + t.ok(isCallable(asyncArrowFn), '`async` arrow functions are callable'); + t.end(); +}); diff --git a/deps/npm/node_modules/is-date-object/.eslintrc b/deps/npm/node_modules/is-date-object/.eslintrc new file mode 100644 index 00000000000000..1228f975c99738 --- /dev/null +++ b/deps/npm/node_modules/is-date-object/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements": [2, 12] + } +} diff --git a/deps/npm/node_modules/is-date-object/.jscs.json b/deps/npm/node_modules/is-date-object/.jscs.json new file mode 100644 index 00000000000000..9f49765bf6aeff --- /dev/null +++ b/deps/npm/node_modules/is-date-object/.jscs.json @@ -0,0 +1,121 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": "allButReserved", + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": true, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "validateOrderInObjectKeys": "asc-insensitive" +} diff --git a/deps/npm/node_modules/is-date-object/.npmignore b/deps/npm/node_modules/is-date-object/.npmignore new file mode 100644 index 00000000000000..59d842baa84c8b --- /dev/null +++ b/deps/npm/node_modules/is-date-object/.npmignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Commenting this out is preferred by some people, see +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Users Environment Variables +.lock-wscript diff --git a/deps/npm/node_modules/is-date-object/.travis.yml b/deps/npm/node_modules/is-date-object/.travis.yml new file mode 100644 index 00000000000000..4c29ed58ba7fba --- /dev/null +++ b/deps/npm/node_modules/is-date-object/.travis.yml @@ -0,0 +1,58 @@ +language: node_js +node_js: + - "4.1" + - "4.0" + - "iojs-v3.3" + - "iojs-v3.2" + - "iojs-v3.1" + - "iojs-v3.0" + - "iojs-v2.5" + - "iojs-v2.4" + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm' +sudo: false +matrix: + fast_finish: true + allow_failures: + - node_js: "4.0" + - node_js: "iojs-v3.2" + - node_js: "iojs-v3.1" + - node_js: "iojs-v3.0" + - node_js: "iojs-v2.4" + - node_js: "iojs-v2.3" + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.8" + - node_js: "0.6" + - node_js: "0.4" diff --git a/deps/npm/node_modules/is-date-object/CHANGELOG.md b/deps/npm/node_modules/is-date-object/CHANGELOG.md new file mode 100644 index 00000000000000..4a7eab61bb1b26 --- /dev/null +++ b/deps/npm/node_modules/is-date-object/CHANGELOG.md @@ -0,0 +1,10 @@ +1.0.1 / 2015-09-27 +================= + * [Fix] If `@@toStringTag` is not present, use the old-school `Object#toString` test + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Dev Deps] update `is`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape`, `jscs`, `nsp`, `covert` + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + +1.0.0 / 2015-01-28 +================= + * Initial release. diff --git a/deps/npm/node_modules/is-date-object/LICENSE b/deps/npm/node_modules/is-date-object/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/is-date-object/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. diff --git a/deps/npm/node_modules/is-date-object/Makefile b/deps/npm/node_modules/is-date-object/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/is-date-object/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/is-date-object/README.md b/deps/npm/node_modules/is-date-object/README.md new file mode 100644 index 00000000000000..55b0c59673e603 --- /dev/null +++ b/deps/npm/node_modules/is-date-object/README.md @@ -0,0 +1,53 @@ +# is-date-object [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +[![browser support][9]][10] + +Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isDate = require('is-date-object'); +var assert = require('assert'); + +assert.notOk(isDate(undefined)); +assert.notOk(isDate(null)); +assert.notOk(isDate(false)); +assert.notOk(isDate(true)); +assert.notOk(isDate(42)); +assert.notOk(isDate('foo')); +assert.notOk(isDate(function () {})); +assert.notOk(isDate([])); +assert.notOk(isDate({})); +assert.notOk(isDate(/a/g)); +assert.notOk(isDate(new RegExp('a', 'g'))); + +assert.ok(isDate(new Date())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-date-object +[2]: http://versionbadg.es/ljharb/is-date-object.svg +[3]: https://travis-ci.org/ljharb/is-date-object.svg +[4]: https://travis-ci.org/ljharb/is-date-object +[5]: https://david-dm.org/ljharb/is-date-object.svg +[6]: https://david-dm.org/ljharb/is-date-object +[7]: https://david-dm.org/ljharb/is-date-object/dev-status.svg +[8]: https://david-dm.org/ljharb/is-date-object#info=devDependencies +[9]: https://ci.testling.com/ljharb/is-date-object.png +[10]: https://ci.testling.com/ljharb/is-date-object +[11]: https://nodei.co/npm/is-date-object.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/is-date-object.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/is-date-object.svg +[downloads-url]: http://npm-stat.com/charts.html?package=is-date-object diff --git a/deps/npm/node_modules/is-date-object/index.js b/deps/npm/node_modules/is-date-object/index.js new file mode 100644 index 00000000000000..fe0d7ecd7c145c --- /dev/null +++ b/deps/npm/node_modules/is-date-object/index.js @@ -0,0 +1,20 @@ +'use strict'; + +var getDay = Date.prototype.getDay; +var tryDateObject = function tryDateObject(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } +}; + +var toStr = Object.prototype.toString; +var dateClass = '[object Date]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isDateObject(value) { + if (typeof value !== 'object' || value === null) { return false; } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; +}; diff --git a/deps/npm/node_modules/is-date-object/package.json b/deps/npm/node_modules/is-date-object/package.json new file mode 100644 index 00000000000000..20c0b95086f586 --- /dev/null +++ b/deps/npm/node_modules/is-date-object/package.json @@ -0,0 +1,66 @@ +{ + "name": "is-date-object", + "version": "1.0.1", + "author": "Jordan Harband", + "description": "Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "npm run lint && node --harmony --es-staging test.js && npm run security", + "coverage": "covert test.js", + "coverage-quiet": "covert test.js --quiet", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs test.js *.js", + "eslint": "eslint test.js *.js", + "security": "nsp package" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-date-object.git" + }, + "keywords": [ + "Date", + "ES6", + "toStringTag", + "@@toStringTag", + "Date object" + ], + "dependencies": {}, + "devDependencies": { + "foreach": "^2.0.5", + "is": "^3.1.0", + "tape": "^4.2.0", + "indexof": "^0.0.1", + "covert": "^1.1.0", + "jscs": "^2.1.1", + "nsp": "^1.1.0", + "eslint": "^1.5.1", + "@ljharb/eslint-config": "^1.2.0", + "semver": "^5.0.3" + }, + "testling": { + "files": "test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz" +,"_integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" +,"_from": "is-date-object@1.0.1" +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-date-object/test.js b/deps/npm/node_modules/is-date-object/test.js new file mode 100644 index 00000000000000..29f0917bc4a33c --- /dev/null +++ b/deps/npm/node_modules/is-date-object/test.js @@ -0,0 +1,33 @@ +'use strict'; + +var test = require('tape'); +var isDate = require('./'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; + +test('not Dates', function (t) { + t.notOk(isDate(), 'undefined is not Date'); + t.notOk(isDate(null), 'null is not Date'); + t.notOk(isDate(false), 'false is not Date'); + t.notOk(isDate(true), 'true is not Date'); + t.notOk(isDate(42), 'number is not Date'); + t.notOk(isDate('foo'), 'string is not Date'); + t.notOk(isDate([]), 'array is not Date'); + t.notOk(isDate({}), 'object is not Date'); + t.notOk(isDate(function () {}), 'function is not Date'); + t.notOk(isDate(/a/g), 'regex literal is not Date'); + t.notOk(isDate(new RegExp('a', 'g')), 'regex object is not Date'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { + var realDate = new Date(); + var fakeDate = { toString: function () { return String(realDate); }, valueOf: function () { return realDate.getTime(); } }; + fakeDate[Symbol.toStringTag] = 'Date'; + t.notOk(isDate(fakeDate), 'fake Date with @@toStringTag "Date" is not Date'); + t.end(); +}); + +test('Dates', function (t) { + t.ok(isDate(new Date()), 'new Date() is Date'); + t.end(); +}); diff --git a/deps/npm/node_modules/is-regex/.eslintrc b/deps/npm/node_modules/is-regex/.eslintrc new file mode 100644 index 00000000000000..fbb8e9de537b9e --- /dev/null +++ b/deps/npm/node_modules/is-regex/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [1] + } +} diff --git a/deps/npm/node_modules/is-regex/.jscs.json b/deps/npm/node_modules/is-regex/.jscs.json new file mode 100644 index 00000000000000..7296cbab09bdf5 --- /dev/null +++ b/deps/npm/node_modules/is-regex/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/is-regex/.npmignore b/deps/npm/node_modules/is-regex/.npmignore new file mode 100644 index 00000000000000..a72b52ebe89779 --- /dev/null +++ b/deps/npm/node_modules/is-regex/.npmignore @@ -0,0 +1,15 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log +node_modules diff --git a/deps/npm/node_modules/is-regex/.travis.yml b/deps/npm/node_modules/is-regex/.travis.yml new file mode 100644 index 00000000000000..41137a89a59196 --- /dev/null +++ b/deps/npm/node_modules/is-regex/.travis.yml @@ -0,0 +1,165 @@ +language: node_js +os: + - linux +node_js: + - "7.5" + - "6.9" + - "5.12" + - "4.7" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "node" + env: POSTTEST=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7" + env: TEST=true + os: osx + - node_js: "6" + env: TEST=true + os: osx + - node_js: "5" + env: TEST=true + os: osx + - node_js: "4" + env: TEST=true + os: osx + - node_js: "iojs" + env: TEST=true + os: osx + - node_js: "0.12" + env: TEST=true + os: osx + - node_js: "0.10" + env: TEST=true + os: osx + - node_js: "0.8" + env: TEST=true + os: osx + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/deps/npm/node_modules/is-regex/CHANGELOG.md b/deps/npm/node_modules/is-regex/CHANGELOG.md new file mode 100644 index 00000000000000..6d73800022da37 --- /dev/null +++ b/deps/npm/node_modules/is-regex/CHANGELOG.md @@ -0,0 +1,27 @@ +1.0.4 / 2016-02-18 +================= + * [Fix] ensure that `lastIndex` is not mutated (#3) + * [Refactor] when try/catch is needed, bail early if the value lacks an own `lastIndex` data property + * [Refactor] use an early return instead of a ternary + * [Refactor] bail earlier when the value is falsy + * Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Dev Deps] update `tape`, `jscs`, `editorconfig-tools`, `eslint`, `semver`, `replace`, `nsp`, `covert`, `@ljharb/eslint-config` + * [Tests] on all the node and io.js versions; improve test matri + * [Tests] Fix tests for faked @@toStringTag + +1.0.3 / 2015-01-29 +================= + * If @@toStringTag is not present, use the old-school Object#toString test. + +1.0.2 / 2015-01-29 +================= + * Improve optimization by separating the try/catch, and bailing out early when not typeof "object". + +1.0.1 / 2015-01-28 +================= + * Update `jscs`, `tape`, `covert` + * Use RegExp#exec to test if something is a regex, which works even with ES6 @@toStringTag. + +1.0.0 / 2014-05-19 +================= + * Initial release. diff --git a/deps/npm/node_modules/is-regex/LICENSE b/deps/npm/node_modules/is-regex/LICENSE new file mode 100644 index 00000000000000..47b7b5078fce38 --- /dev/null +++ b/deps/npm/node_modules/is-regex/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +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. diff --git a/deps/npm/node_modules/is-regex/Makefile b/deps/npm/node_modules/is-regex/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/is-regex/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/is-regex/README.md b/deps/npm/node_modules/is-regex/README.md new file mode 100644 index 00000000000000..dab42912bbdfb7 --- /dev/null +++ b/deps/npm/node_modules/is-regex/README.md @@ -0,0 +1,53 @@ +#is-regex [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +[![browser support][9]][10] + +Is this value a JS regex? +This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isRegex = require('is-regex'); +var assert = require('assert'); + +assert.notOk(isRegex(undefined)); +assert.notOk(isRegex(null)); +assert.notOk(isRegex(false)); +assert.notOk(isRegex(true)); +assert.notOk(isRegex(42)); +assert.notOk(isRegex('foo')); +assert.notOk(isRegex(function () {})); +assert.notOk(isRegex([])); +assert.notOk(isRegex({})); + +assert.ok(isRegex(/a/g)); +assert.ok(isRegex(new RegExp('a', 'g'))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-regex +[2]: http://versionbadg.es/ljharb/is-regex.svg +[3]: https://travis-ci.org/ljharb/is-regex.svg +[4]: https://travis-ci.org/ljharb/is-regex +[5]: https://david-dm.org/ljharb/is-regex.svg +[6]: https://david-dm.org/ljharb/is-regex +[7]: https://david-dm.org/ljharb/is-regex/dev-status.svg +[8]: https://david-dm.org/ljharb/is-regex#info=devDependencies +[9]: https://ci.testling.com/ljharb/is-regex.png +[10]: https://ci.testling.com/ljharb/is-regex +[11]: https://nodei.co/npm/is-regex.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/is-regex.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/is-regex.svg +[downloads-url]: http://npm-stat.com/charts.html?package=is-regex diff --git a/deps/npm/node_modules/is-regex/index.js b/deps/npm/node_modules/is-regex/index.js new file mode 100644 index 00000000000000..be6513390f7d38 --- /dev/null +++ b/deps/npm/node_modules/is-regex/index.js @@ -0,0 +1,39 @@ +'use strict'; + +var has = require('has'); +var regexExec = RegExp.prototype.exec; +var gOPD = Object.getOwnPropertyDescriptor; + +var tryRegexExecCall = function tryRegexExec(value) { + try { + var lastIndex = value.lastIndex; + value.lastIndex = 0; + + regexExec.call(value); + return true; + } catch (e) { + return false; + } finally { + value.lastIndex = lastIndex; + } +}; +var toStr = Object.prototype.toString; +var regexClass = '[object RegExp]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isRegex(value) { + if (!value || typeof value !== 'object') { + return false; + } + if (!hasToStringTag) { + return toStr.call(value) === regexClass; + } + + var descriptor = gOPD(value, 'lastIndex'); + var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); + if (!hasLastIndexDataProperty) { + return false; + } + + return tryRegexExecCall(value); +}; diff --git a/deps/npm/node_modules/is-regex/package.json b/deps/npm/node_modules/is-regex/package.json new file mode 100644 index 00000000000000..697123805ac3e2 --- /dev/null +++ b/deps/npm/node_modules/is-regex/package.json @@ -0,0 +1,77 @@ +{ + "name": "is-regex", + "version": "1.0.4", + "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", + "author": "Jordan Harband", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node --harmony --es-staging test.js", + "posttest": "npm run security", + "coverage": "covert test.js", + "coverage-quiet": "covert test.js --quiet", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js", + "eslint": "eslint test.js *.js", + "eccheck": "editorconfig-tools check *.js **/*.js > /dev/null", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-regex.git" + }, + "bugs": { + "url": "https://github.com/ljharb/is-regex/issues" + }, + "homepage": "https://github.com/ljharb/is-regex", + "keywords": [ + "regex", + "regexp", + "is", + "regular expression", + "regular", + "expression" + ], + "dependencies": { + "has": "^1.0.1" + }, + "devDependencies": { + "tape": "^4.6.3", + "covert": "^1.1.0", + "jscs": "^3.0.7", + "editorconfig-tools": "^0.1.1", + "nsp": "^2.6.2", + "eslint": "^3.15.0", + "@ljharb/eslint-config": "^11.0.0", + "semver": "^5.3.0", + "replace": "^0.3.0" + }, + "testling": { + "files": "test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..12.0", + "opera/15.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz" +,"_integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=" +,"_from": "is-regex@1.0.4" +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-regex/test.js b/deps/npm/node_modules/is-regex/test.js new file mode 100644 index 00000000000000..8d390038dae33d --- /dev/null +++ b/deps/npm/node_modules/is-regex/test.js @@ -0,0 +1,58 @@ +'use strict'; + +var test = require('tape'); +var isRegex = require('./'); +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +test('not regexes', function (t) { + t.notOk(isRegex(), 'undefined is not regex'); + t.notOk(isRegex(null), 'null is not regex'); + t.notOk(isRegex(false), 'false is not regex'); + t.notOk(isRegex(true), 'true is not regex'); + t.notOk(isRegex(42), 'number is not regex'); + t.notOk(isRegex('foo'), 'string is not regex'); + t.notOk(isRegex([]), 'array is not regex'); + t.notOk(isRegex({}), 'object is not regex'); + t.notOk(isRegex(function () {}), 'function is not regex'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var regex = /a/g; + var fakeRegex = { + toString: function () { return String(regex); }, + valueOf: function () { return regex; } + }; + fakeRegex[Symbol.toStringTag] = 'RegExp'; + t.notOk(isRegex(fakeRegex), 'fake RegExp with @@toStringTag "RegExp" is not regex'); + t.end(); +}); + +test('regexes', function (t) { + t.ok(isRegex(/a/g), 'regex literal is regex'); + t.ok(isRegex(new RegExp('a', 'g')), 'regex object is regex'); + t.end(); +}); + +test('does not mutate regexes', function (t) { + t.test('lastIndex is a marker object', function (st) { + var regex = /a/; + var marker = {}; + regex.lastIndex = marker; + st.equal(regex.lastIndex, marker, 'lastIndex is the marker object'); + st.ok(isRegex(regex), 'is regex'); + st.equal(regex.lastIndex, marker, 'lastIndex is the marker object after isRegex'); + st.end(); + }); + + t.test('lastIndex is nonzero', function (st) { + var regex = /a/; + regex.lastIndex = 3; + st.equal(regex.lastIndex, 3, 'lastIndex is 3'); + st.ok(isRegex(regex), 'is regex'); + st.equal(regex.lastIndex, 3, 'lastIndex is 3 after isRegex'); + st.end(); + }); + + t.end(); +}); diff --git a/deps/npm/node_modules/is-symbol/.editorconfig b/deps/npm/node_modules/is-symbol/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/is-symbol/.eslintrc b/deps/npm/node_modules/is-symbol/.eslintrc new file mode 100644 index 00000000000000..5f511fd05f5435 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements": [2, 14] + } +} diff --git a/deps/npm/node_modules/is-symbol/.jscs.json b/deps/npm/node_modules/is-symbol/.jscs.json new file mode 100644 index 00000000000000..759bd65c52915d --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/is-symbol/.nvmrc b/deps/npm/node_modules/is-symbol/.nvmrc new file mode 100644 index 00000000000000..64f5a0a6813a4f --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.nvmrc @@ -0,0 +1 @@ +node diff --git a/deps/npm/node_modules/is-symbol/.travis.yml b/deps/npm/node_modules/is-symbol/.travis.yml new file mode 100644 index 00000000000000..c671d5ea89c498 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.travis.yml @@ -0,0 +1,241 @@ +language: node_js +os: + - linux +node_js: + - "10.11" + - "9.11" + - "8.12" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/deps/npm/node_modules/is-symbol/CHANGELOG.md b/deps/npm/node_modules/is-symbol/CHANGELOG.md new file mode 100644 index 00000000000000..a7b8baf8db733f --- /dev/null +++ b/deps/npm/node_modules/is-symbol/CHANGELOG.md @@ -0,0 +1,12 @@ +1.0.2 / 2018-09-20 +================= + * [Refactor] use `has-symbols` and `object-inspect` + * [Tests] test on all the node minor versions + +1.0.1 / 2015-01-26 +================= + * Corrected description + +1.0.0 / 2015-01-24 +================= + * Initial release diff --git a/deps/npm/node_modules/is-symbol/LICENSE b/deps/npm/node_modules/is-symbol/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/is-symbol/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. diff --git a/deps/npm/node_modules/is-symbol/Makefile b/deps/npm/node_modules/is-symbol/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/is-symbol/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/is-symbol/README.md b/deps/npm/node_modules/is-symbol/README.md new file mode 100644 index 00000000000000..8544c8c0937c1a --- /dev/null +++ b/deps/npm/node_modules/is-symbol/README.md @@ -0,0 +1,46 @@ +#is-symbol [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +[![browser support][9]][10] + +Is this an ES6 Symbol value? + +## Example + +```js +var isSymbol = require('is-symbol'); +assert(!isSymbol(function () {})); +assert(!isSymbol(null)); +assert(!isSymbol(function* () { yield 42; return Infinity; }); + +assert(isSymbol(Symbol.iterator)); +assert(isSymbol(Symbol('foo'))); +assert(isSymbol(Symbol.for('foo'))); +assert(isSymbol(Object(Symbol('foo')))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-symbol +[2]: http://versionbadg.es/ljharb/is-symbol.svg +[3]: https://travis-ci.org/ljharb/is-symbol.svg +[4]: https://travis-ci.org/ljharb/is-symbol +[5]: https://david-dm.org/ljharb/is-symbol.svg +[6]: https://david-dm.org/ljharb/is-symbol +[7]: https://david-dm.org/ljharb/is-symbol/dev-status.svg +[8]: https://david-dm.org/ljharb/is-symbol#info=devDependencies +[9]: https://ci.testling.com/ljharb/is-symbol.png +[10]: https://ci.testling.com/ljharb/is-symbol +[11]: https://nodei.co/npm/is-symbol.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/is-symbol.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/is-symbol.svg +[downloads-url]: http://npm-stat.com/charts.html?package=is-symbol diff --git a/deps/npm/node_modules/is-symbol/index.js b/deps/npm/node_modules/is-symbol/index.js new file mode 100644 index 00000000000000..3d653e27f5fc63 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var toStr = Object.prototype.toString; +var hasSymbols = require('has-symbols')(); + +if (hasSymbols) { + var symToStr = Symbol.prototype.toString; + var symStringRegex = /^Symbol\(.*\)$/; + var isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== 'symbol') { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + + module.exports = function isSymbol(value) { + if (typeof value === 'symbol') { + return true; + } + if (toStr.call(value) !== '[object Symbol]') { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; +} else { + + module.exports = function isSymbol(value) { + // this environment does not support Symbols. + return false && value; + }; +} diff --git a/deps/npm/node_modules/is-symbol/package.json b/deps/npm/node_modules/is-symbol/package.json new file mode 100644 index 00000000000000..5e124e2194a73d --- /dev/null +++ b/deps/npm/node_modules/is-symbol/package.json @@ -0,0 +1,72 @@ +{ + "name": "is-symbol", + "version": "1.0.2", + "description": "Determine if a value is an ES6 Symbol or not.", + "main": "index.js", + "scripts": { + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "node --es-staging --harmony test", + "test": "npm run tests-only", + "posttest": "npm run security", + "coverage": "covert test", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js */*.js", + "eslint": "eslint *.js */*.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-symbol.git" + }, + "keywords": [ + "symbol", + "es6", + "is", + "Symbol" + ], + "author": "Jordan Harband", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/is-symbol/issues" + }, + "dependencies": { + "has-symbols": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.19.1", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "object-inspect": "^1.6.0", + "safe-publish-latest": "^1.1.2", + "semver": "^5.5.0", + "tape": "^4.9.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz" +,"_integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==" +,"_from": "is-symbol@1.0.2" +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-symbol/test/.eslintrc b/deps/npm/node_modules/is-symbol/test/.eslintrc new file mode 100644 index 00000000000000..1ac0d47b38544d --- /dev/null +++ b/deps/npm/node_modules/is-symbol/test/.eslintrc @@ -0,0 +1,7 @@ +{ + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-restricted-properties": 0, + "symbol-description": 0, + } +} diff --git a/deps/npm/node_modules/is-symbol/test/index.js b/deps/npm/node_modules/is-symbol/test/index.js new file mode 100644 index 00000000000000..46dfa439d9bfe8 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/test/index.js @@ -0,0 +1,91 @@ +'use strict'; + +var test = require('tape'); +var isSymbol = require('../index'); + +var forEach = function (arr, func) { + var i; + for (i = 0; i < arr.length; ++i) { + func(arr[i], i, arr); + } +}; + +var hasSymbols = require('has-symbols')(); +var inspect = require('object-inspect'); +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +test('non-symbol values', function (t) { + var nonSymbols = [ + true, + false, + Object(true), + Object(false), + null, + undefined, + {}, + [], + /a/g, + 'string', + 42, + new Date(), + function () {}, + NaN + ]; + t.plan(nonSymbols.length); + forEach(nonSymbols, function (nonSymbol) { + t.equal(false, isSymbol(nonSymbol), debug(nonSymbol, 'is not a symbol')); + }); + t.end(); +}); + +test('faked symbol values', function (t) { + t.test('real symbol valueOf', { skip: !hasSymbols }, function (st) { + var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; + st.equal(false, isSymbol(fakeSymbol), 'object with valueOf returning a symbol is not a symbol'); + st.end(); + }); + + t.test('faked @@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (st) { + var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; + fakeSymbol[Symbol.toStringTag] = 'Symbol'; + st.equal(false, isSymbol(fakeSymbol), 'object with fake Symbol @@toStringTag and valueOf returning a symbol is not a symbol'); + var notSoFakeSymbol = { valueOf: function () { return 42; } }; + notSoFakeSymbol[Symbol.toStringTag] = 'Symbol'; + st.equal(false, isSymbol(notSoFakeSymbol), 'object with fake Symbol @@toStringTag and valueOf not returning a symbol is not a symbol'); + st.end(); + }); + + var fakeSymbolString = { toString: function () { return 'Symbol(foo)'; } }; + t.equal(false, isSymbol(fakeSymbolString), 'object with toString returning Symbol(foo) is not a symbol'); + + t.end(); +}); + +test('Symbol support', { skip: !hasSymbols }, function (t) { + t.test('well-known Symbols', function (st) { + var isWellKnown = function filterer(name) { + return name !== 'for' && name !== 'keyFor' && !(name in filterer); + }; + var wellKnownSymbols = Object.getOwnPropertyNames(Symbol).filter(isWellKnown); + wellKnownSymbols.forEach(function (name) { + var sym = Symbol[name]; + st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); + }); + st.end(); + }); + + t.test('user-created symbols', function (st) { + var symbols = [ + Symbol(), + Symbol('foo'), + Symbol['for']('foo'), + Object(Symbol('object')) + ]; + symbols.forEach(function (sym) { + st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); + }); + st.end(); + }); + + t.end(); +}); diff --git a/deps/npm/node_modules/isstream/.jshintrc b/deps/npm/node_modules/isstream/.jshintrc new file mode 100644 index 00000000000000..c8ef3ca4097f82 --- /dev/null +++ b/deps/npm/node_modules/isstream/.jshintrc @@ -0,0 +1,59 @@ +{ + "predef": [ ] + , "bitwise": false + , "camelcase": false + , "curly": false + , "eqeqeq": false + , "forin": false + , "immed": false + , "latedef": false + , "noarg": true + , "noempty": true + , "nonew": true + , "plusplus": false + , "quotmark": true + , "regexp": false + , "undef": true + , "unused": true + , "strict": false + , "trailing": true + , "maxlen": 120 + , "asi": true + , "boss": true + , "debug": true + , "eqnull": true + , "esnext": true + , "evil": true + , "expr": true + , "funcscope": false + , "globalstrict": false + , "iterator": false + , "lastsemic": true + , "laxbreak": true + , "laxcomma": true + , "loopfunc": true + , "multistr": false + , "onecase": false + , "proto": false + , "regexdash": false + , "scripturl": true + , "smarttabs": false + , "shadow": false + , "sub": true + , "supernew": false + , "validthis": true + , "browser": true + , "couch": false + , "devel": false + , "dojo": false + , "mootools": false + , "node": true + , "nonstandard": true + , "prototypejs": false + , "rhino": false + , "worker": true + , "wsh": false + , "nomen": false + , "onevar": false + , "passfail": false +} \ No newline at end of file diff --git a/deps/npm/node_modules/minizlib/index.js b/deps/npm/node_modules/minizlib/index.js index c91a59c92dbd32..df486965c7e82e 100644 --- a/deps/npm/node_modules/minizlib/index.js +++ b/deps/npm/node_modules/minizlib/index.js @@ -2,11 +2,13 @@ const assert = require('assert') const Buffer = require('buffer').Buffer -const binding = process.binding('zlib') +const realZlib = require('zlib') const constants = exports.constants = require('./constants.js') const MiniPass = require('minipass') +const OriginalBufferConcat = Buffer.concat + class ZlibError extends Error { constructor (msg, errno) { super('zlib: ' + msg) @@ -54,24 +56,19 @@ const strategies = new Set([ // true or false if there is anything in the queue when // you call the .write() method. const _opts = Symbol('opts') -const _chunkSize = Symbol('chunkSize') const _flushFlag = Symbol('flushFlag') const _finishFlush = Symbol('finishFlush') const _handle = Symbol('handle') -const _hadError = Symbol('hadError') -const _buffer = Symbol('buffer') -const _offset = Symbol('offset') +const _onError = Symbol('onError') const _level = Symbol('level') const _strategy = Symbol('strategy') const _ended = Symbol('ended') -const _writeState = Symbol('writeState') class Zlib extends MiniPass { constructor (opts, mode) { super(opts) this[_ended] = false this[_opts] = opts = opts || {} - this[_chunkSize] = opts.chunkSize || constants.Z_DEFAULT_CHUNK if (opts.flush && !validFlushFlags.has(opts.flush)) { throw new TypeError('Invalid flush flag: ' + opts.flush) } @@ -119,18 +116,17 @@ class Zlib extends MiniPass { } } - this[_handle] = new binding.Zlib(mode) + this[_handle] = new realZlib[mode](opts) - this[_hadError] = false - this[_handle].onerror = (message, errno) => { + this[_onError] = (err) => { // there is no way to cleanly recover. // continuing only obscures problems. this.close() - this[_hadError] = true - const error = new ZlibError(message, errno) + const error = new ZlibError(err.message, err.errno) this.emit('error', error) } + this[_handle].on('error', this[_onError]) const level = typeof opts.level === 'number' ? opts.level : constants.Z_DEFAULT_COMPRESSION @@ -138,30 +134,9 @@ class Zlib extends MiniPass { var strategy = typeof opts.strategy === 'number' ? opts.strategy : constants.Z_DEFAULT_STRATEGY - this[_writeState] = new Uint32Array(2); - const window = opts.windowBits || constants.Z_DEFAULT_WINDOWBITS - const memLevel = opts.memLevel || constants.Z_DEFAULT_MEMLEVEL - // API changed in node v9 /* istanbul ignore next */ - if (/^v[0-8]\./.test(process.version)) { - this[_handle].init(window, - level, - memLevel, - strategy, - opts.dictionary) - } else { - this[_handle].init(window, - level, - memLevel, - strategy, - this[_writeState], - () => {}, - opts.dictionary) - } - this[_buffer] = Buffer.allocUnsafe(this[_chunkSize]) - this[_offset] = 0 this[_level] = level this[_strategy] = strategy @@ -196,9 +171,18 @@ class Zlib extends MiniPass { if (this[_level] !== level || this[_strategy] !== strategy) { this.flush(constants.Z_SYNC_FLUSH) assert(this[_handle], 'zlib binding closed') + // .params() calls .flush(), but the latter is always async in the + // core zlib. We override .flush() temporarily to intercept that and + // flush synchronously. + const origFlush = this[_handle].flush + this[_handle].flush = (flushFlag, cb) => { + this[_handle].flush = origFlush + this.flush(flushFlag) + cb() + } this[_handle].params(level, strategy) /* istanbul ignore else */ - if (!this[_hadError]) { + if (this[_handle]) { this[_level] = level this[_strategy] = strategy } @@ -244,64 +228,51 @@ class Zlib extends MiniPass { if (typeof chunk === 'string') chunk = Buffer.from(chunk, encoding) - let availInBefore = chunk && chunk.length - let availOutBefore = this[_chunkSize] - this[_offset] - let inOff = 0 // the offset of the input buffer - const flushFlag = this[_flushFlag] - let writeReturn = true - assert(this[_handle], 'zlib binding closed') - do { - let res = this[_handle].writeSync( - flushFlag, - chunk, // in - inOff, // in_off - availInBefore, // in_len - this[_buffer], // out - this[_offset], //out_off - availOutBefore // out_len - ) - - if (this[_hadError]) - break - - // API changed in v9 - /* istanbul ignore next */ - let availInAfter = res ? res[0] : this[_writeState][1] - /* istanbul ignore next */ - let availOutAfter = res ? res[1] : this[_writeState][0] - - const have = availOutBefore - availOutAfter - assert(have >= 0, 'have should not go down') - - if (have > 0) { - const out = this[_buffer].slice( - this[_offset], this[_offset] + have - ) - - this[_offset] += have - // serve some output to the consumer. - writeReturn = super.write(out) && writeReturn - } - // exhausted the output buffer, or used all the input create a new one. - if (availOutAfter === 0 || this[_offset] >= this[_chunkSize]) { - availOutBefore = this[_chunkSize] - this[_offset] = 0 - this[_buffer] = Buffer.allocUnsafe(this[_chunkSize]) + // _processChunk tries to .close() the native handle after it's done, so we + // intercept that by temporarily making it a no-op. + const nativeHandle = this[_handle]._handle + const originalNativeClose = nativeHandle.close + nativeHandle.close = () => {} + const originalClose = this[_handle].close + this[_handle].close = () => {} + // It also calls `Buffer.concat()` at the end, which may be convenient + // for some, but which we are not interested in as it slows us down. + Buffer.concat = (args) => args + let result + try { + result = this[_handle]._processChunk(chunk, this[_flushFlag]) + } catch (err) { + this[_onError](err) + } finally { + Buffer.concat = OriginalBufferConcat + if (this[_handle]) { + // Core zlib resets `_handle` to null after attempting to close the + // native handle. Our no-op handler prevented actual closure, but we + // need to restore the `._handle` property. + this[_handle]._handle = nativeHandle + nativeHandle.close = originalNativeClose + this[_handle].close = originalClose + // `_processChunk()` adds an 'error' listener. If we don't remove it + // after each call, these handlers start piling up. + this[_handle].removeAllListeners('error') } + } - if (availOutAfter === 0) { - // Not actually done. Need to reprocess. - // Also, update the availInBefore to the availInAfter value, - // so that if we have to hit it a third (fourth, etc.) time, - // it'll have the correct byte counts. - inOff += (availInBefore - availInAfter) - availInBefore = availInAfter - continue + let writeReturn + if (result) { + if (Array.isArray(result) && result.length > 0) { + // The first buffer is always `handle._outBuffer`, which would be + // re-used for later invocations; so, we always have to copy that one. + writeReturn = super.write(Buffer.from(result[0])) + for (let i = 1; i < result.length; i++) { + writeReturn = super.write(result[i]) + } + } else { + writeReturn = super.write(Buffer.from(result)) } - break - } while (!this[_hadError]) + } if (cb) cb() @@ -312,46 +283,46 @@ class Zlib extends MiniPass { // minimal 2-byte header class Deflate extends Zlib { constructor (opts) { - super(opts, constants.DEFLATE) + super(opts, 'Deflate') } } class Inflate extends Zlib { constructor (opts) { - super(opts, constants.INFLATE) + super(opts, 'Inflate') } } // gzip - bigger header, same deflate compression class Gzip extends Zlib { constructor (opts) { - super(opts, constants.GZIP) + super(opts, 'Gzip') } } class Gunzip extends Zlib { constructor (opts) { - super(opts, constants.GUNZIP) + super(opts, 'Gunzip') } } // raw - no header class DeflateRaw extends Zlib { constructor (opts) { - super(opts, constants.DEFLATERAW) + super(opts, 'DeflateRaw') } } class InflateRaw extends Zlib { constructor (opts) { - super(opts, constants.INFLATERAW) + super(opts, 'InflateRaw') } } // auto-detect header. class Unzip extends Zlib { constructor (opts) { - super(opts, constants.UNZIP) + super(opts, 'Unzip') } } diff --git a/deps/npm/node_modules/minizlib/package.json b/deps/npm/node_modules/minizlib/package.json index f3a57e9f1d8216..0e6e4f4670752c 100644 --- a/deps/npm/node_modules/minizlib/package.json +++ b/deps/npm/node_modules/minizlib/package.json @@ -1,27 +1,27 @@ { - "_from": "minizlib@^1.1.1", - "_id": "minizlib@1.1.1", + "_from": "minizlib@^1.2.1", + "_id": "minizlib@1.2.1", "_inBundle": false, - "_integrity": "sha512-TrfjCjk4jLhcJyGMYymBH6oTXcWjYbUAXTHDbtnWHjZC25h0cdajHuPE1zxb4DVmu8crfh+HwH/WMuyLG0nHBg==", + "_integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "_location": "/minizlib", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "minizlib@^1.1.1", + "raw": "minizlib@^1.2.1", "name": "minizlib", "escapedName": "minizlib", - "rawSpec": "^1.1.1", + "rawSpec": "^1.2.1", "saveSpec": null, - "fetchSpec": "^1.1.1" + "fetchSpec": "^1.2.1" }, "_requiredBy": [ "/tar" ], - "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.1.tgz", - "_shasum": "6734acc045a46e61d596a43bb9d9cd326e19cc42", - "_spec": "minizlib@^1.1.1", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/tar", + "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "_shasum": "dd27ea6136243c7c880684e8672bb3a45fd9b614", + "_spec": "minizlib@^1.2.1", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/tar", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -37,7 +37,7 @@ "deprecated": false, "description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.", "devDependencies": { - "tap": "^10.7.2" + "tap": "^12.0.1" }, "files": [ "index.js", @@ -67,5 +67,5 @@ "preversion": "npm test", "test": "tap test/*.js --100 -J" }, - "version": "1.1.1" + "version": "1.2.1" } diff --git a/deps/npm/node_modules/move-concurrently/README.md~ b/deps/npm/node_modules/move-concurrently/README.md~ new file mode 100644 index 00000000000000..7d04d45955d5a1 --- /dev/null +++ b/deps/npm/node_modules/move-concurrently/README.md~ @@ -0,0 +1,52 @@ +# move-concurrently + +Move files and directories. + +``` +const move = require('move-concurrently') +move('/path/to/thing', '/new/path/thing'), err => { + if (err) throw err + // thing is now moved! +}) +``` + +Uses `rename` to move things as fast as possible. + +If you `move` across devices or on filesystems that don't support renaming +large directories. That is, situations that result in `rename` returning +the `EXDEV` error, then `move` will fallback to copy + delete. + +When recursively copying directories it will first try to rename the +contents before falling back to copying. While this will be slightly slower +in true cross-device scenarios, it is MUCH faster in cases where the +filesystem can't handle directory renames. + +When copying ownership is maintained when running as root. Permissions are +always maintained. On Windows, if symlinks are unavailable then junctions +will be used. + +## INTERFACE + +### move(from, to, options) → Promise + +Recursively moves `from` to `to` and resolves its promise when finished. +If `to` already exists then the promise will be rejected with an `EEXIST` +error. + +Starts by trying to rename `from` to `to`. + +Options are: + +* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. + +Options can also include dependency injection: + +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. diff --git a/deps/npm/node_modules/mute-stream/.nyc_output/33508.json b/deps/npm/node_modules/mute-stream/.nyc_output/33508.json new file mode 100644 index 00000000000000..9e26dfeeb6e641 --- /dev/null +++ b/deps/npm/node_modules/mute-stream/.nyc_output/33508.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/deps/npm/node_modules/mute-stream/.nyc_output/33510.json b/deps/npm/node_modules/mute-stream/.nyc_output/33510.json new file mode 100644 index 00000000000000..1d04442328beff --- /dev/null +++ b/deps/npm/node_modules/mute-stream/.nyc_output/33510.json @@ -0,0 +1 @@ +{"./mute.js":{"path":"./mute.js","s":{"1":1,"2":1,"3":1,"4":7,"5":7,"6":7,"7":7,"8":7,"9":7,"10":7,"11":7,"12":1,"13":1,"14":1,"15":10,"16":1,"17":6,"18":1,"19":1,"20":5,"21":1,"22":1,"23":8,"24":1,"25":2,"26":1,"27":5,"28":1,"29":5,"30":1,"31":2,"32":2,"33":1,"34":2,"35":2,"36":1,"37":2,"38":2,"39":1,"40":25,"41":13,"42":5,"43":8,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":8,"51":0,"52":0,"53":0,"54":8,"55":20,"56":1,"57":2,"58":2,"59":0,"60":2,"61":2,"62":0,"63":2,"64":1,"65":3,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":1,"73":1,"74":1},"b":{"1":[7,5],"2":[7,7],"3":[3,5],"4":[3,2],"5":[4,1],"6":[0,1],"7":[4,1],"8":[0,1],"9":[2,0],"10":[2,0],"11":[13,12],"12":[5,8],"13":[0,8],"14":[0,0],"15":[0,8],"16":[8,0,0],"17":[2,0],"18":[0,2],"19":[2,1],"20":[0,2],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0]},"f":{"1":7,"2":10,"3":6,"4":5,"5":8,"6":2,"7":5,"8":5,"9":2,"10":2,"11":2,"12":25,"13":2,"14":3,"15":0},"fnMap":{"1":{"name":"MuteStream","line":7,"loc":{"start":{"line":7,"column":0},"end":{"line":7,"column":27}}},"2":{"name":"(anonymous_2)","line":29,"loc":{"start":{"line":29,"column":28},"end":{"line":29,"column":40}}},"3":{"name":"(anonymous_3)","line":33,"loc":{"start":{"line":33,"column":30},"end":{"line":33,"column":42}}},"4":{"name":"onPipe","line":44,"loc":{"start":{"line":44,"column":0},"end":{"line":44,"column":22}}},"5":{"name":"getIsTTY","line":55,"loc":{"start":{"line":55,"column":0},"end":{"line":55,"column":21}}},"6":{"name":"setIsTTY","line":63,"loc":{"start":{"line":63,"column":0},"end":{"line":63,"column":26}}},"7":{"name":"(anonymous_7)","line":73,"loc":{"start":{"line":73,"column":7},"end":{"line":73,"column":19}}},"8":{"name":"(anonymous_8)","line":80,"loc":{"start":{"line":80,"column":7},"end":{"line":80,"column":19}}},"9":{"name":"(anonymous_9)","line":87,"loc":{"start":{"line":87,"column":28},"end":{"line":87,"column":53}}},"10":{"name":"(anonymous_10)","line":92,"loc":{"start":{"line":92,"column":29},"end":{"line":92,"column":41}}},"11":{"name":"(anonymous_11)","line":96,"loc":{"start":{"line":96,"column":30},"end":{"line":96,"column":42}}},"12":{"name":"(anonymous_12)","line":100,"loc":{"start":{"line":100,"column":29},"end":{"line":100,"column":42}}},"13":{"name":"(anonymous_13)","line":124,"loc":{"start":{"line":124,"column":27},"end":{"line":124,"column":40}}},"14":{"name":"proxy","line":136,"loc":{"start":{"line":136,"column":0},"end":{"line":136,"column":20}}},"15":{"name":"(anonymous_15)","line":136,"loc":{"start":{"line":136,"column":29},"end":{"line":136,"column":41}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":27}},"3":{"start":{"line":7,"column":0},"end":{"line":20,"column":1}},"4":{"start":{"line":8,"column":2},"end":{"line":8,"column":20}},"5":{"start":{"line":9,"column":2},"end":{"line":9,"column":19}},"6":{"start":{"line":10,"column":2},"end":{"line":10,"column":38}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":20}},"8":{"start":{"line":12,"column":2},"end":{"line":12,"column":31}},"9":{"start":{"line":13,"column":2},"end":{"line":13,"column":29}},"10":{"start":{"line":18,"column":2},"end":{"line":18,"column":36}},"11":{"start":{"line":19,"column":2},"end":{"line":19,"column":26}},"12":{"start":{"line":22,"column":0},"end":{"line":22,"column":54}},"13":{"start":{"line":24,"column":0},"end":{"line":27,"column":2}},"14":{"start":{"line":29,"column":0},"end":{"line":31,"column":1}},"15":{"start":{"line":30,"column":2},"end":{"line":30,"column":19}},"16":{"start":{"line":33,"column":0},"end":{"line":35,"column":1}},"17":{"start":{"line":34,"column":2},"end":{"line":34,"column":20}},"18":{"start":{"line":37,"column":0},"end":{"line":42,"column":2}},"19":{"start":{"line":44,"column":0},"end":{"line":46,"column":1}},"20":{"start":{"line":45,"column":2},"end":{"line":45,"column":17}},"21":{"start":{"line":48,"column":0},"end":{"line":53,"column":2}},"22":{"start":{"line":55,"column":0},"end":{"line":60,"column":1}},"23":{"start":{"line":56,"column":2},"end":{"line":59,"column":9}},"24":{"start":{"line":63,"column":0},"end":{"line":70,"column":1}},"25":{"start":{"line":64,"column":2},"end":{"line":69,"column":4}},"26":{"start":{"line":72,"column":0},"end":{"line":77,"column":44}},"27":{"start":{"line":74,"column":4},"end":{"line":76,"column":23}},"28":{"start":{"line":79,"column":0},"end":{"line":84,"column":44}},"29":{"start":{"line":81,"column":4},"end":{"line":83,"column":23}},"30":{"start":{"line":87,"column":0},"end":{"line":90,"column":1}},"31":{"start":{"line":88,"column":2},"end":{"line":88,"column":19}},"32":{"start":{"line":89,"column":2},"end":{"line":89,"column":56}},"33":{"start":{"line":92,"column":0},"end":{"line":94,"column":1}},"34":{"start":{"line":93,"column":2},"end":{"line":93,"column":41}},"35":{"start":{"line":93,"column":17},"end":{"line":93,"column":41}},"36":{"start":{"line":96,"column":0},"end":{"line":98,"column":1}},"37":{"start":{"line":97,"column":2},"end":{"line":97,"column":42}},"38":{"start":{"line":97,"column":17},"end":{"line":97,"column":42}},"39":{"start":{"line":100,"column":0},"end":{"line":122,"column":1}},"40":{"start":{"line":101,"column":2},"end":{"line":120,"column":3}},"41":{"start":{"line":102,"column":4},"end":{"line":102,"column":34}},"42":{"start":{"line":102,"column":23},"end":{"line":102,"column":34}},"43":{"start":{"line":103,"column":4},"end":{"line":119,"column":5}},"44":{"start":{"line":104,"column":6},"end":{"line":108,"column":7}},"45":{"start":{"line":105,"column":8},"end":{"line":105,"column":42}},"46":{"start":{"line":106,"column":8},"end":{"line":106,"column":42}},"47":{"start":{"line":107,"column":8},"end":{"line":107,"column":29}},"48":{"start":{"line":109,"column":6},"end":{"line":109,"column":29}},"49":{"start":{"line":110,"column":6},"end":{"line":110,"column":33}},"50":{"start":{"line":112,"column":6},"end":{"line":117,"column":7}},"51":{"start":{"line":114,"column":8},"end":{"line":114,"column":32}},"52":{"start":{"line":115,"column":8},"end":{"line":115,"column":39}},"53":{"start":{"line":116,"column":8},"end":{"line":116,"column":41}},"54":{"start":{"line":118,"column":6},"end":{"line":118,"column":50}},"55":{"start":{"line":121,"column":2},"end":{"line":121,"column":22}},"56":{"start":{"line":124,"column":0},"end":{"line":134,"column":1}},"57":{"start":{"line":125,"column":2},"end":{"line":131,"column":3}},"58":{"start":{"line":126,"column":4},"end":{"line":130,"column":5}},"59":{"start":{"line":127,"column":6},"end":{"line":127,"column":50}},"60":{"start":{"line":129,"column":6},"end":{"line":129,"column":14}},"61":{"start":{"line":132,"column":2},"end":{"line":132,"column":29}},"62":{"start":{"line":132,"column":9},"end":{"line":132,"column":29}},"63":{"start":{"line":133,"column":2},"end":{"line":133,"column":18}},"64":{"start":{"line":136,"column":0},"end":{"line":141,"column":2}},"65":{"start":{"line":136,"column":22},"end":{"line":141,"column":1}},"66":{"start":{"line":137,"column":2},"end":{"line":137,"column":20}},"67":{"start":{"line":138,"column":2},"end":{"line":138,"column":19}},"68":{"start":{"line":139,"column":2},"end":{"line":139,"column":43}},"69":{"start":{"line":139,"column":18},"end":{"line":139,"column":43}},"70":{"start":{"line":140,"column":2},"end":{"line":140,"column":43}},"71":{"start":{"line":140,"column":18},"end":{"line":140,"column":43}},"72":{"start":{"line":143,"column":0},"end":{"line":143,"column":47}},"73":{"start":{"line":144,"column":0},"end":{"line":144,"column":55}},"74":{"start":{"line":145,"column":0},"end":{"line":145,"column":43}}},"branchMap":{"1":{"line":9,"type":"binary-expr","locations":[{"start":{"line":9,"column":9},"end":{"line":9,"column":13}},{"start":{"line":9,"column":17},"end":{"line":9,"column":19}}]},"2":{"line":18,"type":"binary-expr","locations":[{"start":{"line":18,"column":17},"end":{"line":18,"column":28}},{"start":{"line":18,"column":32},"end":{"line":18,"column":36}}]},"3":{"line":56,"type":"cond-expr","locations":[{"start":{"line":56,"column":25},"end":{"line":56,"column":41}},{"start":{"line":57,"column":10},"end":{"line":58,"column":15}}]},"4":{"line":57,"type":"cond-expr","locations":[{"start":{"line":57,"column":24},"end":{"line":57,"column":39}},{"start":{"line":58,"column":10},"end":{"line":58,"column":15}}]},"5":{"line":74,"type":"cond-expr","locations":[{"start":{"line":74,"column":25},"end":{"line":74,"column":40}},{"start":{"line":75,"column":12},"end":{"line":76,"column":21}}]},"6":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":24},"end":{"line":75,"column":38}},{"start":{"line":76,"column":12},"end":{"line":76,"column":21}}]},"7":{"line":81,"type":"cond-expr","locations":[{"start":{"line":81,"column":25},"end":{"line":81,"column":43}},{"start":{"line":82,"column":12},"end":{"line":83,"column":21}}]},"8":{"line":82,"type":"cond-expr","locations":[{"start":{"line":82,"column":24},"end":{"line":82,"column":41}},{"start":{"line":83,"column":12},"end":{"line":83,"column":21}}]},"9":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":2},"end":{"line":93,"column":2}},{"start":{"line":93,"column":2},"end":{"line":93,"column":2}}]},"10":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":2}},{"start":{"line":97,"column":2},"end":{"line":97,"column":2}}]},"11":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":2},"end":{"line":101,"column":2}},{"start":{"line":101,"column":2},"end":{"line":101,"column":2}}]},"12":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":4},"end":{"line":102,"column":4}},{"start":{"line":102,"column":4},"end":{"line":102,"column":4}}]},"13":{"line":103,"type":"if","locations":[{"start":{"line":103,"column":4},"end":{"line":103,"column":4}},{"start":{"line":103,"column":4},"end":{"line":103,"column":4}}]},"14":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":6},"end":{"line":104,"column":6}},{"start":{"line":104,"column":6},"end":{"line":104,"column":6}}]},"15":{"line":112,"type":"if","locations":[{"start":{"line":112,"column":6},"end":{"line":112,"column":6}},{"start":{"line":112,"column":6},"end":{"line":112,"column":6}}]},"16":{"line":112,"type":"binary-expr","locations":[{"start":{"line":112,"column":10},"end":{"line":112,"column":22}},{"start":{"line":112,"column":26},"end":{"line":112,"column":42}},{"start":{"line":113,"column":10},"end":{"line":113,"column":39}}]},"17":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":2},"end":{"line":125,"column":2}},{"start":{"line":125,"column":2},"end":{"line":125,"column":2}}]},"18":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":4},"end":{"line":126,"column":4}},{"start":{"line":126,"column":4},"end":{"line":126,"column":4}}]},"19":{"line":126,"type":"binary-expr","locations":[{"start":{"line":126,"column":8},"end":{"line":126,"column":9}},{"start":{"line":126,"column":13},"end":{"line":126,"column":25}}]},"20":{"line":132,"type":"if","locations":[{"start":{"line":132,"column":2},"end":{"line":132,"column":2}},{"start":{"line":132,"column":2},"end":{"line":132,"column":2}}]},"21":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":2},"end":{"line":139,"column":2}},{"start":{"line":139,"column":2},"end":{"line":139,"column":2}}]},"22":{"line":139,"type":"binary-expr","locations":[{"start":{"line":139,"column":6},"end":{"line":139,"column":7}},{"start":{"line":139,"column":11},"end":{"line":139,"column":16}}]},"23":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":2},"end":{"line":140,"column":2}},{"start":{"line":140,"column":2},"end":{"line":140,"column":2}}]},"24":{"line":140,"type":"binary-expr","locations":[{"start":{"line":140,"column":6},"end":{"line":140,"column":7}},{"start":{"line":140,"column":11},"end":{"line":140,"column":16}}]}}}} \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/.jshintrc b/deps/npm/node_modules/node-gyp/.jshintrc new file mode 100644 index 00000000000000..52475ba2e6c155 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/.jshintrc @@ -0,0 +1,7 @@ +{ + "asi": true, + "laxcomma": true, + "es5": true, + "node": true, + "strict": false +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore deleted file mode 100644 index c167ad5b1c12f8..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules -examples/extract/ -test/tmp/ -test/fixtures/ diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js index 600ad782f0f61d..1c66ebdaf0c157 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js +++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js @@ -38,6 +38,7 @@ function Parse () { me._stream = new BlockStream(512) me.position = 0 me._ended = false + me._hardLinks = {} me._stream.on("error", function (e) { me.emit("error", e) @@ -251,6 +252,11 @@ Parse.prototype._startEntry = function (c) { if (onend) entry.on("end", onend) this._entry = entry + + if (entry.type === "Link") { + this._hardLinks[entry.path] = entry + } + var me = this entry.on("pause", function () { diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json b/deps/npm/node_modules/node-gyp/node_modules/tar/package.json index 2ab77e47f328d6..6e7fb2ed71093d 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/tar/package.json @@ -1,8 +1,8 @@ { "_from": "tar@^2.0.0", - "_id": "tar@2.2.1", + "_id": "tar@2.2.2", "_inBundle": false, - "_integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "_integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", "_location": "/node-gyp/tar", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/node-gyp" ], - "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "_shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1", + "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "_shasum": "0ca8848562c7299b8b446ff6a4d60cdbb23edc40", "_spec": "tar@^2.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/node-gyp", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -33,7 +33,7 @@ "bundleDependencies": false, "dependencies": { "block-stream": "*", - "fstream": "^1.0.2", + "fstream": "^1.0.12", "inherits": "2" }, "deprecated": false, @@ -55,5 +55,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "2.2.1" + "version": "2.2.2" } diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index ba6913209c47d8..df3a5dfb5e74ec 100644 --- a/deps/npm/node_modules/node-gyp/package.json +++ b/deps/npm/node_modules/node-gyp/package.json @@ -1,5 +1,5 @@ { - "_from": "node-gyp@latest", + "_from": "node-gyp@3", "_id": "node-gyp@3.8.0", "_inBundle": false, "_integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", @@ -7,18 +7,18 @@ "_phantomChildren": { "abbrev": "1.1.1", "block-stream": "0.0.9", - "fstream": "1.0.11", + "fstream": "1.0.12", "inherits": "2.0.3" }, "_requested": { - "type": "tag", + "type": "range", "registry": true, - "raw": "node-gyp@latest", + "raw": "node-gyp@3", "name": "node-gyp", "escapedName": "node-gyp", - "rawSpec": "latest", + "rawSpec": "3", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "3" }, "_requiredBy": [ "#USER", @@ -27,8 +27,8 @@ ], "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", "_shasum": "540304261c330e80d0d5edce253a68cb3964218c", - "_spec": "node-gyp@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_spec": "node-gyp@3", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Nathan Rajlich", "email": "nathan@tootallnate.net", diff --git a/deps/npm/node_modules/normalize-package-data/node_modules/resolve/.eslintrc b/deps/npm/node_modules/normalize-package-data/node_modules/resolve/.eslintrc new file mode 100644 index 00000000000000..8b5748ab63b58d --- /dev/null +++ b/deps/npm/node_modules/normalize-package-data/node_modules/resolve/.eslintrc @@ -0,0 +1,31 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "indent": [2, 4], + "strict": 0, + "complexity": 0, + "consistent-return": 0, + "curly": 0, + "dot-notation": [2, { "allowKeywords": true }], + "func-name-matching": 0, + "func-style": 0, + "global-require": 0, + "id-length": [2, { "min": 1, "max": 30 }], + "max-lines-per-function": 0, + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements-per-line": [2, { "max": 2 }], + "max-statements": 0, + "no-magic-numbers": 0, + "no-console": 0, + "no-shadow": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + "no-use-before-define": 0, + "object-curly-newline": 0, + "operator-linebreak": [2, "before"], + "sort-keys": 0, + } +} diff --git a/deps/npm/node_modules/normalize-package-data/node_modules/resolve/test/.eslintrc b/deps/npm/node_modules/normalize-package-data/node_modules/resolve/test/.eslintrc new file mode 100644 index 00000000000000..ddd262df503c72 --- /dev/null +++ b/deps/npm/node_modules/normalize-package-data/node_modules/resolve/test/.eslintrc @@ -0,0 +1,5 @@ +{ + "rules": { + "max-lines": 0 + } +} diff --git a/deps/npm/node_modules/npm-packlist/index.js b/deps/npm/node_modules/npm-packlist/index.js index 777b58590d11e7..8bfd257794f9e0 100644 --- a/deps/npm/node_modules/npm-packlist/index.js +++ b/deps/npm/node_modules/npm-packlist/index.js @@ -34,6 +34,7 @@ const defaultRules = [ 'npm-debug.log', '**/.npmrc', '.*.swp', + '.DS_Store', '**/.DS_Store/**', '._*', '**/._*/**', @@ -90,6 +91,16 @@ const npmWalker = Class => class Walker extends Class { } } + onReaddir (entries) { + if (!this.parent) { + entries = entries.filter(e => + e !== '.git' && + !(e === 'node_modules' && this.bundled.length === 0) + ) + } + return super.onReaddir(entries) + } + filterEntry (entry, partial) { // get the partial path from the root of the walk const p = this.path.substr(this.root.length + 1) @@ -147,6 +158,14 @@ const npmWalker = Class => class Walker extends Class { // if there's a bin, browser or main, make sure we don't ignore it // also, don't ignore the package.json itself! + // + // Weird side-effect of this: a readme (etc) file will be included + // if it exists anywhere within a folder with a package.json file. + // The original intent was only to include these files in the root, + // but now users in the wild are dependent on that behavior for + // localized documentation and other use cases. Adding a `/` to + // these rules, while tempting and arguably more "correct", is a + // breaking change. const rules = [ pkg.browser ? '!' + pkg.browser : '', pkg.main ? '!' + pkg.main : '', @@ -234,15 +253,20 @@ const walkSync = options => { return walker.result } -// package.json first, node_modules last, files before folders, alphasort -const sort = (a, b) => - a === 'package.json' ? -1 - : b === 'package.json' ? 1 - : /^node_modules/.test(a) && !/^node_modules/.test(b) ? 1 - : /^node_modules/.test(b) && !/^node_modules/.test(a) ? -1 - : path.dirname(a) === '.' && path.dirname(b) !== '.' ? -1 - : path.dirname(b) === '.' && path.dirname(a) !== '.' ? 1 - : a.localeCompare(b) +// optimize for compressibility +// extname, then basename, then locale alphabetically +// https://twitter.com/isntitvacant/status/1131094910923231232 +const sort = (a, b) => { + const exta = path.extname(a).toLowerCase() + const extb = path.extname(b).toLowerCase() + const basea = path.basename(a).toLowerCase() + const baseb = path.basename(b).toLowerCase() + + return exta.localeCompare(extb) || + basea.localeCompare(baseb) || + a.localeCompare(b) +} + module.exports = walk walk.sync = walkSync diff --git a/deps/npm/node_modules/npm-packlist/package.json b/deps/npm/node_modules/npm-packlist/package.json index c5be026edaff92..d72eef9cae7392 100644 --- a/deps/npm/node_modules/npm-packlist/package.json +++ b/deps/npm/node_modules/npm-packlist/package.json @@ -1,29 +1,29 @@ { - "_from": "npm-packlist@latest", - "_id": "npm-packlist@1.4.1", + "_from": "npm-packlist@^1.4.3", + "_id": "npm-packlist@1.4.4", "_inBundle": false, - "_integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", + "_integrity": "sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==", "_location": "/npm-packlist", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "range", "registry": true, - "raw": "npm-packlist@latest", + "raw": "npm-packlist@^1.4.3", "name": "npm-packlist", "escapedName": "npm-packlist", - "rawSpec": "latest", + "rawSpec": "^1.4.3", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "^1.4.3" }, "_requiredBy": [ "#USER", "/", "/pacote" ], - "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "_shasum": "19064cdf988da80ea3cee45533879d90192bbfbc", - "_spec": "npm-packlist@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.4.tgz", + "_shasum": "866224233850ac534b63d1a6e76050092b5d2f44", + "_spec": "npm-packlist@^1.4.3", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -42,7 +42,7 @@ "devDependencies": { "mkdirp": "^0.5.1", "rimraf": "^2.6.1", - "tap": "^12.0.1" + "tap": "^14.2.1" }, "directories": { "test": "test" @@ -59,10 +59,11 @@ "url": "git+https://github.com/npm/npm-packlist.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", - "test": "tap test/*.js --100 -J" + "snap": "tap", + "test": "tap" }, - "version": "1.4.1" + "version": "1.4.4" } diff --git a/deps/npm/node_modules/object-keys/.editorconfig b/deps/npm/node_modules/object-keys/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/object-keys/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/object-keys/.eslintrc b/deps/npm/node_modules/object-keys/.eslintrc new file mode 100644 index 00000000000000..9a8d5b0e95e361 --- /dev/null +++ b/deps/npm/node_modules/object-keys/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 23], + "id-length": [2, { "min": 1, "max": 40 }], + "max-params": [2, 3], + "max-statements": [2, 23], + "max-statements-per-line": [2, { "max": 2 }], + "no-extra-parens": [1], + "no-invalid-this": [1], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": [2, "after"] + } +} diff --git a/deps/npm/node_modules/object-keys/.jscs.json b/deps/npm/node_modules/object-keys/.jscs.json new file mode 100644 index 00000000000000..76f7cb186e68da --- /dev/null +++ b/deps/npm/node_modules/object-keys/.jscs.json @@ -0,0 +1,174 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 7 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/object-keys/.travis.yml b/deps/npm/node_modules/object-keys/.travis.yml new file mode 100644 index 00000000000000..767256c8dd4843 --- /dev/null +++ b/deps/npm/node_modules/object-keys/.travis.yml @@ -0,0 +1,225 @@ +language: node_js +os: + - linux +node_js: + - "10.4" + - "9.11" + - "8.11" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/deps/npm/node_modules/object-keys/CHANGELOG.md b/deps/npm/node_modules/object-keys/CHANGELOG.md new file mode 100644 index 00000000000000..27123c475ef665 --- /dev/null +++ b/deps/npm/node_modules/object-keys/CHANGELOG.md @@ -0,0 +1,220 @@ +1.0.12 / 2018-06-18 +================= + * [Fix] avoid accessing `window.applicationCache`, to avoid issues with latest Chrome on HTTP (#46) + +1.0.11 / 2016-07-05 +================= + * [Fix] exclude keys regarding the style (eg. `pageYOffset`) on `window` to avoid reflow (#32) + +1.0.10 / 2016-07-04 +================= + * [Fix] exclude `height` and `width` keys on `window` to avoid reflow (#31) + * [Fix] In IE 6, `window.external` makes `Object.keys` throw + * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Dev Deps] remove unused eccheck script + dep + +1.0.9 / 2015-10-19 +================= + * [Fix] Blacklist 'frame' property on window (#16, #17) + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` + +1.0.8 / 2015-10-14 +================= + * [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327) + * [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322) + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + * [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs` + +1.0.7 / 2015-07-18 +================= + * [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8. + * [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15) + * [Tests] Improve test output for automation equality bugfix + * [Tests] Test on `io.js` `v2.4` + +1.0.6 / 2015-07-09 +================= + * [Fix] Use an object lookup rather than ES5's `indexOf` (#14) + * [Tests] ES3 browsers don't have `Array.isArray` + * [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs. + +1.0.5 / 2015-07-03 +================= + * [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws + * [Tests] Test up to `io.js` `v2.3` + * [Dev Deps] Update `nsp`, `eslint` + +1.0.4 / 2015-05-23 +================= + * Fix a Safari 5.0 bug with `Object.keys` not working with `arguments` + * Test on latest `node` and `io.js` + * Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert` + +1.0.3 / 2015-01-06 +================= + * Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance + +1.0.2 / 2014-12-28 +================= + * Update lots of dev dependencies + * Tweaks to README + * Make `object-keys` more robust against later environment tampering + +1.0.1 / 2014-09-03 +================= + * Update URLs and badges in README + +1.0.0 / 2014-08-26 +================= + * v1.0.0 + +0.6.1 / 2014-08-25 +================= + * v0.6.1 + * Updating dependencies (tape, covert, is) + * Update badges in readme + * Use separate var statements + +0.6.0 / 2014-04-23 +================= + * v0.6.0 + * Updating dependencies (tape, covert) + * Make sure boxed primitives, and arguments objects, work properly in ES3 browsers + * Improve test matrix: test all node versions, but only latest two stables are a failure + * Remove internal foreach shim. + +0.5.1 / 2014-03-09 +================= + * 0.5.1 + * Updating dependencies (tape, covert, is) + * Removing forEach from the module (but keeping it in tests) + +0.5.0 / 2014-01-30 +================= + * 0.5.0 + * Explicitly returning the shim, instead of returning native Object.keys when present + * Adding a changelog. + * Cleaning up IIFE wrapping + * Testing on node 0.4 through 0.11 + +0.4.0 / 2013-08-14 +================== + + * v0.4.0 + * In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function' + * If it's a string, make sure to use charAt instead of brackets. + * Only use Function#call if necessary. + * Making sure the context tests actually run. + * Better function detection + * Adding the android browser + * Fixing testling files + * Updating tape + * Removing the "is" dependency. + * Making an isArguments shim. + * Adding a local forEach shim and tests. + * Updating paths. + * Moving the shim test. + * v0.3.0 + +0.3.0 / 2013-05-18 +================== + + * README tweak. + * Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5). + * Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5) + * Updating readme. + * Updating dependencies. + * Giving credit to lodash. + * Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2). + * Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding node 0.10 to travis. + * Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3) + * Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2) + * Moving "indexof" and "is" to be dev dependencies. + * Making sure the shim works with functions. + * Flattening the tests. + +0.2.0 / 2013-05-10 +================== + + * v0.2.0 + * Object.keys should work with arrays. + +0.1.8 / 2013-05-10 +================== + + * v0.1.8 + * Upgrading dependencies. + * Using a simpler check. + * Fixing a bug in hasDontEnumBug browsers. + * Using the newest tape! + * Fixing this error test. + * "undefined" is probably a reserved word in ES3. + * Better test message. + +0.1.7 / 2013-04-17 +================== + + * Upgrading "is" once more. + * The key "null" is breaking some browsers. + +0.1.6 / 2013-04-17 +================== + + * v0.1.6 + * Upgrading "is" + +0.1.5 / 2013-04-14 +================== + + * Bumping version. + * Adding more testling browsers. + * Updating "is" + +0.1.4 / 2013-04-08 +================== + + * Using "is" instead of "is-extended". + +0.1.3 / 2013-04-07 +================== + + * Using "foreach" instead of my own shim. + * Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug. + +0.1.2 / 2013-04-03 +================== + + * Adding dependency status; moving links to an index at the bottom. + * Upgrading is-extended; version 0.1.2 + * Adding an npm version badge. + +0.1.1 / 2013-04-01 +================== + + * Adding Travis CI. + * Bumping the version. + * Adding indexOf since IE sucks. + * Adding a forEach shim since older browsers don't have Array#forEach. + * Upgrading tape - 0.3.2 uses Array#map + * Using explicit end instead of plan. + * Can't test with Array.isArray in older browsers. + * Using is-extended. + * Fixing testling files. + * JSHint/JSLint-ing. + * Removing an unused object. + * Using strict mode. + +0.1.0 / 2013-03-30 +================== + + * Changing the exports should have meant a higher version bump. + * Oops, fixing the repo URL. + * Adding more tests. + * 0.0.2 + * Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1) + * Move shim export to a separate file. diff --git a/deps/npm/node_modules/object-keys/LICENSE b/deps/npm/node_modules/object-keys/LICENSE new file mode 100644 index 00000000000000..28553fdd06841b --- /dev/null +++ b/deps/npm/node_modules/object-keys/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013 Jordan Harband + +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. \ No newline at end of file diff --git a/deps/npm/node_modules/object-keys/README.md b/deps/npm/node_modules/object-keys/README.md new file mode 100644 index 00000000000000..dbcf1a8c3d4188 --- /dev/null +++ b/deps/npm/node_modules/object-keys/README.md @@ -0,0 +1,75 @@ +#object-keys [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable. + +Most common usage: +```js +var keys = Object.keys || require('object-keys'); +``` + +## Example + +```js +var keys = require('object-keys'); +var assert = require('assert'); +var obj = { + a: true, + b: true, + c: true +}; + +assert.deepEqual(keys(obj), ['a', 'b', 'c']); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is not present */ +delete Object.keys; +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is present */ +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, Object.keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +## Source +Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url]. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/object-keys +[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg +[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg +[travis-url]: https://travis-ci.org/ljharb/object-keys +[deps-svg]: https://david-dm.org/ljharb/object-keys.svg +[deps-url]: https://david-dm.org/ljharb/object-keys +[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/object-keys.png +[testling-url]: https://ci.testling.com/ljharb/object-keys +[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589 +[lodash-url]: https://github.com/lodash/lodash +[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object-keys.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object-keys diff --git a/deps/npm/node_modules/object-keys/index.js b/deps/npm/node_modules/object-keys/index.js new file mode 100644 index 00000000000000..3f2463eb8040c1 --- /dev/null +++ b/deps/npm/node_modules/object-keys/index.js @@ -0,0 +1,141 @@ +'use strict'; + +// modified from https://github.com/es-shims/es5-shim +var has = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var slice = Array.prototype.slice; +var isArgs = require('./isArguments'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); +var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); +var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' +]; +var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; +}; +var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true +}; +var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; +}()); +var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } +}; + +var keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; +}; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + return (Object.keys(arguments) || '').length === 2; + }(1, 2)); + if (!keysWorksWithArguments) { + var originalKeys = Object.keys; + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } else { + return originalKeys(object); + } + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; diff --git a/deps/npm/node_modules/object-keys/isArguments.js b/deps/npm/node_modules/object-keys/isArguments.js new file mode 100644 index 00000000000000..f2a2a9014d925e --- /dev/null +++ b/deps/npm/node_modules/object-keys/isArguments.js @@ -0,0 +1,17 @@ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; diff --git a/deps/npm/node_modules/object-keys/package.json b/deps/npm/node_modules/object-keys/package.json new file mode 100644 index 00000000000000..e988c2db4cbc79 --- /dev/null +++ b/deps/npm/node_modules/object-keys/package.json @@ -0,0 +1,94 @@ +{ + "name": "object-keys", + "version": "1.0.12", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net" + }, + { + "name": "Ivan Starkov", + "email": "istarkov@gmail.com" + }, + { + "name": "Gary Katsevman", + "email": "git@gkatsev.com" + } + ], + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "node test/index.js", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "npm run --silent jscs && npm run --silent eslint", + "jscs": "jscs test/*.js *.js", + "eslint": "eslint test/*.js *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.19.1", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.2.1", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "tape": "^4.9.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz" +,"_integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" +,"_from": "object-keys@1.0.12" +} \ No newline at end of file diff --git a/deps/npm/node_modules/object-keys/test/index.js b/deps/npm/node_modules/object-keys/test/index.js new file mode 100644 index 00000000000000..5402465a19b5b6 --- /dev/null +++ b/deps/npm/node_modules/object-keys/test/index.js @@ -0,0 +1,5 @@ +'use strict'; + +require('./isArguments'); + +require('./shim'); diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.editorconfig b/deps/npm/node_modules/object.getownpropertydescriptors/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.eslintrc b/deps/npm/node_modules/object.getownpropertydescriptors/.eslintrc new file mode 100644 index 00000000000000..97ada3121bac03 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [2, { "min": 1, "max": 30 }], + "new-cap": [2, { "capIsNewExceptions": ["IsCallable", "RequireObjectCoercible", "ToObject"] }] + } +} diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.jscs.json b/deps/npm/node_modules/object.getownpropertydescriptors/.jscs.json new file mode 100644 index 00000000000000..7296cbab09bdf5 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.npmignore b/deps/npm/node_modules/object.getownpropertydescriptors/.npmignore new file mode 100644 index 00000000000000..59d842baa84c8b --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.npmignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Commenting this out is preferred by some people, see +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Users Environment Variables +.lock-wscript diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.travis.yml b/deps/npm/node_modules/object.getownpropertydescriptors/.travis.yml new file mode 100644 index 00000000000000..54ec28b3c4d854 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.travis.yml @@ -0,0 +1,96 @@ +language: node_js +node_js: + - "6.2" + - "6.1" + - "6.0" + - "5.12" + - "5.11" + - "5.10" + - "5.9" + - "5.8" + - "5.7" + - "5.6" + - "5.5" + - "5.4" + - "5.3" + - "5.2" + - "5.1" + - "5.0" + - "4.4" + - "4.3" + - "4.2" + - "4.1" + - "4.0" + - "iojs-v3.3" + - "iojs-v3.2" + - "iojs-v3.1" + - "iojs-v3.0" + - "iojs-v2.5" + - "iojs-v2.4" + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +script: + - 'if [ "${TRAVIS_NODE_VERSION}" != "4.4" ]; then npm run tests-only ; else npm test ; fi' +sudo: false +matrix: + fast_finish: true + allow_failures: + - node_js: "6.1" + - node_js: "6.0" + - node_js: "5.11" + - node_js: "5.10" + - node_js: "5.9" + - node_js: "5.8" + - node_js: "5.7" + - node_js: "5.6" + - node_js: "5.5" + - node_js: "5.4" + - node_js: "5.3" + - node_js: "5.2" + - node_js: "5.1" + - node_js: "5.0" + - node_js: "4.3" + - node_js: "4.2" + - node_js: "4.1" + - node_js: "4.0" + - node_js: "iojs-v3.2" + - node_js: "iojs-v3.1" + - node_js: "iojs-v3.0" + - node_js: "iojs-v2.4" + - node_js: "iojs-v2.3" + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.6" + - node_js: "0.4" diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/CHANGELOG.md b/deps/npm/node_modules/object.getownpropertydescriptors/CHANGELOG.md new file mode 100644 index 00000000000000..d7c2d15033b3dd --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/CHANGELOG.md @@ -0,0 +1,51 @@ +2.0.3 / 2016-07-26 +================= + * [Fix] Update implementation to not return `undefined` descriptors + * [Deps] update `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `jscs`, `nsp`, `tape`, `semver` + * [Dev Deps] remove unused eccheck script + dep + * [Tests] up to `node` `v6.3`, `v5.12`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * Update to stage 4 + +2.0.2 / 2016-01-27 +================= + * [Fix] ensure that `Object.getOwnPropertyDescriptors` does not fail when `Object.prototype` has a poisoned setter (#1, #2) + +2.0.1 / 2016-01-27 +================= + * [Deps] move `@es-shims/api` to dev deps + +2.0.0 / 2016-01-27 +================= + * [Breaking] implement the es-shims API + * [Deps] update `define-properties`, `es-abstract` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` + * [Tests] fix npm upgrades in older nodes + * [Tests] up to `node` `v5.5` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.4 / 2015-07-20 +================= + * [Tests] Test on `io.js` `v2.4` + * [Deps, Dev Deps] Update `define-properties`, `tape`, `eslint`, `semver` + +1.0.3 / 2015-06-28 +================= + * Increase robustness by caching `Array#{concat, reduce}` + * [Deps] Update `define_properties` + * [Dev Deps] Update `eslint`, `semver`, `nsp` + * [Tests] Test up to `io.js` `v2.3` + +1.0.2 / 2015-05-23 +================= + * Update `es-abstract`, `tape`, `eslint`, `jscs`, `semver`, `covert` + * Test up to `io.js` `v2.0` + +1.0.1 / 2015-03-20 +================= + * Update `es-abstract`, `editorconfig-tools`, `nsp`, `eslint`, `semver`, `replace` + +1.0.0 / 2015-02-17 +================= + * v1.0.0 diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/LICENSE b/deps/npm/node_modules/object.getownpropertydescriptors/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +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. diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/Makefile b/deps/npm/node_modules/object.getownpropertydescriptors/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/README.md b/deps/npm/node_modules/object.getownpropertydescriptors/README.md new file mode 100644 index 00000000000000..0fc6c185a11d7c --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/README.md @@ -0,0 +1,99 @@ +#object.getownpropertydescriptors [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An ES2017 spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5. +Invoke its "shim" method to shim `Object.getOwnPropertyDescriptors` if it is unavailable, and if `Object.getOwnPropertyDescriptor` is available. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://github.com/tc39/ecma262/pull/582). + +## Example + +```js +var getDescriptors = require('object.getownpropertydescriptors'); +var assert = require('assert'); +var obj = { normal: Infinity }; +var enumDescriptor = { + enumerable: false, + writable: false, + configurable: true, + value: true +}; +var writableDescriptor = { + enumerable: true, + writable: true, + configurable: true, + value: 42 +}; +var symbol = Symbol(); +var symDescriptor = { + enumerable: true, + writable: true, + configurable: false, + value: [symbol] +}; + +Object.defineProperty(obj, 'enumerable', enumDescriptor); +Object.defineProperty(obj, 'writable', writableDescriptor); +Object.defineProperty(obj, 'symbol', symDescriptor); + +var descriptors = getDescriptors(obj); + +assert.deepEqual(descriptors, { + normal: { + enumerable: true, + writable: true, + configurable: true, + value: Infinity + }, + enumerable: enumDescriptor, + writable: writableDescriptor, + symbol: symDescriptor +}); +``` + +```js +var getDescriptors = require('object.getownpropertydescriptors'); +var assert = require('assert'); +/* when Object.getOwnPropertyDescriptors is not present */ +delete Object.getOwnPropertyDescriptors; +var shimmedDescriptors = getDescriptors.shim(); +assert.equal(shimmedDescriptors, getDescriptors); +assert.deepEqual(shimmedDescriptors(obj), getDescriptors(obj)); +``` + +```js +var getDescriptors = require('object.getownpropertydescriptors'); +var assert = require('assert'); +/* when Object.getOwnPropertyDescriptors is present */ +var shimmedDescriptors = getDescriptors.shim(); +assert.notEqual(shimmedDescriptors, getDescriptors); +assert.deepEqual(shimmedDescriptors(obj), getDescriptors(obj)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/object.getownpropertydescriptors +[npm-version-svg]: http://versionbadg.es/ljharb/object.getownpropertydescriptors.svg +[travis-svg]: https://travis-ci.org/ljharb/object.getownpropertydescriptors.svg +[travis-url]: https://travis-ci.org/ljharb/object.getownpropertydescriptors +[deps-svg]: https://david-dm.org/ljharb/object.getownpropertydescriptors.svg +[deps-url]: https://david-dm.org/ljharb/object.getownpropertydescriptors +[dev-deps-svg]: https://david-dm.org/ljharb/object.getownpropertydescriptors/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/object.getownpropertydescriptors#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/object.getownpropertydescriptors.png +[testling-url]: https://ci.testling.com/ljharb/object.getownpropertydescriptors +[npm-badge-png]: https://nodei.co/npm/object.getownpropertydescriptors.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object.getownpropertydescriptors.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object.getownpropertydescriptors.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object.getownpropertydescriptors diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/implementation.js b/deps/npm/node_modules/object.getownpropertydescriptors/implementation.js new file mode 100644 index 00000000000000..784c22c99ca3bc --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/implementation.js @@ -0,0 +1,44 @@ +'use strict'; + +var ES = require('es-abstract/es7'); + +var defineProperty = Object.defineProperty; +var getDescriptor = Object.getOwnPropertyDescriptor; +var getOwnNames = Object.getOwnPropertyNames; +var getSymbols = Object.getOwnPropertySymbols; +var concat = Function.call.bind(Array.prototype.concat); +var reduce = Function.call.bind(Array.prototype.reduce); +var getAll = getSymbols ? function (obj) { + return concat(getOwnNames(obj), getSymbols(obj)); +} : getOwnNames; + +var isES5 = ES.IsCallable(getDescriptor) && ES.IsCallable(getOwnNames); + +var safePut = function put(obj, prop, val) { // eslint-disable-line max-params + if (defineProperty && prop in obj) { + defineProperty(obj, prop, { + configurable: true, + enumerable: true, + value: val, + writable: true + }); + } else { + obj[prop] = val; + } +}; + +module.exports = function getOwnPropertyDescriptors(value) { + ES.RequireObjectCoercible(value); + if (!isES5) { + throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor'); + } + + var O = ES.ToObject(value); + return reduce(getAll(O), function (acc, key) { + var descriptor = getDescriptor(O, key); + if (typeof descriptor !== 'undefined') { + safePut(acc, key, descriptor); + } + return acc; + }, {}); +}; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/index.js b/deps/npm/node_modules/object.getownpropertydescriptors/index.js new file mode 100644 index 00000000000000..bf2aec5d5006de --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/index.js @@ -0,0 +1,15 @@ +'use strict'; + +var define = require('define-properties'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +define(implementation, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = implementation; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/package.json b/deps/npm/node_modules/object.getownpropertydescriptors/package.json new file mode 100644 index 00000000000000..fb1bdfa934009f --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/package.json @@ -0,0 +1,107 @@ +{ + "_from": "object.getownpropertydescriptors@^2.0.3", + "_id": "object.getownpropertydescriptors@2.0.3", + "_inBundle": false, + "_integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "_location": "/object.getownpropertydescriptors", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "object.getownpropertydescriptors@^2.0.3", + "name": "object.getownpropertydescriptors", + "escapedName": "object.getownpropertydescriptors", + "rawSpec": "^2.0.3", + "saveSpec": null, + "fetchSpec": "^2.0.3" + }, + "_requiredBy": [ + "/util-promisify" + ], + "_resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "_shasum": "8758c846f5b407adab0f236e0986f14b051caa16", + "_spec": "object.getownpropertydescriptors@^2.0.3", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/util-promisify", + "author": { + "name": "Jordan Harband" + }, + "bugs": { + "url": "https://github.com/ljharb/object.getownpropertydescriptors/issues" + }, + "bundleDependencies": false, + "dependencies": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + }, + "deprecated": false, + "description": "ES2017 spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5.", + "devDependencies": { + "@es-shims/api": "^1.2.0", + "@ljharb/eslint-config": "^6.0.0", + "covert": "^1.1.0", + "eslint": "^3.1.1", + "jscs": "^3.0.7", + "nsp": "^2.6.1", + "replace": "^0.3.0", + "semver": "^5.3.0", + "tape": "^4.6.0" + }, + "engines": { + "node": ">= 0.8" + }, + "homepage": "https://github.com/ljharb/object.getownpropertydescriptors#readme", + "keywords": [ + "Object.getOwnPropertyDescriptors", + "descriptor", + "property descriptor", + "ES8", + "ES2017", + "shim", + "polyfill", + "getOwnPropertyDescriptor", + "es-shim API" + ], + "license": "MIT", + "main": "index.js", + "name": "object.getownpropertydescriptors", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object.getownpropertydescriptors.git" + }, + "scripts": { + "coverage": "covert test/*.js", + "coverage:quiet": "covert test/*.js --quiet", + "eslint": "eslint test/*.js *.js", + "jscs": "jscs test/*.js *.js", + "lint": "npm run --silent jscs && npm run --silent eslint", + "posttest": "npm run --silent security", + "pretest": "npm run --silent lint && es-shim-api", + "security": "nsp check", + "test": "npm run --silent tests-only", + "test:module": "node test/index.js", + "test:shimmed": "node test/shimmed.js", + "tests-only": "npm run --silent test:shimmed && npm run --silent test:module" + }, + "testling": { + "files": [ + "test/index.js", + "test/shimmed.js" + ], + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/5.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/12.0..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "version": "2.0.3" +} diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/polyfill.js b/deps/npm/node_modules/object.getownpropertydescriptors/polyfill.js new file mode 100644 index 00000000000000..0424acfb1c862f --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/polyfill.js @@ -0,0 +1,7 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation; +}; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/shim.js b/deps/npm/node_modules/object.getownpropertydescriptors/shim.js new file mode 100644 index 00000000000000..799c7d3c2477a8 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var getPolyfill = require('./polyfill'); +var define = require('define-properties'); + +module.exports = function shimGetOwnPropertyDescriptors() { + var polyfill = getPolyfill(); + define( + Object, + { getOwnPropertyDescriptors: polyfill }, + { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill; } } + ); + return polyfill; +}; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/test/.eslintrc b/deps/npm/node_modules/object.getownpropertydescriptors/test/.eslintrc new file mode 100644 index 00000000000000..e9ca97953e783d --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/test/.eslintrc @@ -0,0 +1,8 @@ +{ + "rules": { + "max-nested-callbacks": [2, 3], + "max-statements": [2, 15], + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": [1] + } +} diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/test/index.js b/deps/npm/node_modules/object.getownpropertydescriptors/test/index.js new file mode 100644 index 00000000000000..618a205064d935 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var getDescriptors = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad object/this value', function (st) { + st.throws(function () { return getDescriptors(undefined); }, TypeError, 'undefined is not an object'); + st.throws(function () { return getDescriptors(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(getDescriptors, t); + + t.end(); +}); diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/test/shimmed.js b/deps/npm/node_modules/object.getownpropertydescriptors/test/shimmed.js new file mode 100644 index 00000000000000..c9af4c1d3853f7 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/test/shimmed.js @@ -0,0 +1,35 @@ +'use strict'; + +var getDescriptors = require('../'); +getDescriptors.shim(); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var runTests = require('./tests'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = function f() {}.name === 'f'; + +test('shimmed', function (t) { + t.equal(Object.getOwnPropertyDescriptors.length, 1, 'Object.getOwnPropertyDescriptors has a length of 1'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(Object.getOwnPropertyDescriptors.name, 'getOwnPropertyDescriptors', 'Object.getOwnPropertyDescriptors has name "getOwnPropertyDescriptors"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Object, 'getOwnPropertyDescriptors'), 'Object.getOwnPropertyDescriptors is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad object/this value', { skip: !supportsStrictMode }, function (st) { + st.throws(function () { return getDescriptors(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st.throws(function () { return getDescriptors(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(Object.getOwnPropertyDescriptors, t); + + t.end(); +}); diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/test/tests.js b/deps/npm/node_modules/object.getownpropertydescriptors/test/tests.js new file mode 100644 index 00000000000000..b9aa29edf71cb0 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/test/tests.js @@ -0,0 +1,127 @@ +'use strict'; + +module.exports = function (getDescriptors, t) { + var enumDescriptor = { + configurable: true, + enumerable: false, + value: true, + writable: false + }; + var writableDescriptor = { + configurable: true, + enumerable: true, + value: 42, + writable: true + }; + + t.test('works with Object.prototype poisoned setter', { skip: !Object.defineProperty }, function (st) { + var key = 'foo'; + + var obj = {}; + obj[key] = 42; + + var expected = {}; + expected[key] = { + configurable: true, + enumerable: true, + value: 42, + writable: true + }; + + /* eslint-disable no-extend-native, accessor-pairs */ + Object.defineProperty(Object.prototype, key, { configurable: true, set: function (v) { throw new Error(v); } }); + /* eslint-enable no-extend-native, accessor-pairs */ + + var hasOwnNamesBug = false; + try { + Object.getOwnPropertyNames(obj); + } catch (e) { + // v8 in node 0.6 - 0.12 has a bug :-( + hasOwnNamesBug = true; + st.comment('SKIP: this engine has a bug with Object.getOwnPropertyNames: it can not handle a throwing setter on Object.prototype.'); + } + + if (!hasOwnNamesBug) { + st.doesNotThrow(function () { + var result = getDescriptors(obj); + st.deepEqual(result, expected, 'got expected descriptors'); + }); + } + + /* eslint-disable no-extend-native */ + delete Object.prototype[key]; + /* eslint-enable no-extend-native */ + st.end(); + }); + + t.test('gets all expected non-Symbol descriptors', function (st) { + var obj = { normal: Infinity }; + Object.defineProperty(obj, 'enumerable', enumDescriptor); + Object.defineProperty(obj, 'writable', writableDescriptor); + + var descriptors = getDescriptors(obj); + + st.deepEqual(descriptors, { + enumerable: enumDescriptor, + normal: { + configurable: true, + enumerable: true, + value: Infinity, + writable: true + }, + writable: writableDescriptor + }); + st.end(); + }); + + var supportsSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; + t.test('gets Symbol descriptors too', { skip: !supportsSymbols }, function (st) { + var symbol = Symbol(); + var symDescriptor = { + configurable: false, + enumerable: true, + value: [symbol], + writable: true + }; + var obj = { normal: Infinity }; + Object.defineProperty(obj, 'enumerable', enumDescriptor); + Object.defineProperty(obj, 'writable', writableDescriptor); + Object.defineProperty(obj, 'symbol', symDescriptor); + + var descriptors = getDescriptors(obj); + + st.deepEqual(descriptors, { + enumerable: enumDescriptor, + normal: { + configurable: true, + enumerable: true, + value: Infinity, + writable: true + }, + symbol: symDescriptor, + writable: writableDescriptor + }); + st.end(); + }); + + /* global Proxy */ + var supportsProxy = typeof Proxy === 'function'; + t.test('Proxies that return an undefined descriptor', { skip: !supportsProxy }, function (st) { + var obj = { foo: true }; + var fooDescriptor = Object.getOwnPropertyDescriptor(obj, 'foo'); + + var proxy = new Proxy(obj, { + getOwnPropertyDescriptor: function (target, key) { + return Object.getOwnPropertyDescriptor(target, key); + }, + ownKeys: function () { + return [ + 'foo', + 'bar' + ]; + } + }); + st.deepEqual(getDescriptors(proxy), { foo: fooDescriptor }, 'object has no descriptors'); + st.end(); + }); +}; diff --git a/deps/npm/node_modules/pacote/CHANGELOG.md b/deps/npm/node_modules/pacote/CHANGELOG.md index 1c8feb9a793773..433c0f470f51c0 100644 --- a/deps/npm/node_modules/pacote/CHANGELOG.md +++ b/deps/npm/node_modules/pacote/CHANGELOG.md @@ -2,6 +2,18 @@ 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. + +## [9.5.1](https://github.com/zkat/pacote/compare/v9.5.0...v9.5.1) (2019-06-17) + + +### Bug Fixes + +* **audit:** npm audit fix ([127a28b](https://github.com/zkat/pacote/commit/127a28b)) +* **errors:** Fix "TypeError: err.code.match is not a function" error ([#170](https://github.com/zkat/pacote/issues/170)) ([92f5e4c](https://github.com/zkat/pacote/commit/92f5e4c)) +* **git:** limit retry times, avoid unlimited retries ([#172](https://github.com/zkat/pacote/issues/172)) ([8bbd051](https://github.com/zkat/pacote/commit/8bbd051)) + + + # [9.5.0](https://github.com/zkat/pacote/compare/v9.4.1...v9.5.0) (2019-02-18) diff --git a/deps/npm/node_modules/pacote/lib/util/git.js b/deps/npm/node_modules/pacote/lib/util/git.js index 997404dd23cbdb..7991833abed0e3 100644 --- a/deps/npm/node_modules/pacote/lib/util/git.js +++ b/deps/npm/node_modules/pacote/lib/util/git.js @@ -40,8 +40,10 @@ const GIT_TRANSIENT_ERRORS = [ const GIT_TRANSIENT_ERROR_RE = new RegExp(GIT_TRANSIENT_ERRORS) -function shouldRetry (error) { - return GIT_TRANSIENT_ERROR_RE.test(error) +const GIT_TRANSIENT_ERROR_MAX_RETRY_NUMBER = 3 + +function shouldRetry (error, number) { + return GIT_TRANSIENT_ERROR_RE.test(error) && (number < GIT_TRANSIENT_ERROR_MAX_RETRY_NUMBER) } const GIT_ = 'GIT_' @@ -188,7 +190,7 @@ function execGit (gitArgs, gitOpts, opts) { opts.log.silly('pacote', 'Retrying git command: ' + gitArgs.join(' ') + ' attempt # ' + number) } return execFileAsync(gitPath, gitArgs, mkOpts(gitOpts, opts)).catch((err) => { - if (shouldRetry(err)) { + if (shouldRetry(err, number)) { retry(err) } else { throw err @@ -219,7 +221,7 @@ function spawnGit (gitArgs, gitOpts, opts) { child.stderr.on('data', d => { stderr += d }) return finished(child, true).catch(err => { - if (shouldRetry(stderr)) { + if (shouldRetry(stderr, number)) { retry(err) } else { err.stderr = stderr diff --git a/deps/npm/node_modules/pacote/lib/with-tarball-stream.js b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js index abeba738a1c664..0d84696d66932b 100644 --- a/deps/npm/node_modules/pacote/lib/with-tarball-stream.js +++ b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js @@ -107,7 +107,7 @@ function withTarballStream (spec, opts, streamHandler) { // Retry once if we have a cache, to clear up any weird conditions. // Don't retry network errors, though -- make-fetch-happen has already // taken care of making sure we're all set on that front. - if (opts.cache && err.code && !err.code.match(/^E\d{3}$/)) { + if (opts.cache && err.code && !String(err.code).match(/^E\d{3}$/)) { if (err.code === 'EINTEGRITY' || err.code === 'Z_DATA_ERROR') { opts.log.warn('tarball', `tarball data for ${spec} (${opts.integrity}) seems to be corrupted. Trying one more time.`) } diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json index 896afe5a77dd24..2fd3d4151f4e3a 100644 --- a/deps/npm/node_modules/pacote/package.json +++ b/deps/npm/node_modules/pacote/package.json @@ -1,21 +1,21 @@ { - "_from": "pacote@latest", - "_id": "pacote@9.5.0", + "_from": "pacote@^9.5.1", + "_id": "pacote@9.5.1", "_inBundle": false, - "_integrity": "sha512-aUplXozRbzhaJO48FaaeClmN+2Mwt741MC6M3bevIGZwdCaP7frXzbUOfOWa91FPHoLITzG0hYaKY363lxO3bg==", + "_integrity": "sha512-Zqvczvf/zZ7QNosdE9uTC7SRuvSs9tFqRkF6cJl+2HH7COBnx4BRAGpeXJlrbN+mM0CMHpbi620xdEHhCflghA==", "_location": "/pacote", "_phantomChildren": { "safe-buffer": "5.1.2" }, "_requested": { - "type": "tag", + "type": "range", "registry": true, - "raw": "pacote@latest", + "raw": "pacote@^9.5.1", "name": "pacote", "escapedName": "pacote", - "rawSpec": "latest", + "rawSpec": "^9.5.1", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "^9.5.1" }, "_requiredBy": [ "#USER", @@ -23,10 +23,10 @@ "/libcipm", "/libnpm" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.0.tgz", - "_shasum": "85f3013a3f6dd51c108b0ccabd3de8102ddfaeda", - "_spec": "pacote@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.1.tgz", + "_shasum": "adb0d23daeef6d0b813ab5891d0c6459ccec998d", + "_spec": "pacote@^9.5.1", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -79,12 +79,12 @@ "devDependencies": { "nock": "^10.0.3", "npmlog": "^4.1.2", - "nyc": "^13.1.0", + "nyc": "^14.1.1", "require-inject": "^1.4.3", "standard": "^12.0.1", "standard-version": "^4.4.0", "tacks": "^1.2.7", - "tap": "^12.1.0", + "tap": "^12.7.0", "tar-stream": "^1.6.2", "weallbehave": "^1.2.0", "weallcontribute": "^1.0.7" @@ -116,5 +116,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": "9.5.0" + "version": "9.5.1" } diff --git a/deps/npm/node_modules/psl/.eslintrc b/deps/npm/node_modules/psl/.eslintrc new file mode 100644 index 00000000000000..ebbcf70bf8531a --- /dev/null +++ b/deps/npm/node_modules/psl/.eslintrc @@ -0,0 +1,11 @@ +{ + "rules": { + "indent": [ 2, 2 ], + "padding-line-between-statements": "off", + "hapi/hapi-no-var": false + }, + "extends": "hapi", + "env": { + "mocha": true + } +} diff --git a/deps/npm/node_modules/qs/.eslintrc b/deps/npm/node_modules/qs/.eslintrc new file mode 100644 index 00000000000000..b7a87b93dfd730 --- /dev/null +++ b/deps/npm/node_modules/qs/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": 0, + "consistent-return": 1, + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], + "indent": [2, 4], + "max-params": [2, 12], + "max-statements": [2, 45], + "no-continue": 1, + "no-magic-numbers": 0, + "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": [2, "before"], + } +} diff --git a/deps/npm/node_modules/qs/test/.eslintrc b/deps/npm/node_modules/qs/test/.eslintrc new file mode 100644 index 00000000000000..20175d64d9dbf7 --- /dev/null +++ b/deps/npm/node_modules/qs/test/.eslintrc @@ -0,0 +1,15 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "consistent-return": 2, + "max-lines": 0, + "max-nested-callbacks": [2, 3], + "max-statements": 0, + "no-buffer-constructor": 0, + "no-extend-native": 0, + "no-magic-numbers": 0, + "object-curly-newline": 0, + "sort-keys": 0 + } +} diff --git a/deps/npm/node_modules/query-string/index.d.ts b/deps/npm/node_modules/query-string/index.d.ts new file mode 100644 index 00000000000000..90b3658aee1088 --- /dev/null +++ b/deps/npm/node_modules/query-string/index.d.ts @@ -0,0 +1,143 @@ +export interface ParseOptions { + /** + * Decode the keys and values. URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). + * + * @default true + */ + readonly decode?: boolean; + + /** + * @default 'none' + * + * - `bracket`: Parse arrays with bracket representation: + * + * + * queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); + * //=> foo: [1, 2, 3] + * + * - `index`: Parse arrays with index representation: + * + * + * queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); + * //=> foo: [1, 2, 3] + * + * - `comma`: Parse arrays with elements separated by comma: + * + * + * queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); + * //=> foo: [1, 2, 3] + * + * - `none`: Parse arrays with elements using duplicate keys: + * + * + * queryString.parse('foo=1&foo=2&foo=3'); + * //=> foo: [1, 2, 3] + */ + readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'none'; +} + +export interface ParsedQuery { + readonly [key: string]: string | string[] | null | undefined; +} + +/** + * Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. + * + * The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. + * + * @param query - The query string to parse. + */ +export function parse(query: string, options?: ParseOptions): ParsedQuery; + +export interface ParsedUrl { + readonly url: string; + readonly query: ParsedQuery; +} + +/** + * Extract the URL and the query string as an object. + * + * @param url - The URL to parse. + * + * @example + * + * queryString.parseUrl('https://foo.bar?foo=bar'); + * //=> {url: 'https://foo.bar', query: {foo: 'bar'}} + */ +export function parseUrl(url: string, options?: ParseOptions): ParsedUrl; + +export interface StringifyOptions { + /** + * Strictly encode URI components with [`strict-uri-encode`](https://github.com/kevva/strict-uri-encode). It uses [`encodeURIComponent`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to `false`. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. + * + * @default true + */ + readonly strict?: boolean; + + /** + * [URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. + * + * @default true + */ + readonly encode?: boolean; + + /** + * @default 'none' + * + * - `bracket`: Serialize arrays using bracket representation: + * + * + * queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); + * //=> 'foo[]=1&foo[]=2&foo[]=3' + * + * - `index`: Serialize arrays using index representation: + * + * + * queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); + * //=> 'foo[0]=1&foo[1]=2&foo[3]=3' + * + * - `comma`: Serialize arrays by separating elements with comma: + * + * + * queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); + * //=> 'foo=1,2,3' + * + * - `none`: Serialize arrays by using duplicate keys: + * + * + * queryString.stringify({foo: [1, 2, 3]}); + * //=> 'foo=1&foo=2&foo=3' + */ + readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'none'; + + /** + * Supports both `Function` as a custom sorting function or `false` to disable sorting. + * + * If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. + * + * @example + * + * const order = ['c', 'a', 'b']; + * queryString.stringify({a: 1, b: 2, c: 3}, { + * sort: (itemLeft, itemRight) => order.indexOf(itemLeft) - order.indexOf(itemRight) + * }); + * // => 'c=3&a=1&b=2' + * + * queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); + * // => 'b=1&c=2&a=3' + */ + readonly sort?: ((itemLeft: string, itemRight: string) => number) | false; +} + +/** + * Stringify an object into a query string and sorting the keys. + */ +export function stringify( + object: {[key: string]: unknown}, + options?: StringifyOptions +): string; + +/** + * Extract a query string from a URL that can be passed into `.parse()`. + */ +export function extract(url: string): string; diff --git a/deps/npm/node_modules/query-string/index.js b/deps/npm/node_modules/query-string/index.js index 6a1b3c2a30eb64..3cb1adf8d30450 100644 --- a/deps/npm/node_modules/query-string/index.js +++ b/deps/npm/node_modules/query-string/index.js @@ -5,35 +5,59 @@ const decodeComponent = require('decode-uri-component'); function encoderForArrayFormat(options) { switch (options.arrayFormat) { case 'index': - return (key, value, index) => { - return value === null ? [ - encode(key, options), - '[', - index, - ']' - ].join('') : [ - encode(key, options), - '[', - encode(index, options), - ']=', - encode(value, options) - ].join(''); + return key => (result, value) => { + const index = result.length; + if (value === undefined) { + return result; + } + + if (value === null) { + return [...result, [encode(key, options), '[', index, ']'].join('')]; + } + + return [ + ...result, + [encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('') + ]; }; + case 'bracket': - return (key, value) => { - return value === null ? [encode(key, options), '[]'].join('') : [ - encode(key, options), - '[]=', - encode(value, options) - ].join(''); + return key => (result, value) => { + if (value === undefined) { + return result; + } + + if (value === null) { + return [...result, [encode(key, options), '[]'].join('')]; + } + + return [...result, [encode(key, options), '[]=', encode(value, options)].join('')]; + }; + + case 'comma': + return key => (result, value, index) => { + if (!value) { + return result; + } + + if (index === 0) { + return [[encode(key, options), '=', encode(value, options)].join('')]; + } + + return [[result, encode(value, options)].join(',')]; }; + default: - return (key, value) => { - return value === null ? encode(key, options) : [ - encode(key, options), - '=', - encode(value, options) - ].join(''); + return key => (result, value) => { + if (value === undefined) { + return result; + } + + if (value === null) { + return [...result, encode(key, options)]; + } + + return [...result, [encode(key, options), '=', encode(value, options)].join('')]; }; } } @@ -59,6 +83,7 @@ function parserForArrayFormat(options) { accumulator[key][result[1]] = value; }; + case 'bracket': return (key, value, accumulator) => { result = /(\[\])$/.exec(key); @@ -76,6 +101,14 @@ function parserForArrayFormat(options) { accumulator[key] = [].concat(accumulator[key], value); }; + + case 'comma': + return (key, value, accumulator) => { + const isArray = typeof value === 'string' && value.split('').indexOf(',') > -1; + const newValue = isArray ? value.split(',') : value; + accumulator[key] = newValue; + }; + default: return (key, value, accumulator) => { if (accumulator[key] === undefined) { @@ -128,7 +161,10 @@ function extract(input) { } function parse(input, options) { - options = Object.assign({decode: true, arrayFormat: 'none'}, options); + options = Object.assign({ + decode: true, + arrayFormat: 'none' + }, options); const formatter = parserForArrayFormat(options); @@ -171,8 +207,8 @@ function parse(input, options) { exports.extract = extract; exports.parse = parse; -exports.stringify = (obj, options) => { - if (!obj) { +exports.stringify = (object, options) => { + if (!object) { return ''; } @@ -183,14 +219,14 @@ exports.stringify = (obj, options) => { }, options); const formatter = encoderForArrayFormat(options); - const keys = Object.keys(obj); + const keys = Object.keys(object); if (options.sort !== false) { keys.sort(options.sort); } return keys.map(key => { - const value = obj[key]; + const value = object[key]; if (value === undefined) { return ''; @@ -201,17 +237,9 @@ exports.stringify = (obj, options) => { } if (Array.isArray(value)) { - const result = []; - - for (const value2 of value.slice()) { - if (value2 === undefined) { - continue; - } - - result.push(formatter(key, value2, result.length)); - } - - return result.join('&'); + return value + .reduce(formatter(key), []) + .join('&'); } return encode(key, options) + '=' + encode(value, options); diff --git a/deps/npm/node_modules/query-string/package.json b/deps/npm/node_modules/query-string/package.json index 8f9b91b4fba931..cd62b3cf54fba2 100644 --- a/deps/npm/node_modules/query-string/package.json +++ b/deps/npm/node_modules/query-string/package.json @@ -1,27 +1,27 @@ { - "_from": "query-string@6.2.0", - "_id": "query-string@6.2.0", + "_from": "query-string@6.4.0", + "_id": "query-string@6.4.0", "_inBundle": false, - "_integrity": "sha512-5wupExkIt8RYL4h/FE+WTg3JHk62e6fFPWtAZA9J5IWK1PfTfKkMS93HBUHcFpeYi9KsY5pFbh+ldvEyaz5MyA==", + "_integrity": "sha512-Werid2I41/tJTqOGPJ3cC3vwrIh/8ZupBQbp7BSsqXzr+pTin3aMJ/EZb8UEuk7ZO3VqQFvq2qck/ihc6wqIdw==", "_location": "/query-string", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "query-string@6.2.0", + "raw": "query-string@6.4.0", "name": "query-string", "escapedName": "query-string", - "rawSpec": "6.2.0", + "rawSpec": "6.4.0", "saveSpec": null, - "fetchSpec": "6.2.0" + "fetchSpec": "6.4.0" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.2.0.tgz", - "_shasum": "468edeb542b7e0538f9f9b1aeb26f034f19c86e1", - "_spec": "query-string@6.2.0", + "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.4.0.tgz", + "_shasum": "1566c0cec3a2da2d82c222ed3f9e2a921dba5e6a", + "_spec": "query-string@6.4.0", "_where": "/Users/aeschright/code/cli", "author": { "name": "Sindre Sorhus", @@ -39,16 +39,18 @@ "deprecated": false, "description": "Parse and stringify URL query strings", "devDependencies": { - "ava": "^0.25.0", + "ava": "^1.3.1", "deep-equal": "^1.0.1", "fast-check": "^1.5.0", - "xo": "^0.23.0" + "tsd-check": "^0.3.0", + "xo": "^0.24.0" }, "engines": { "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/query-string#readme", "keywords": [ @@ -73,7 +75,7 @@ "url": "git+https://github.com/sindresorhus/query-string.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd-check" }, - "version": "6.2.0" + "version": "6.4.0" } diff --git a/deps/npm/node_modules/query-string/readme.md b/deps/npm/node_modules/query-string/readme.md index 5fa1cfbde4306a..fda9323cdecf93 100644 --- a/deps/npm/node_modules/query-string/readme.md +++ b/deps/npm/node_modules/query-string/readme.md @@ -2,12 +2,6 @@ > Parse and stringify URL [query strings](https://en.wikipedia.org/wiki/Query_string) ---- - -

    🔥 Want to strengthen your core JavaScript skills and master ES6?
    I would personally recommend this awesome ES6 course by Wes Bos.
    Also check out his Node.js, React, Sublime courses.

    - ---- - ## Install @@ -15,7 +9,7 @@ $ npm install query-string ``` -This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, or, [if your project is using create-react-app](https://github.com/sindresorhus/query-string/pull/148#issuecomment-399656020), use version 5: `npm install query-string@5`. +This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, or, [if your project is using create-react-app v1](https://github.com/sindresorhus/query-string/pull/148#issuecomment-399656020), use version 5: `npm install query-string@5`. @@ -56,120 +50,138 @@ console.log(location.search); ## API -### .parse(*string*, *[options]*) +### .parse(string, [options]) Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. -#### decode +#### options + +Type: `Object` + +##### decode Type: `boolean`
    Default: `true` -Decode the keys and values. URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). +Decode the keys and values. URL components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). -#### arrayFormat +##### arrayFormat Type: `string`
    -Default: `'none'` - -Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation. +Default: `none` -- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as: +- `bracket`: Parse arrays with bracket representation: ```js queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); -//=> foo: [1,2,3] +//=> foo: [1, 2, 3] ``` -- `index`: stands for parsing taking the index into account, such as: +- `index`: Parse arrays with index representation: ```js queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); -//=> foo: [1,2,3] +//=> foo: [1, 2, 3] +``` + +- `comma`: Parse arrays with elements separated by comma: + +```js +queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); +//=> foo: [1, 2, 3] ``` -- `none`: is the **default** option and removes any bracket representation, such as: +- `none`: Parse arrays with elements using duplicate keys: ```js queryString.parse('foo=1&foo=2&foo=3'); -//=> foo: [1,2,3] +//=> foo: [1, 2, 3] ``` -### .stringify(*object*, *[options]*) +### .stringify(object, [options]) + +Stringify an object into a query string and sorting the keys. + +#### options -Stringify an object into a query string, sorting the keys. +Type: `Object` -#### strict +##### strict Type: `boolean`
    Default: `true` -Strictly encode URI components with [strict-uri-encode](https://github.com/kevva/strict-uri-encode). It uses [encodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) -if set to false. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. +Strictly encode URI components with [strict-uri-encode](https://github.com/kevva/strict-uri-encode). It uses [encodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to false. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. -#### encode +##### encode Type: `boolean`
    Default: `true` [URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. -#### arrayFormat +##### arrayFormat Type: `string`
    -Default: `'none'` +Default: `none` -Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation. +- `bracket`: Serialize arrays using bracket representation: -- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as: +```js +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); +//=> 'foo[]=1&foo[]=2&foo[]=3' +``` + +- `index`: Serialize arrays using index representation: ```js -queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'bracket'}); -// => foo[]=1&foo[]=2&foo[]=3 +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); +//=> 'foo[0]=1&foo[1]=2&foo[3]=3' ``` -- `index`: stands for parsing taking the index into account, such as: +- `comma`: Serialize arrays by separating elements with comma: ```js -queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'index'}); -// => foo[0]=1&foo[1]=2&foo[3]=3 +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); +//=> 'foo=1,2,3' ``` -- `none`: is the __default__ option and removes any bracket representation, such as: +- `none`: Serialize arrays by using duplicate keys: ```js -queryString.stringify({foo: [1,2,3]}); -// => foo=1&foo=2&foo=3 +queryString.stringify({foo: [1, 2, 3]}); +//=> 'foo=1&foo=2&foo=3' ``` -#### sort +##### sort -Type: `Function` `boolean` +Type: `Function | boolean` Supports both `Function` as a custom sorting function or `false` to disable sorting. ```js const order = ['c', 'a', 'b']; -queryString.stringify({ a: 1, b: 2, c: 3}, { - sort: (m, n) => order.indexOf(m) >= order.indexOf(n) + +queryString.stringify({a: 1, b: 2, c: 3}, { + sort: (a, b) => order.indexOf(a) - order.indexOf(b) }); -// => 'c=3&a=1&b=2' +//=> 'c=3&a=1&b=2' ``` ```js -queryString.stringify({ b: 1, c: 2, a: 3}, {sort: false}); -// => 'c=3&a=1&b=2' +queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); +//=> 'b=1&c=2&a=3' ``` -If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. +If omitted, keys are sorted using `Array#sort()`, which means, converting them to strings and comparing strings in Unicode code point order. -### .extract(*string*) +### .extract(string) Extract a query string from a URL that can be passed into `.parse()`. -### .parseUrl(*string*, *[options]*) +### .parseUrl(string, [options]) Extract the URL and the query string as an object. diff --git a/deps/npm/node_modules/read-package-tree/README.md b/deps/npm/node_modules/read-package-tree/README.md index c8edffd2bcc2e4..aa0cc934cf47e7 100644 --- a/deps/npm/node_modules/read-package-tree/README.md +++ b/deps/npm/node_modules/read-package-tree/README.md @@ -29,6 +29,9 @@ rpt('/path/to/pkg/root', function (node, kidName) { // error: // } }) + +// or promise-style +rpt('/path/to/pkg/root').then(data => { ... }) ``` That's it. It doesn't figure out if dependencies are met, it doesn't diff --git a/deps/npm/node_modules/read-package-tree/package.json b/deps/npm/node_modules/read-package-tree/package.json index 948f096620033a..2173171af80ff6 100644 --- a/deps/npm/node_modules/read-package-tree/package.json +++ b/deps/npm/node_modules/read-package-tree/package.json @@ -1,8 +1,8 @@ { "_from": "read-package-tree@latest", - "_id": "read-package-tree@5.2.2", + "_id": "read-package-tree@5.3.1", "_inBundle": false, - "_integrity": "sha512-rW3XWUUkhdKmN2JKB4FL563YAgtINifso5KShykufR03nJ5loGFlkUMe1g/yxmqX073SoYYTsgXu7XdDinKZuA==", + "_integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", "_location": "/read-package-tree", "_phantomChildren": {}, "_requested": { @@ -20,10 +20,10 @@ "/", "/licensee" ], - "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.2.2.tgz", - "_shasum": "4b6a0ef2d943c1ea36a578214c9a7f6b7424f7a8", + "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", + "_shasum": "a32cb64c7f31eb8a6f31ef06f9cedf74068fe636", "_spec": "read-package-tree@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -34,11 +34,9 @@ }, "bundleDependencies": false, "dependencies": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "once": "^1.3.0", "read-package-json": "^2.0.0", - "readdir-scoped-modules": "^1.0.0" + "readdir-scoped-modules": "^1.0.0", + "util-promisify": "^2.1.0" }, "deprecated": false, "description": "Read the contents of node_modules.", @@ -46,13 +44,14 @@ "archy": "^1.0.0", "mkdirp": "^0.5.1", "tacks": "^1.2.1", - "tap": "^12.5.2" + "tap": "^12.7.0" }, "directories": { "test": "test" }, "files": [ - "rpt.js" + "rpt.js", + "realpath.js" ], "homepage": "https://github.com/npm/read-package-tree", "license": "ISC", @@ -63,7 +62,14 @@ "url": "git+https://github.com/npm/read-package-tree.git" }, "scripts": { - "test": "tap test/*.js" + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "snap": "TAP_SNAPSHOT=1 tap test/*.js --100", + "test": "tap test/*.js --100" }, - "version": "5.2.2" + "tap": { + "100": true + }, + "version": "5.3.1" } diff --git a/deps/npm/node_modules/read-package-tree/realpath.js b/deps/npm/node_modules/read-package-tree/realpath.js new file mode 100644 index 00000000000000..70c666064ec894 --- /dev/null +++ b/deps/npm/node_modules/read-package-tree/realpath.js @@ -0,0 +1,94 @@ +// look up the realpath, but cache stats to minimize overhead +// If the parent folder is in the realpath cache, then we just +// lstat the child, since there's no need to do a full realpath +// This is not a separate module, and is much simpler than Node's +// built-in fs.realpath, because we only care about symbolic links, +// so we can handle many fewer edge cases. + +const fs = require('fs') +/* istanbul ignore next */ +const promisify = require('util').promisify || require('util-promisify') +const readlink = promisify(fs.readlink) +const lstat = promisify(fs.lstat) +const { resolve, basename, dirname } = require('path') + +const realpathCached = (path, rpcache, stcache, depth) => { + // just a safety against extremely deep eloops + /* istanbul ignore next */ + if (depth > 2000) + throw eloop(path) + + path = resolve(path) + if (rpcache.has(path)) + return Promise.resolve(rpcache.get(path)) + + const dir = dirname(path) + const base = basename(path) + + if (base && rpcache.has(dir)) + return realpathChild(dir, base, rpcache, stcache, depth) + + // if it's the root, then we know it's real + if (!base) { + rpcache.set(dir, dir) + return Promise.resolve(dir) + } + + // the parent, what is that? + // find out, and then come back. + return realpathCached(dir, rpcache, stcache, depth + 1).then(() => + realpathCached(path, rpcache, stcache, depth + 1)) +} + +const lstatCached = (path, stcache) => { + if (stcache.has(path)) + return Promise.resolve(stcache.get(path)) + + const p = lstat(path).then(st => { + stcache.set(path, st) + return st + }) + stcache.set(path, p) + return p +} + +// This is a slight fib, as it doesn't actually occur during a stat syscall. +// But file systems are giant piles of lies, so whatever. +const eloop = path => + Object.assign(new Error( + `ELOOP: too many symbolic links encountered, stat '${path}'`), { + errno: -62, + syscall: 'stat', + code: 'ELOOP', + path: path, + }) + +const realpathChild = (dir, base, rpcache, stcache, depth) => { + const realdir = rpcache.get(dir) + // that unpossible + /* istanbul ignore next */ + if (typeof realdir === 'undefined') + throw new Error('in realpathChild without parent being in realpath cache') + + const realish = resolve(realdir, base) + return lstatCached(realish, stcache).then(st => { + if (!st.isSymbolicLink()) { + rpcache.set(resolve(dir, base), realish) + return realish + } + + let res + return readlink(realish).then(target => { + const resolved = res = resolve(realdir, target) + if (realish === resolved) + throw eloop(realish) + + return realpathCached(resolved, rpcache, stcache, depth + 1) + }).then(real => { + rpcache.set(resolve(dir, base), real) + return real + }) + }) +} + +module.exports = realpathCached diff --git a/deps/npm/node_modules/read-package-tree/rpt.js b/deps/npm/node_modules/read-package-tree/rpt.js index fd43be9c22c0c3..b12a09dfb3b202 100644 --- a/deps/npm/node_modules/read-package-tree/rpt.js +++ b/deps/npm/node_modules/read-package-tree/rpt.js @@ -1,249 +1,169 @@ -var fs = require('fs') -var rpj = require('read-package-json') -var path = require('path') -var dz = require('dezalgo') -var once = require('once') -var readdir = require('readdir-scoped-modules') -var debug = require('debuglog')('rpt') - -function asyncForEach (items, todo, done) { - var remaining = items.length - if (remaining === 0) return done() - var seenErr - items.forEach(function (item) { - todo(item, handleComplete) - }) - function handleComplete (err) { - if (seenErr) return - if (err) { - seenErr = true - return done(err) - } - if (--remaining === 0) done() +const fs = require('fs') +/* istanbul ignore next */ +const promisify = require('util').promisify || require('util-promisify') +const { resolve, basename, dirname, join } = require('path') +const rpj = promisify(require('read-package-json')) +const readdir = promisify(require('readdir-scoped-modules')) +const realpath = require('./realpath.js') + +let ID = 0 +class Node { + constructor (pkg, logical, physical, er, cache) { + // should be impossible. + const cached = cache.get(physical) + /* istanbul ignore next */ + if (cached && !cached.then) + throw new Error('re-creating already instantiated node') + + cache.set(physical, this) + + const parent = basename(dirname(logical)) + if (parent.charAt(0) === '@') + this.name = `${parent}/${basename(logical)}` + else + this.name = basename(logical) + this.path = logical + this.realpath = physical + this.error = er + this.id = ID++ + this.package = pkg || {} + this.parent = null + this.isLink = false + this.children = [] } } -function dpath (p) { - if (!p) return '' - if (p.indexOf(process.cwd()) === 0) { - p = p.substr(process.cwd().length + 1) +class Link extends Node { + constructor (pkg, logical, physical, realpath, er, cache) { + super(pkg, logical, physical, er, cache) + + // if the target has started, but not completed, then + // a Promise will be in the cache to indicate this. + const cachedTarget = cache.get(realpath) + if (cachedTarget && cachedTarget.then) + cachedTarget.then(node => { + this.target = node + this.children = node.children + }) + + this.target = cachedTarget || new Node(pkg, logical, realpath, er, cache) + this.realpath = realpath + this.isLink = true + this.error = er + this.children = this.target.children } - return p -} - -module.exports = rpt - -rpt.Node = Node -rpt.Link = Link - -var ID = 0 -function Node (pkg, logical, physical, er, cache, fromLink) { - if (!(this instanceof Node)) { - return new Node(pkg, logical, physical, er, cache) - } - - var node = cache[physical] || this - if (fromLink && cache[physical]) return cache[physical] - - debug(node.constructor.name, dpath(physical), pkg && pkg._id) - - const parent = path.basename(path.dirname(logical)) - if (parent[0] === '@') { - node.name = parent + '/' + path.basename(logical) - } else { - node.name = path.basename(logical) - } - node.path = logical - node.realpath = physical - node.error = er - if (!cache[physical]) { - node.id = ID++ - node.package = pkg || {} - node.parent = null - node.isLink = false - node.children = [] - } - return cache[physical] = node } -Node.prototype.package = null -Node.prototype.path = '' -Node.prototype.realpath = '' -Node.prototype.children = null -Node.prototype.error = null - -function Link (pkg, logical, physical, realpath, er, cache) { - if (cache[physical]) return cache[physical] - - if (!(this instanceof Link)) { - return new Link(pkg, logical, physical, realpath, er, cache) - } - - cache[physical] = this - - debug(this.constructor.name, dpath(physical), pkg && pkg._id) - - const parent = path.basename(path.dirname(logical)) - if (parent[0] === '@') { - this.name = parent + '/' + path.basename(logical) - } else { - this.name = path.basename(logical) - } - this.id = ID++ - this.path = logical - this.realpath = realpath - this.package = pkg || {} - this.parent = null - this.target = new Node(this.package, logical, realpath, er, cache, true) - this.isLink = true - this.children = this.target.children - this.error = er -} - -Link.prototype = Object.create(Node.prototype, { - constructor: { value: Link } -}) -Link.prototype.target = null -Link.prototype.realpath = '' - -function loadNode (logical, physical, cache, cb) { - debug('loadNode', dpath(logical)) - return fs.realpath(physical, thenReadPackageJson) - - var realpath - function thenReadPackageJson (er, real) { - if (er) { - var node = new Node(null, logical, physical, er, cache) - return cb(null, node) - } - debug('realpath l=%j p=%j real=%j', dpath(logical), dpath(physical), dpath(real)) - var pj = path.join(real, 'package.json') - realpath = real - return rpj(pj, thenCreateNode) - } - function thenCreateNode (er, pkg) { - pkg = pkg || null - var node - if (physical === realpath) { - node = new Node(pkg, logical, physical, er, cache) - } else { - node = new Link(pkg, logical, physical, realpath, er, cache) - } - - cb(null, node) - } +// this is the way it is to expose a timing issue which is difficult to +// test otherwise. The creation of a Node may take slightly longer than +// the creation of a Link that targets it. If the Node has _begun_ its +// creation phase (and put a Promise in the cache) then the Link will +// get a Promise as its cachedTarget instead of an actual Node object. +// This is not a problem, because it gets resolved prior to returning +// the tree or attempting to load children. However, it IS remarkably +// difficult to get to happen in a test environment to verify reliably. +// Hence this kludge. +const newNode = (pkg, logical, physical, er, cache) => + process.env._TEST_RPT_SLOW_LINK_TARGET_ === '1' + ? new Promise(res => setTimeout(() => + res(new Node(pkg, logical, physical, er, cache)), 10)) + : new Node(pkg, logical, physical, er, cache) + +const loadNode = (logical, physical, cache, rpcache, stcache) => { + // cache temporarily holds a promise placeholder so we + // don't try to create the same node multiple times. + // this is very rare to encounter, given the aggressive + // caching on fs.realpath and fs.lstat calls, but + // it can happen in theory. + const cached = cache.get(physical) + /* istanbul ignore next */ + if (cached) + return Promise.resolve(cached) + + const p = realpath(physical, rpcache, stcache, 0).then(real => + rpj(join(real, 'package.json')) + .then(pkg => [pkg, null], er => [null, er]) + .then(([pkg, er]) => + physical === real ? newNode(pkg, logical, physical, er, cache) + : new Link(pkg, logical, physical, real, er, cache) + ), + // if the realpath fails, don't bother with the rest + er => new Node(null, logical, physical, er, cache)) + + cache.set(physical, p) + return p } -function loadChildren (node, cache, filterWith, cb) { - debug('loadChildren', dpath(node.path)) - // needed 'cause we process all kids async-like and errors - // short circuit, so we have to be sure that after an error - // the cbs from other kids don't result in calling cb a second - // (or more) time. - cb = once(cb) - var nm = path.join(node.path, 'node_modules') - var rm - return fs.realpath(path.join(node.path, 'node_modules'), thenReaddir) - - function thenReaddir (er, real_nm) { - if (er) return cb(null, node) - rm = real_nm - readdir(nm, thenLoadKids) - } - - function thenLoadKids (er, kids) { - // If there are no children, that's fine, just return - if (er) return cb(null, node) - - kids = kids.filter(function (kid) { - return kid[0] !== '.' && (!filterWith || filterWith(node, kid)) +const loadChildren = (node, cache, filterWith, rpcache, stcache) => { + // if a Link target has started, but not completed, then + // a Promise will be in the cache to indicate this. + // + // XXX When we can one day loadChildren on the link *target* instead of + // the link itself, to match real dep resolution, then we may end up with + // a node target in the cache that isn't yet done resolving when we get + // here. For now, though, this line will never be reached, so it's hidden + // + // if (node.then) + // return node.then(node => loadChildren(node, cache, filterWith, rpcache, stcache)) + + const nm = join(node.path, 'node_modules') + return realpath(nm, rpcache, stcache, 0) + .then(rm => readdir(rm).then(kids => [rm, kids])) + .then(([rm, kids]) => Promise.all( + kids.filter(kid => + kid.charAt(0) !== '.' && (!filterWith || filterWith(node, kid))) + .map(kid => loadNode(join(nm, kid), join(rm, kid), cache, rpcache, stcache))) + ).then(kidNodes => { + kidNodes.forEach(k => k.parent = node) + node.children.push.apply(node.children, kidNodes.sort((a, b) => + (a.package.name ? a.package.name.toLowerCase() : a.path) + .localeCompare( + (b.package.name ? b.package.name.toLowerCase() : b.path) + ))) + return node }) - - asyncForEach(kids, thenLoadNode, thenSortChildren) - } - function thenLoadNode (kid, done) { - var kidPath = path.join(nm, kid) - var kidRealPath = path.join(rm, kid) - loadNode(kidPath, kidRealPath, cache, andAddNode(done)) - } - function andAddNode (done) { - return function (er, kid) { - if (er) return done(er) - node.children.push(kid) - kid.parent = node - done() - } - } - function thenSortChildren (er) { - sortChildren(node) - cb(er, node) - } + .catch(() => node) } -function sortChildren (node) { - node.children = node.children.sort(function (a, b) { - a = a.package.name ? a.package.name.toLowerCase() : a.path - b = b.package.name ? b.package.name.toLowerCase() : b.path - return a > b ? 1 : -1 - }) +const loadTree = (node, did, cache, filterWith, rpcache, stcache) => { + // impossible except in pathological ELOOP cases + /* istanbul ignore next */ + if (did.has(node.realpath)) + return Promise.resolve(node) + + did.add(node.realpath) + + // load children on the target, not the link + return loadChildren(node, cache, filterWith, rpcache, stcache) + .then(node => Promise.all( + node.children + .filter(kid => !did.has(kid.realpath)) + .map(kid => loadTree(kid, did, cache, filterWith, rpcache, stcache)) + )).then(() => node) } -function loadTree (node, did, cache, filterWith, cb) { - debug('loadTree', dpath(node.path), !!cache[node.path]) - - if (did[node.realpath]) { - return dz(cb)(null, node) +// XXX Drop filterWith and/or cb in next semver major bump +const rpt = (root, filterWith, cb) => { + if (!cb && typeof filterWith === 'function') { + cb = filterWith + filterWith = null } - did[node.realpath] = true + const cache = new Map() + // we can assume that the cwd is real enough + const cwd = process.cwd() + const rpcache = new Map([[ cwd, cwd ]]) + const stcache = new Map() + const p = realpath(root, rpcache, stcache, 0) + .then(realRoot => loadNode(root, realRoot, cache, rpcache, stcache)) + .then(node => loadTree(node, new Set(), cache, filterWith, rpcache, stcache)) - // needed 'cause we process all kids async-like and errors - // short circuit, so we have to be sure that after an error - // the cbs from other kids don't result in calling cb a second - // (or more) time. - cb = once(cb) - return loadChildren(node, cache, filterWith, thenProcessChildren) - - function thenProcessChildren (er, node) { - if (er) return cb(er) - - var kids = node.children.filter(function (kid) { - return !did[kid.realpath] - }) + if (typeof cb === 'function') + p.then(tree => cb(null, tree), cb) - return asyncForEach(kids, loadTreeForKid, cb) - } - function loadTreeForKid (kid, done) { - loadTree(kid, did, cache, filterWith, done) - } + return p } -function rpt (root, filterWith, cb) { - if (!cb) { - cb = filterWith - filterWith = null - } - var cache = Object.create(null) - var topErr - var tree - return fs.realpath(root, thenLoadNode) - - function thenLoadNode (er, realRoot) { - if (er) return cb(er) - debug('rpt', dpath(realRoot)) - loadNode(root, realRoot, cache, thenLoadTree) - } - function thenLoadTree(er, node) { - // even if there's an error, it's fine, as long as we got a node - if (node) { - topErr = er - tree = node - loadTree(node, {}, cache, filterWith, thenHandleErrors) - } else { - cb(er) - } - } - function thenHandleErrors (er) { - cb(topErr && topErr.code !== 'ENOENT' ? topErr : er, tree) - } -} +rpt.Node = Node +rpt.Link = Link +module.exports = rpt diff --git a/deps/npm/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/README.md index 791576af683ad4..28ccae16165828 100644 --- a/deps/npm/node_modules/readable-stream/README.md +++ b/deps/npm/node_modules/readable-stream/README.md @@ -15,7 +15,7 @@ npm install --save readable-stream This package is a mirror of the streams implementations in Node.js. -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.14.2/docs/api/stream.html). +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.15.3/docs/api/stream.html). If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js index b9b1b742cc594b..33f478d7e8c25a 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js @@ -141,7 +141,8 @@ function ReadableState(options, stream, isDuplex) { this.needReadable = false; this.emittedReadable = false; this.readableListening = false; - this.resumeScheduled = false; // Should close be emitted on destroy. Defaults to true. + this.resumeScheduled = false; + this.paused = true; // Should close be emitted on destroy. Defaults to true. this.emitClose = options.emitClose !== false; // has it been destroyed @@ -543,13 +544,35 @@ function maybeReadMore(stream, state) { } function maybeReadMore_(stream, state) { - var len = state.length; - - while (!state.reading && !state.ended && state.length < state.highWaterMark) { + // Attempt to read more data if we should. + // + // The conditions for reading more data are (one of): + // - Not enough data buffered (state.length < state.highWaterMark). The loop + // is responsible for filling the buffer with enough data if such data + // is available. If highWaterMark is 0 and we are not in the flowing mode + // we should _not_ attempt to buffer any extra data. We'll get more data + // when the stream consumer calls read() instead. + // - No data in the buffer, and the stream is in flowing mode. In this mode + // the loop below is responsible for ensuring read() is called. Failing to + // call read here would abort the flow and there's no other mechanism for + // continuing the flow if the stream consumer has just subscribed to the + // 'data' event. + // + // In addition to the above conditions to keep reading data, the following + // conditions prevent the data from being read: + // - The stream has ended (state.ended). + // - There is already a pending 'read' operation (state.reading). This is a + // case where the the stream has called the implementation defined _read() + // method, but they are processing the call asynchronously and have _not_ + // called push() with new data. In this case we skip performing more + // read()s. The execution ends in this method again after the _read() ends + // up calling push() with more data. + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; debug('maybeReadMore read 0'); stream.read(0); if (len === state.length) // didn't get any data, stop spinning. - break;else len = state.length; + break; } state.readingMore = false; @@ -822,9 +845,14 @@ Readable.prototype.removeAllListeners = function (ev) { }; function updateReadableListening(self) { - self._readableState.readableListening = self.listenerCount('readable') > 0; // crude way to check if we should resume - - if (self.listenerCount('data') > 0) { + var state = self._readableState; + state.readableListening = self.listenerCount('readable') > 0; + + if (state.resumeScheduled && !state.paused) { + // flowing needs to be set to true now, otherwise + // the upcoming resume will not flow. + state.flowing = true; // crude way to check if we should resume + } else if (self.listenerCount('data') > 0) { self.resume(); } } @@ -848,6 +876,7 @@ Readable.prototype.resume = function () { resume(this, state); } + state.paused = false; return this; }; @@ -880,6 +909,7 @@ Readable.prototype.pause = function () { this.emit('pause'); } + this._readableState.paused = true; return this; }; diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js index 9abbad6bc2cbe7..b35447aedc3a95 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js @@ -103,8 +103,8 @@ function WritableState(options, stream, isDuplex) { options = options || {}; // Duplex streams are both readable and writable, but share // the same options object. // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. + // values for the readable and the writable sides of the duplex stream, + // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream // contains buffers or objects. @@ -445,7 +445,7 @@ function onwrite(stream, er) { onwriteStateUpdate(state); if (er) onwriteError(stream, state, sync, er, cb);else { // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); + var finished = needFinish(state) || stream.destroyed; if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { clearBuffer(stream, state); diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js index 79a6e1e11e0101..9fb615a2f3bc44 100644 --- a/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js +++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js @@ -47,6 +47,11 @@ function onReadable(iter) { function wrapForNext(lastPromise, iter) { return function (resolve, reject) { lastPromise.then(function () { + if (iter[kEnded]) { + resolve(createIterResult(undefined, true)); + return; + } + iter[kHandlePromise](resolve, reject); }, reject); }; @@ -70,7 +75,7 @@ var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPro } if (this[kEnded]) { - return Promise.resolve(createIterResult(null, true)); + return Promise.resolve(createIterResult(undefined, true)); } if (this[kStream].destroyed) { @@ -83,7 +88,7 @@ var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPro if (_this[kError]) { reject(_this[kError]); } else { - resolve(createIterResult(null, true)); + resolve(createIterResult(undefined, true)); } }); }); @@ -128,7 +133,7 @@ var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPro return; } - resolve(createIterResult(null, true)); + resolve(createIterResult(undefined, true)); }); }); }), _Object$setPrototypeO), AsyncIteratorPrototype); @@ -151,9 +156,6 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat }), _defineProperty(_Object$create, kEnded, { value: stream._readableState.endEmitted, writable: true - }), _defineProperty(_Object$create, kLastPromise, { - value: null, - writable: true }), _defineProperty(_Object$create, kHandlePromise, { value: function value(resolve, reject) { var data = iterator[kStream].read(); @@ -170,6 +172,7 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat }, writable: true }), _Object$create)); + iterator[kLastPromise] = null; finished(stream, function (err) { if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise @@ -192,7 +195,7 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; - resolve(createIterResult(null, true)); + resolve(createIterResult(undefined, true)); } iterator[kEnded] = true; diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js index cf23d53b5af3a4..831f286d98fa95 100644 --- a/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js @@ -4,27 +4,30 @@ var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; -function noop() {} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - function once(callback) { var called = false; - return function (err) { + return function () { if (called) return; called = true; - callback.call(this, err); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + callback.apply(this, args); }; } +function noop() {} + +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} + function eos(stream, opts, callback) { if (typeof opts === 'function') return eos(stream, null, opts); if (!opts) opts = {}; callback = once(callback || noop); - var ws = stream._writableState; - var rs = stream._readableState; var readable = opts.readable || opts.readable !== false && stream.readable; var writable = opts.writable || opts.writable !== false && stream.writable; @@ -32,13 +35,19 @@ function eos(stream, opts, callback) { if (!stream.writable) onfinish(); }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish() { writable = false; + writableEnded = true; if (!readable) callback.call(stream); }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend() { readable = false; + readableEnded = true; if (!writable) callback.call(stream); }; @@ -47,12 +56,16 @@ function eos(stream, opts, callback) { }; var onclose = function onclose() { - if (readable && !(rs && rs.ended)) { - return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); + var err; + + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); } - if (writable && !(ws && ws.ended)) { - return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); } }; @@ -64,7 +77,7 @@ function eos(stream, opts, callback) { stream.on('complete', onfinish); stream.on('abort', onclose); if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !ws) { + } else if (writable && !stream._writableState) { // legacy streams stream.on('end', onlegacyfinish); stream.on('close', onlegacyfinish); diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json index 71ce7faf4b4b1e..e2cd943594977b 100644 --- a/deps/npm/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/readable-stream/package.json @@ -1,28 +1,30 @@ { - "_from": "readable-stream@3.1.1", - "_id": "readable-stream@3.1.1", + "_from": "readable-stream@3.3.0", + "_id": "readable-stream@3.3.0", "_inBundle": false, - "_integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", + "_integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", "_location": "/readable-stream", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "readable-stream@3.1.1", + "raw": "readable-stream@3.3.0", "name": "readable-stream", "escapedName": "readable-stream", - "rawSpec": "3.1.1", + "rawSpec": "3.3.0", "saveSpec": null, - "fetchSpec": "3.1.1" + "fetchSpec": "3.3.0" }, "_requiredBy": [ "#USER", - "/" + "/", + "/bl", + "/tar-stream" ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", - "_shasum": "ed6bbc6c5ba58b090039ff18ce670515795aeb06", - "_spec": "readable-stream@3.1.1", - "_where": "/Users/aeschright/code/cli", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "_shasum": "cb8011aad002eb717bf040291feba8569c986fb9", + "_spec": "readable-stream@3.3.0", + "_where": "/Users/isaacs/dev/npm/cli", "browser": { "util": false, "worker_threads": false, @@ -92,5 +94,5 @@ "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", "update-browser-errors": "babel -o errors-browser.js errors.js" }, - "version": "3.1.1" + "version": "3.3.0" } diff --git a/deps/npm/node_modules/readable-stream/readable.js b/deps/npm/node_modules/readable-stream/readable.js index aeec0df5b34eef..9e0ca120ded827 100644 --- a/deps/npm/node_modules/readable-stream/readable.js +++ b/deps/npm/node_modules/readable-stream/readable.js @@ -1,13 +1,8 @@ var Stream = require('stream'); if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; + module.exports = Stream.Readable; + Object.assign(module.exports, Stream); + module.exports.Stream = Stream; } else { exports = module.exports = require('./lib/_stream_readable.js'); exports.Stream = Stream || exports; diff --git a/deps/npm/node_modules/readable-stream/yarn.lock b/deps/npm/node_modules/readable-stream/yarn.lock deleted file mode 100644 index e52970fc95b8c7..00000000000000 --- a/deps/npm/node_modules/readable-stream/yarn.lock +++ /dev/null @@ -1,6423 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/cli@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.2.0.tgz#505ed8d351daee6a88918da02c046c18c8c5a24f" - integrity sha512-FLteTkEoony0DX8NbnT51CmwmLBzINdlXmiJCSqCLmqWCDA/xk8EITPWqwDnVLbuK0bsZONt/grqHnQzQ15j0Q== - dependencies: - commander "^2.8.1" - convert-source-map "^1.1.0" - fs-readdir-recursive "^1.1.0" - glob "^7.0.0" - lodash "^4.17.10" - mkdirp "^0.5.1" - output-file-sync "^2.0.0" - slash "^2.0.0" - source-map "^0.5.0" - optionalDependencies: - chokidar "^2.0.3" - -"@babel/code-frame@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" - integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/core@^7.2.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687" - integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.2.2" - "@babel/helpers" "^7.2.0" - "@babel/parser" "^7.2.2" - "@babel/template" "^7.2.2" - "@babel/traverse" "^7.2.2" - "@babel/types" "^7.2.2" - convert-source-map "^1.1.0" - debug "^4.1.0" - json5 "^2.1.0" - lodash "^4.17.10" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.2.tgz#18c816c70962640eab42fe8cae5f3947a5c65ccc" - integrity sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg== - dependencies: - "@babel/types" "^7.2.2" - jsesc "^2.5.1" - lodash "^4.17.10" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/helper-annotate-as-pure@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" - integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" - integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-call-delegate@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" - integrity sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ== - dependencies: - "@babel/helper-hoist-variables" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-define-map@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" - integrity sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.0.0" - lodash "^4.17.10" - -"@babel/helper-explode-assignable-expression@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" - integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== - dependencies: - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-function-name@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" - integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== - dependencies: - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-get-function-arity@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" - integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-hoist-variables@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" - integrity sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-member-expression-to-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" - integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-imports@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" - integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-transforms@^7.1.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963" - integrity sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/template" "^7.2.2" - "@babel/types" "^7.2.2" - lodash "^4.17.10" - -"@babel/helper-optimise-call-expression@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" - integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-plugin-utils@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" - integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== - -"@babel/helper-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" - integrity sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg== - dependencies: - lodash "^4.17.10" - -"@babel/helper-remap-async-to-generator@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" - integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-wrap-function" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-replace-supers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" - integrity sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-simple-access@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" - integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== - dependencies: - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-split-export-declaration@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" - integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-wrap-function@^7.1.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" - integrity sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.2.0" - -"@babel/helpers@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" - integrity sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A== - dependencies: - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.5" - "@babel/types" "^7.2.0" - -"@babel/highlight@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" - integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^4.0.0" - -"@babel/parser@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.2.tgz#37ebdbc88a2e1ebc6c8dd3d35ea9436e3e39e477" - integrity sha512-UNTmQ5cSLDeBGBl+s7JeowkqIHgmFAGBnLDdIzFmUNSuS5JF0XBcN59jsh/vJO/YjfsBqMxhMjoFGmNExmf0FA== - -"@babel/plugin-proposal-async-generator-functions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" - integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" - "@babel/plugin-syntax-async-generators" "^7.2.0" - -"@babel/plugin-proposal-json-strings@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" - integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-json-strings" "^7.2.0" - -"@babel/plugin-proposal-object-rest-spread@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8" - integrity sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.2.0" - -"@babel/plugin-proposal-optional-catch-binding@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" - integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" - -"@babel/plugin-proposal-unicode-property-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520" - integrity sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.2.0" - -"@babel/plugin-syntax-async-generators@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" - integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-json-strings@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" - integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-object-rest-spread@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" - integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" - integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-arrow-functions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" - integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-async-to-generator@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" - integrity sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" - -"@babel/plugin-transform-block-scoped-functions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" - integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-block-scoping@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" - integrity sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.10" - -"@babel/plugin-transform-classes@^7.2.0", "@babel/plugin-transform-classes@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953" - integrity sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.1.0" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" - integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-destructuring@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" - integrity sha512-coVO2Ayv7g0qdDbrNiadE4bU7lvCd9H539m2gMknyVjjMdwF/iCOM7R+E8PkntoqLkltO0rk+3axhpp/0v68VQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-dotall-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49" - integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" - -"@babel/plugin-transform-duplicate-keys@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" - integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-exponentiation-operator@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" - integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-for-of@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" - integrity sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-function-name@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" - integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" - integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-amd@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" - integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw== - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-commonjs@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" - integrity sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ== - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - -"@babel/plugin-transform-modules-systemjs@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068" - integrity sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ== - dependencies: - "@babel/helper-hoist-variables" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-umd@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" - integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw== - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-new-target@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" - integrity sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-object-super@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" - integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - -"@babel/plugin-transform-parameters@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" - integrity sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA== - dependencies: - "@babel/helper-call-delegate" "^7.1.0" - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-regenerator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" - integrity sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw== - dependencies: - regenerator-transform "^0.13.3" - -"@babel/plugin-transform-shorthand-properties@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" - integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-spread@^7.2.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" - integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-sticky-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" - integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - -"@babel/plugin-transform-template-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" - integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-typeof-symbol@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" - integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-unicode-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" - integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" - -"@babel/polyfill@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0.tgz#c8ff65c9ec3be6a1ba10113ebd40e8750fb90bff" - integrity sha512-dnrMRkyyr74CRelJwvgnnSUDh2ge2NCTyHVwpOdvRMHtJUyxLtMAfhBN3s64pY41zdw0kgiLPh6S20eb1NcX6Q== - dependencies: - core-js "^2.5.7" - regenerator-runtime "^0.11.1" - -"@babel/preset-env@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.0.tgz#a5030e7e4306af5a295dd5d7c78dc5464af3fee2" - integrity sha512-haGR38j5vOGVeBatrQPr3l0xHbs14505DcM57cbJy48kgMFvvHHoYEhHuRV+7vi559yyAUAVbTWzbK/B/pzJng== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-async-generator-functions" "^7.2.0" - "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.2.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.2.0" - "@babel/plugin-syntax-async-generators" "^7.2.0" - "@babel/plugin-syntax-object-rest-spread" "^7.2.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" - "@babel/plugin-transform-arrow-functions" "^7.2.0" - "@babel/plugin-transform-async-to-generator" "^7.2.0" - "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.2.0" - "@babel/plugin-transform-classes" "^7.2.0" - "@babel/plugin-transform-computed-properties" "^7.2.0" - "@babel/plugin-transform-destructuring" "^7.2.0" - "@babel/plugin-transform-dotall-regex" "^7.2.0" - "@babel/plugin-transform-duplicate-keys" "^7.2.0" - "@babel/plugin-transform-exponentiation-operator" "^7.2.0" - "@babel/plugin-transform-for-of" "^7.2.0" - "@babel/plugin-transform-function-name" "^7.2.0" - "@babel/plugin-transform-literals" "^7.2.0" - "@babel/plugin-transform-modules-amd" "^7.2.0" - "@babel/plugin-transform-modules-commonjs" "^7.2.0" - "@babel/plugin-transform-modules-systemjs" "^7.2.0" - "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-new-target" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.2.0" - "@babel/plugin-transform-parameters" "^7.2.0" - "@babel/plugin-transform-regenerator" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.2.0" - "@babel/plugin-transform-spread" "^7.2.0" - "@babel/plugin-transform-sticky-regex" "^7.2.0" - "@babel/plugin-transform-template-literals" "^7.2.0" - "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.2.0" - browserslist "^4.3.4" - invariant "^2.2.2" - js-levenshtein "^1.1.3" - semver "^5.3.0" - -"@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" - integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.2.2" - "@babel/types" "^7.2.2" - -"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.2.tgz#961039de1f9bcb946d807efe2dba9c92e859d188" - integrity sha512-E5Bn9FSwHpSkUhthw/XEuvFZxIgrqb9M8cX8j5EUQtrUG5DQUy6bFyl7G7iQ1D1Czudor+xkmp81JbLVVM0Sjg== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.2.2" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.2.2" - "@babel/types" "^7.2.2" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.10" - -"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" - integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg== - dependencies: - esutils "^2.0.2" - lodash "^4.17.10" - to-fast-properties "^2.0.0" - -"@sindresorhus/is@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" - integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== - -JSONStream@^1.0.3: - version "1.3.5" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -accepts@~1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - -acorn-dynamic-import@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" - integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw== - -acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.6.2.tgz#b7d7ceca6f22e6417af933a62cad4de01048d5d2" - integrity sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg== - dependencies: - acorn "^6.0.2" - acorn-dynamic-import "^4.0.0" - acorn-walk "^6.1.0" - xtend "^4.0.1" - -acorn-walk@^6.1.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" - integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== - -acorn@^5.2.1: - version "5.7.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" - integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== - -acorn@^6.0.2: - version "6.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.4.tgz#77377e7353b72ec5104550aa2d2097a2fd40b754" - integrity sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg== - -adm-zip@~0.4.x: - version "0.4.13" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.13.tgz#597e2f8cc3672151e1307d3e95cddbc75672314a" - integrity sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw== - -airtap@0.0.9: - version "0.0.9" - resolved "https://registry.yarnpkg.com/airtap/-/airtap-0.0.9.tgz#de0b2f3c0b7371ef5fe5c65b179e0de675e4f047" - integrity sha512-TlwVCtNx6ylUfSglscKAoP5h2IdygnyjOKT50eftSDYhMfwNRZZwoAzFYimIEW8P/jcOef6VhMfm66ahpRBQ2Q== - dependencies: - batch "~0.6.1" - body-parser "~1.18.3" - browserify "~13.3.0" - browserify-istanbul "~3.0.1" - chalk "^2.3.1" - commander "~2.16.0" - compression "~1.7.1" - convert-source-map "~1.5.1" - debug "~3.1.0" - express "~4.16.2" - express-state "~1.4.0" - find-nearest-file "~1.1.0" - firefox-profile "~1.1.0" - globs-to-files "~1.0.0" - hbs "~4.0.1" - highlight.js "~9.12.0" - http-proxy "~1.17.0" - humanize-duration "~3.15.0" - load-script "~1.0.0" - lodash "~4.17.5" - mkdirp "~0.5.1" - opener "~1.4.3" - sauce-browsers "~2.0.0" - server-destroy "~1.0.1" - shell-quote "~1.6.1" - split2 "^2.2.0" - stack-mapper "~0.2.2" - stacktrace-js "~2.0.0" - superagent "~3.8.2" - tap-finished "~0.0.1" - tap-parser "~5.4.0" - watchify "~3.11.0" - wd "~1.10.0" - yamljs "~0.3.0" - -ajv@^5.1.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - -ajv@^6.5.5: - version "6.6.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" - integrity sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA== - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" - integrity sha1-126/jKlNJ24keja61EpLdKthGZE= - dependencies: - default-require-extensions "^1.0.0" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -archiver-utils@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-1.3.0.tgz#e50b4c09c70bf3d680e32ff1b7994e9f9d895174" - integrity sha1-5QtMCccL89aA4y/xt5lOn52JUXQ= - dependencies: - glob "^7.0.0" - graceful-fs "^4.1.0" - lazystream "^1.0.0" - lodash "^4.8.0" - normalize-path "^2.0.0" - readable-stream "^2.0.0" - -archiver@2.1.1, archiver@~2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-2.1.1.tgz#ff662b4a78201494a3ee544d3a33fe7496509ebc" - integrity sha1-/2YrSnggFJSj7lRNOjP+dJZQnrw= - dependencies: - archiver-utils "^1.3.0" - async "^2.0.0" - buffer-crc32 "^0.2.1" - glob "^7.0.0" - lodash "^4.8.0" - readable-stream "^2.0.0" - tar-stream "^1.5.0" - zip-stream "^1.2.0" - -archy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= - dependencies: - arr-flatten "^1.0.1" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-filter@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-map@0.0.0, array-map@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= - -array-reduce@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= - -array-uniq@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -asn1.js@^4.0.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assert@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE= - dependencies: - util "0.10.3" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - integrity sha1-GdOGodntxufByF04iu28xW0zYC0= - -async@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.0.1.tgz#b709cc0280a9c36f09f4536be823c838a9049e25" - integrity sha1-twnMAoCpw28J9FNr6CPIOKkEniU= - dependencies: - lodash "^4.8.0" - -async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= - -async@^2.0.0, async@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" - integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== - dependencies: - lodash "^4.17.10" - -async@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" - integrity sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw== - dependencies: - lodash "^4.14.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -asyncreduce@~0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/asyncreduce/-/asyncreduce-0.1.4.tgz#18210e01978bfdcba043955497a5cd315c0a6a41" - integrity sha1-GCEOAZeL/cugQ5VUl6XNMVwKakE= - dependencies: - runnel "~0.5.0" - -atob@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.6.0, aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-generator@^6.18.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.16.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.18.0, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.18.0, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base64-js@^1.0.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -batch@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -binary-extensions@^1.0.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14" - integrity sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg== - -bind-obj-methods@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bind-obj-methods/-/bind-obj-methods-2.0.0.tgz#0178140dbe7b7bb67dc74892ace59bc0247f06f0" - integrity sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw== - -bl@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" - integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -bl@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-2.1.2.tgz#591182cb9f3f2eff3beb1e76dabedfb5c5fa9a26" - integrity sha512-DvC0x+PxmSJNx8wXoFV15pC2+GOJ3ohb4F1REq3X32a2Z3nEBpR1Guu740M7ouYAImFj4BXDNilLNZbygtG9lQ== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -bluebird@^3.5.1: - version "3.5.3" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" - integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== - -body-parser@1.18.3, body-parser@~1.18.3: - version "1.18.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" - integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "~1.6.3" - iconv-lite "0.4.23" - on-finished "~2.3.0" - qs "6.5.2" - raw-body "2.3.3" - type-is "~1.6.16" - -boom@4.x.x: - version "4.3.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" - integrity sha1-T4owBctKfjiJ90kDD9JbluAdLjE= - dependencies: - hoek "4.x.x" - -boom@5.x.x: - version "5.2.0" - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" - integrity sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw== - dependencies: - hoek "4.x.x" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.0, braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browser-pack@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.1.0.tgz#c34ba10d0b9ce162b5af227c7131c92c2ecd5774" - integrity sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA== - dependencies: - JSONStream "^1.0.3" - combine-source-map "~0.8.0" - defined "^1.0.0" - safe-buffer "^5.1.1" - through2 "^2.0.0" - umd "^3.0.0" - -browser-resolve@^1.11.0, browser-resolve@^1.7.0: - version "1.11.3" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" - integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== - dependencies: - resolve "1.1.7" - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-istanbul@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/browserify-istanbul/-/browserify-istanbul-3.0.1.tgz#1a2dd63c0c81a12391a80a466fbef917eb12de07" - integrity sha1-Gi3WPAyBoSORqApGb775F+sS3gc= - dependencies: - istanbul-lib-instrument "^1.8.0" - minimatch "^3.0.4" - object-assign "^4.1.1" - through "^2.3.8" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.1.4, browserify-zlib@~0.1.2: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" - integrity sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0= - dependencies: - pako "~0.2.0" - -browserify-zlib@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -browserify@^16.1.0: - version "16.2.3" - resolved "https://registry.yarnpkg.com/browserify/-/browserify-16.2.3.tgz#7ee6e654ba4f92bce6ab3599c3485b1cc7a0ad0b" - integrity sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ== - dependencies: - JSONStream "^1.0.3" - assert "^1.4.0" - browser-pack "^6.0.1" - browser-resolve "^1.11.0" - browserify-zlib "~0.2.0" - buffer "^5.0.2" - cached-path-relative "^1.0.0" - concat-stream "^1.6.0" - console-browserify "^1.1.0" - constants-browserify "~1.0.0" - crypto-browserify "^3.0.0" - defined "^1.0.0" - deps-sort "^2.0.0" - domain-browser "^1.2.0" - duplexer2 "~0.1.2" - events "^2.0.0" - glob "^7.1.0" - has "^1.0.0" - htmlescape "^1.1.0" - https-browserify "^1.0.0" - inherits "~2.0.1" - insert-module-globals "^7.0.0" - labeled-stream-splicer "^2.0.0" - mkdirp "^0.5.0" - module-deps "^6.0.0" - os-browserify "~0.3.0" - parents "^1.0.1" - path-browserify "~0.0.0" - process "~0.11.0" - punycode "^1.3.2" - querystring-es3 "~0.2.0" - read-only-stream "^2.0.0" - readable-stream "^2.0.2" - resolve "^1.1.4" - shasum "^1.0.0" - shell-quote "^1.6.1" - stream-browserify "^2.0.0" - stream-http "^2.0.0" - string_decoder "^1.1.1" - subarg "^1.0.0" - syntax-error "^1.1.1" - through2 "^2.0.0" - timers-browserify "^1.0.1" - tty-browserify "0.0.1" - url "~0.11.0" - util "~0.10.1" - vm-browserify "^1.0.0" - xtend "^4.0.0" - -browserify@~13.3.0: - version "13.3.0" - resolved "https://registry.yarnpkg.com/browserify/-/browserify-13.3.0.tgz#b5a9c9020243f0c70e4675bec8223bc627e415ce" - integrity sha1-tanJAgJD8McORnW+yCI7xifkFc4= - dependencies: - JSONStream "^1.0.3" - assert "^1.4.0" - browser-pack "^6.0.1" - browser-resolve "^1.11.0" - browserify-zlib "~0.1.2" - buffer "^4.1.0" - cached-path-relative "^1.0.0" - concat-stream "~1.5.1" - console-browserify "^1.1.0" - constants-browserify "~1.0.0" - crypto-browserify "^3.0.0" - defined "^1.0.0" - deps-sort "^2.0.0" - domain-browser "~1.1.0" - duplexer2 "~0.1.2" - events "~1.1.0" - glob "^7.1.0" - has "^1.0.0" - htmlescape "^1.1.0" - https-browserify "~0.0.0" - inherits "~2.0.1" - insert-module-globals "^7.0.0" - labeled-stream-splicer "^2.0.0" - module-deps "^4.0.8" - os-browserify "~0.1.1" - parents "^1.0.1" - path-browserify "~0.0.0" - process "~0.11.0" - punycode "^1.3.2" - querystring-es3 "~0.2.0" - read-only-stream "^2.0.0" - readable-stream "^2.0.2" - resolve "^1.1.4" - shasum "^1.0.0" - shell-quote "^1.6.1" - stream-browserify "^2.0.0" - stream-http "^2.0.0" - string_decoder "~0.10.0" - subarg "^1.0.0" - syntax-error "^1.1.1" - through2 "^2.0.0" - timers-browserify "^1.0.1" - tty-browserify "~0.0.0" - url "~0.11.0" - util "~0.10.1" - vm-browserify "~0.0.1" - xtend "^4.0.0" - -browserslist@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.6.tgz#0f9d9081afc66b36f477c6bdf3813f784f42396a" - integrity sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw== - dependencies: - caniuse-lite "^1.0.30000921" - electron-to-chromium "^1.3.92" - node-releases "^1.1.1" - -buf-compare@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buf-compare/-/buf-compare-1.0.1.tgz#fef28da8b8113a0a0db4430b0b6467b69730b34a" - integrity sha1-/vKNqLgROgoNtEMLC2Rntpcws0o= - -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@^0.2.1: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - -buffer-from@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.2.tgz#15f4b9bcef012044df31142c14333caf6e0260d0" - integrity sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg== - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@^4.1.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -buffer@^5.0.2, buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6" - integrity sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -cacheable-request@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" - integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0= - dependencies: - clone-response "1.0.2" - get-stream "3.0.0" - http-cache-semantics "3.8.1" - keyv "3.0.0" - lowercase-keys "1.0.0" - normalize-url "2.0.1" - responselike "1.0.2" - -cached-path-relative@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.2.tgz#a13df4196d26776220cc3356eb147a52dba2c6db" - integrity sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg== - -caching-transform@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1" - integrity sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE= - dependencies: - md5-hex "^1.2.0" - mkdirp "^0.5.1" - write-file-atomic "^1.1.4" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - -caniuse-lite@^1.0.30000921: - version "1.0.30000921" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000921.tgz#7a607c1623444b22351d834e093aedda3c42fbe8" - integrity sha512-Bu09ciy0lMWLgpYC77I0YGuI8eFRBPPzaSOYJK1jTI64txCphYCqnWbxJYjHABYVt/TYX/p3jNjLBR87u1Bfpw== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.3.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chokidar@^1.0.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg= - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -chokidar@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" - integrity sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" - glob-parent "^3.1.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - lodash.debounce "^4.0.8" - normalize-path "^2.1.1" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.5" - optionalDependencies: - fsevents "^1.2.2" - -chownr@^1.0.1, chownr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -clean-yaml-object@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz#63fb110dc2ce1a84dc21f6d9334876d010ae8b68" - integrity sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g= - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - -clone-response@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-support@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - -combine-source-map@^0.8.0, combine-source-map@~0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.8.0.tgz#a58d0df042c186fcf822a8e8015f5450d2d79a8b" - integrity sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos= - dependencies: - convert-source-map "~1.1.0" - inline-source-map "~0.6.0" - lodash.memoize "~3.0.3" - source-map "~0.5.3" - -combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" - integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.8.1: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== - -commander@~2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" - integrity sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew== - -commander@~2.17.1: - version "2.17.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" - integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - -component-emitter@^1.2.0, component-emitter@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= - -compress-commons@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-1.2.2.tgz#524a9f10903f3a813389b0225d27c48bb751890f" - integrity sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8= - dependencies: - buffer-crc32 "^0.2.1" - crc32-stream "^2.0.0" - normalize-path "^2.0.0" - readable-stream "^2.0.0" - -compressible@~2.0.14: - version "2.0.15" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.15.tgz#857a9ab0a7e5a07d8d837ed43fe2defff64fe212" - integrity sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw== - dependencies: - mime-db ">= 1.36.0 < 2" - -compression@~1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" - integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.14" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.2" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@^1.6.0, concat-stream@^1.6.1, concat-stream@~1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -concat-stream@~1.5.0, concat-stream@~1.5.1: - version "1.5.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" - integrity sha1-cIl4Yk2FavQaWnQd790mHadSwmY= - dependencies: - inherits "~2.0.1" - readable-stream "~2.0.0" - typedarray "~0.0.5" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -constants-browserify@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.1.0, convert-source-map@^1.5.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== - dependencies: - safe-buffer "~5.1.1" - -convert-source-map@~1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" - integrity sha1-SCnId+n+SbMWHzvzZziI4gRpmGA= - -convert-source-map@~1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - integrity sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU= - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= - -cookiejar@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" - integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-assert@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/core-assert/-/core-assert-0.2.1.tgz#f85e2cf9bfed28f773cc8b3fa5c5b69bdc02fe3f" - integrity sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8= - dependencies: - buf-compare "^1.0.0" - is-error "^2.2.0" - -core-js@^2.4.0, core-js@^2.5.7: - version "2.6.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.0.tgz#1e30793e9ee5782b307e37ffa22da0eacddd84d4" - integrity sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -coveralls@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.2.tgz#f5a0bcd90ca4e64e088b710fa8dda640aea4884f" - integrity sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw== - dependencies: - growl "~> 1.10.0" - js-yaml "^3.11.0" - lcov-parse "^0.0.10" - log-driver "^1.2.7" - minimist "^1.2.0" - request "^2.85.0" - -crc32-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-2.0.0.tgz#e3cdd3b4df3168dd74e3de3fbbcb7b297fe908f4" - integrity sha1-483TtN8xaN10494/u8t7KX/pCPQ= - dependencies: - crc "^3.4.4" - readable-stream "^2.0.0" - -crc@^3.4.4: - version "3.8.0" - resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" - integrity sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ== - dependencies: - buffer "^5.1.0" - -create-ecdh@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" - integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-spawn@^4: - version "4.0.2" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" - integrity sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE= - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cryptiles@3.x.x: - version "3.1.4" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.4.tgz#769a68c95612b56faadfcebf57ac86479cbe8322" - integrity sha512-8I1sgZHfVwcSOY6mSGpVU3lw/GSIZvusg8dD2+OGehCJpOhQRLNcH0qb9upQnOH4XhgxxFJSg6E2kx95deb1Tw== - dependencies: - boom "5.x.x" - -crypto-browserify@^3.0.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= - -debug-log@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" - integrity sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8= - -debug@2.6.9, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@=3.1.0, debug@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" - integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== - dependencies: - ms "^2.1.1" - -decamelize@^1.0.0, decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - -deep-equal@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-strict-equal@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz#4a078147a8ab57f6a0d4f5547243cd22f44eb4e4" - integrity sha1-SgeBR6irV/ag1PVUckPNIvROtOQ= - dependencies: - core-assert "^0.2.0" - -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" - integrity sha1-836hXT4T/9m0N9M+GnW1+5eHTLg= - dependencies: - strip-bom "^2.0.0" - -define-properties@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -defined@^1.0.0, defined@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -deps-sort@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5" - integrity sha1-CRckkC6EZYJg65EHSMzNGvbiH7U= - dependencies: - JSONStream "^1.0.3" - shasum "^1.0.0" - subarg "^1.0.0" - through2 "^2.0.0" - -des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw= - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -detective@^4.0.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/detective/-/detective-4.7.1.tgz#0eca7314338442febb6d65da54c10bb1c82b246e" - integrity sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig== - dependencies: - acorn "^5.2.1" - defined "^1.0.0" - -detective@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/detective/-/detective-5.1.0.tgz#7a20d89236d7b331ccea65832e7123b5551bb7cb" - integrity sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ== - dependencies: - acorn-node "^1.3.0" - defined "^1.0.0" - minimist "^1.1.1" - -diff@^1.3.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" - integrity sha1-fyjS657nsVqX79ic5j3P2qPMur8= - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -domain-browser@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - -domain-browser@~1.1.0: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" - integrity sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw= - -duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" - integrity sha1-ixLauHjA1p4+eJEFFmKjL8a93ME= - dependencies: - readable-stream "^2.0.2" - -duplexer2@~0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" - integrity sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds= - dependencies: - readable-stream "~1.1.9" - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - -duplexify@^3.5.0, duplexify@^3.6.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.1.tgz#b1a7a29c4abfd639585efaecce80d666b1e34125" - integrity sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.3.92: - version "1.3.92" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.92.tgz#9027b5abaea400045edd652c0e4838675c814399" - integrity sha512-En051LMzMl3/asMWGZEtU808HOoVWIpmmZx1Ep8N+TT9e7z/X8RcLeBU2kLSNLGQ+5SuKELzMx+MVuTBXk6Q9w== - -elliptic@^6.0.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" - integrity sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== - dependencies: - once "^1.4.0" - -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -error-stack-parser@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.2.tgz#4ae8dbaa2bf90a8b450707b9149dcabca135520d" - integrity sha512-E1fPutRDdIj/hohG0UpT5mayXNCxXP9d+snxFsPU9X0XgccOumKraa3juDMwTUyi7+Bu5+mCGagjg4IYeNbOdw== - dependencies: - stackframe "^1.0.4" - -es-abstract@^1.5.0, es-abstract@^1.5.1: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" - integrity sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA== - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-to-primitive@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" - integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eventemitter3@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" - integrity sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA== - -events-to-array@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/events-to-array/-/events-to-array-1.1.2.tgz#2d41f563e1fe400ed4962fe1a4d5c6a7539df7f6" - integrity sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y= - -events@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/events/-/events-2.1.0.tgz#2a9a1e18e6106e0e812aa9ebd4a819b3c29c0ba5" - integrity sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg== - -events@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= - dependencies: - is-posix-bracket "^0.1.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= - dependencies: - fill-range "^2.1.0" - -express-state@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/express-state/-/express-state-1.4.0.tgz#3ae100132ae11fdfef836fe190cab7ba729d227d" - integrity sha1-OuEAEyrhH9/vg2/hkMq3unKdIn0= - dependencies: - serialize-javascript "^1.1.0" - -express@~4.16.2: - version "4.16.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" - integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== - dependencies: - accepts "~1.3.5" - array-flatten "1.1.1" - body-parser "1.18.3" - content-disposition "0.5.2" - content-type "~1.0.4" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.1.1" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" - path-to-regexp "0.1.7" - proxy-addr "~2.0.4" - qs "6.5.2" - range-parser "~1.2.0" - safe-buffer "5.1.2" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" - utils-merge "1.0.1" - vary "~1.1.2" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@^3.0.0, extend@~3.0.1, extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= - dependencies: - is-extglob "^1.0.0" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -finalhandler@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" - integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.4.0" - unpipe "~1.0.0" - -find-cache-dir@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" - integrity sha1-yN765XyKUqinhPnjHFfHQumToLk= - dependencies: - commondir "^1.0.1" - mkdirp "^0.5.1" - pkg-dir "^1.0.0" - -find-nearest-file@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/find-nearest-file/-/find-nearest-file-1.1.0.tgz#e29441740329a2015f7655faecd7b85e02cad686" - integrity sha512-NMsS0ITOwpBPrHOyO7YUtDhaVEGUKS0kBJDVaWZPuCzO7JMW+uzFQQVts/gPyIV9ioyNWDb5LjhHWXVf1OnBDA== - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -firefox-profile@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/firefox-profile/-/firefox-profile-1.1.0.tgz#50090d1ff62dce3052cc7f46d1243c6a487db47a" - integrity sha512-wUIE4QeAjwoHvFbomWmXgKyYtV4/oZxDcJG4znxtGGa/0BhKkd3HzeOf3tAsMWPq1ExARZxCRRiNw1BL3FuPqA== - dependencies: - adm-zip "~0.4.x" - archiver "~2.1.0" - async "~2.5.0" - fs-extra "~4.0.2" - ini "~1.3.3" - jetpack-id "1.0.0" - lazystream "~1.0.0" - lodash "~4.17.2" - minimist "^1.1.1" - uuid "^3.0.0" - xml2js "~0.4.4" - -follow-redirects@^1.0.0: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" - -for-each@~0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= - dependencies: - for-in "^1.0.1" - -foreach-shim@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/foreach-shim/-/foreach-shim-0.1.1.tgz#be61d75f46abb7176f5abd295e35885751b71d94" - integrity sha1-vmHXX0artxdvWr0pXjWIV1G3HZQ= - -foreachasync@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/foreachasync/-/foreachasync-3.0.0.tgz#5502987dc8714be3392097f32e0071c9dee07cf6" - integrity sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY= - -foreground-child@^1.3.3, foreground-child@^1.5.3, foreground-child@^1.5.6: - version "1.5.6" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" - integrity sha1-T9ca0t/elnibmApcCilZN8svXOk= - dependencies: - cross-spawn "^4" - signal-exit "^3.0.0" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@^2.3.1, form-data@~2.3.1, form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -formidable@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.1.tgz#70fb7ca0290ee6ff961090415f4b3df3d2082659" - integrity sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg== - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -from2@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-exists-cached@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz#cf25554ca050dc49ae6656b41de42258989dcbce" - integrity sha1-zyVVTKBQ3EmuZla0HeQiWJidy84= - -fs-extra@~4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== - dependencies: - minipass "^2.2.1" - -fs-readdir-recursive@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.0.0, fsevents@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - -function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function-loop@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/function-loop/-/function-loop-1.0.1.tgz#8076bb305e8e6a3cceee2920765f330d190f340c" - integrity sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw= - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-assigned-identifiers@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz#6dbf411de648cbaf8d9169ebb0d2d576191e2ff1" - integrity sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ== - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-stream@3.0.0, get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= - dependencies: - is-glob "^2.0.0" - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob@^5.0.10: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.0, glob@^7.0.5, glob@^7.0.6, glob@^7.1.0, glob@^7.1.2, glob@~7.1.2: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.9.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" - integrity sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg== - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -globs-to-files@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/globs-to-files/-/globs-to-files-1.0.0.tgz#54490f6d1f4b9fd2de9d99445146ffb37550380d" - integrity sha1-VEkPbR9Ln9LenZlEUUb/s3VQOA0= - dependencies: - array-uniq "~1.0.2" - asyncreduce "~0.1.4" - glob "^5.0.10" - xtend "^4.0.0" - -got@^8.2.0: - version "8.3.2" - resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" - integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== - dependencies: - "@sindresorhus/is" "^0.7.0" - cacheable-request "^2.1.1" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - into-stream "^3.1.0" - is-retry-allowed "^1.1.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - mimic-response "^1.0.0" - p-cancelable "^0.4.0" - p-timeout "^2.0.1" - pify "^3.0.0" - safe-buffer "^5.1.1" - timed-out "^4.0.1" - url-parse-lax "^3.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -"growl@~> 1.10.0": - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -gunzip-maybe@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/gunzip-maybe/-/gunzip-maybe-1.4.1.tgz#39c72ed89d1b49ba708e18776500488902a52027" - integrity sha512-qtutIKMthNJJgeHQS7kZ9FqDq59/Wn0G2HYCRNjpup7yKfVI6/eqwpmroyZGFoCYaG+sW6psNVb4zoLADHpp2g== - dependencies: - browserify-zlib "^0.1.4" - is-deflate "^1.0.0" - is-gzip "^1.0.0" - peek-stream "^1.1.0" - pumpify "^1.3.3" - through2 "^2.0.3" - -handlebars@4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.5.tgz#92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7" - integrity sha1-ksbta7FkEQxQ1NjQ+93HCAbG+Oc= - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - -handlebars@^4.0.3: - version "4.0.12" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" - integrity sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA== - dependencies: - async "^2.5.0" - optimist "^0.6.1" - source-map "^0.6.1" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - integrity sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0= - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" - -har-validator@~5.1.0: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== - dependencies: - ajv "^6.5.5" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - -has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.0, has@^1.0.1, has@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hawk@~6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - integrity sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ== - dependencies: - boom "4.x.x" - cryptiles "3.x.x" - hoek "4.x.x" - sntp "2.x.x" - -hbs@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/hbs/-/hbs-4.0.1.tgz#4bfd98650dc8c9dac44b3ca9adf9c098e8bc33b6" - integrity sha1-S/2YZQ3IydrESzyprfnAmOi8M7Y= - dependencies: - handlebars "4.0.5" - walk "2.3.9" - -highlight.js@~9.12.0: - version "9.12.0" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e" - integrity sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4= - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoek@4.x.x: - version "4.2.1" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" - integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA== - -hosted-git-info@^2.1.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== - -htmlescape@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" - integrity sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E= - -http-cache-semantics@3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== - -http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-proxy@~1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" - integrity sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g== - dependencies: - eventemitter3 "^3.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - -https-browserify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - integrity sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI= - -humanize-duration@~3.15.0: - version "3.15.3" - resolved "https://registry.yarnpkg.com/humanize-duration/-/humanize-duration-3.15.3.tgz#600a939bd9d9a16b696e907b3fc08d1a4f15e8c9" - integrity sha512-BMz6w8p3NVa6QP9wDtqUkXfwgBqDaZ5z/np0EYdoWrLqL849Onp6JWMXMhbHtuvO9jUThLN5H1ThRQ8dUWnYkA== - -hyperquest@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/hyperquest/-/hyperquest-2.1.3.tgz#523127d7a343181b40bf324e231d2576edf52633" - integrity sha512-fUuDOrB47PqNK/BAMOS13v41UoaqIxqSLHX6CAbOD7OfT+/GCWO1/vPLfTNutOeXrv1ikuaZ3yux+33Z9vh+rw== - dependencies: - buffer-from "^0.1.1" - duplexer2 "~0.0.2" - through2 "~0.6.3" - -iconv-lite@0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" - integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.4.4: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== - -ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== - dependencies: - minimatch "^3.0.4" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= - -ini@~1.3.0, ini@~1.3.3: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -inline-source-map@~0.6.0: - version "0.6.2" - resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5" - integrity sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU= - dependencies: - source-map "~0.5.3" - -insert-module-globals@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.2.0.tgz#ec87e5b42728479e327bd5c5c71611ddfb4752ba" - integrity sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw== - dependencies: - JSONStream "^1.0.3" - acorn-node "^1.5.2" - combine-source-map "^0.8.0" - concat-stream "^1.6.1" - is-buffer "^1.1.0" - path-is-absolute "^1.0.1" - process "~0.11.0" - through2 "^2.0.0" - undeclared-identifiers "^1.1.2" - xtend "^4.0.0" - -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" - integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY= - dependencies: - from2 "^2.1.1" - p-is-promise "^1.1.0" - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -ipaddr.js@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" - integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.0, is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74= - dependencies: - builtin-modules "^1.0.0" - -is-callable@^1.1.3, is-callable@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= - -is-deflate@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-deflate/-/is-deflate-1.0.0.tgz#c862901c3c161fb09dac7cdc7e784f80e98f2f14" - integrity sha1-yGKQHDwWH7CdrHzcfnhPgOmPLxQ= - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= - dependencies: - is-primitive "^2.0.0" - -is-error@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-error/-/is-error-2.2.1.tgz#684a96d84076577c98f4cdb40c6d26a5123bf19c" - integrity sha1-aEqW2EB2V3yY9M20DG0mpRI78Zw= - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= - dependencies: - is-extglob "^1.0.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= - dependencies: - is-extglob "^2.1.1" - -is-gzip@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83" - integrity sha1-bKiwe5nHeZgCWQDlVc7Y7YCHmoM= - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -is-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" - integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= - -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= - dependencies: - has "^1.0.1" - -is-retry-allowed@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-symbol@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" - integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== - dependencies: - has-symbols "^1.0.0" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isarray@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.4.tgz#38e7bcbb0f3ba1b7933c86ba1894ddfc3781bbb7" - integrity sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -istanbul-lib-coverage@^1.1.2, istanbul-lib-coverage@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" - integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== - -istanbul-lib-hook@^1.1.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" - integrity sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw== - dependencies: - append-transform "^0.4.0" - -istanbul-lib-instrument@^1.10.0, istanbul-lib-instrument@^1.8.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" - integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A== - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.1" - semver "^5.3.0" - -istanbul-lib-report@^1.1.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" - integrity sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw== - dependencies: - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.2.3: - version "1.2.6" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" - integrity sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg== - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - -istanbul-reports@^1.4.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" - integrity sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw== - dependencies: - handlebars "^4.0.3" - -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -jetpack-id@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/jetpack-id/-/jetpack-id-1.0.0.tgz#2cf9fbae46d8074fc16b7de0071c8efebca473a6" - integrity sha1-LPn7rkbYB0/Ba33gBxyO/rykc6Y= - -js-levenshtein@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e" - integrity sha512-PxfGzSs0ztShKrUYPIn5r0MtyAhYcCwmndozzpz8YObbPnD1jFxzlBGbRnX2mIu6Z13xN6+PTu05TQFnZFlzow== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@^3.11.0, js-yaml@^3.2.7, js-yaml@^3.3.1: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stable-stringify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45" - integrity sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U= - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json5@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" - integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== - dependencies: - minimist "^1.2.0" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - -jsonparse@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -keyv@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" - integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== - dependencies: - json-buffer "3.0.0" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== - -labeled-stream-splicer@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz#9cffa32fd99e1612fd1d86a8db962416d5292926" - integrity sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg== - dependencies: - inherits "^2.0.1" - isarray "^2.0.4" - stream-splicer "^2.0.0" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= - -lazystream@^1.0.0, lazystream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" - integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= - dependencies: - readable-stream "^2.0.5" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -lcov-parse@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" - integrity sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM= - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -load-script@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4" - integrity sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ= - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= - -lodash.memoize@~3.0.3: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" - integrity sha1-LcvSwofLwKVcxCMovQxzYVDVPj8= - -lodash@4.17.10: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== - -lodash@^4.14.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.8.0, lodash@~4.17.2, lodash@~4.17.5: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - -log-driver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" - integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== - -lolex@^2.6.0: - version "2.7.5" - resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.7.5.tgz#113001d56bfc7e02d56e36291cc5c413d1aa0733" - integrity sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q== - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= - -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lowercase-keys@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" - integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= - -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -math-random@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" - integrity sha1-izqsWIuKZuSXXjzepn97sylgH6w= - -md5-hex@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4" - integrity sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ= - dependencies: - md5-o-matic "^0.1.1" - -md5-o-matic@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3" - integrity sha1-givM1l4RfFFPqxdrJZRdVBAKA8M= - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-source-map@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" - integrity sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw== - dependencies: - source-map "^0.6.1" - -methods@^1.1.1, methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^2.1.5, micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -"mime-db@>= 1.36.0 < 2", mime-db@~1.37.0: - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" - integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== - -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19: - version "2.1.21" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" - integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== - dependencies: - mime-db "~1.37.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - -mime@^1.4.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -"minimatch@2 || 3", minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0, minimist@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - -minipass@^2.2.0, minipass@^2.2.1, minipass@^2.3.0, minipass@^2.3.4: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== - dependencies: - minipass "^2.2.1" - -mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -module-deps@^4.0.8: - version "4.1.1" - resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd" - integrity sha1-IyFYM/HaE/1gbMuAh7RIUty4If0= - dependencies: - JSONStream "^1.0.3" - browser-resolve "^1.7.0" - cached-path-relative "^1.0.0" - concat-stream "~1.5.0" - defined "^1.0.0" - detective "^4.0.0" - duplexer2 "^0.1.2" - inherits "^2.0.1" - parents "^1.0.0" - readable-stream "^2.0.2" - resolve "^1.1.3" - stream-combiner2 "^1.1.1" - subarg "^1.0.0" - through2 "^2.0.0" - xtend "^4.0.0" - -module-deps@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-6.2.0.tgz#d41a2e790245ce319171e4e7c4d8c73993ba3cd5" - integrity sha512-hKPmO06so6bL/ZvqVNVqdTVO8UAYsi3tQWlCa+z9KuWhoN4KDQtb5hcqQQv58qYiDE21wIvnttZEPiDgEbpwbA== - dependencies: - JSONStream "^1.0.3" - browser-resolve "^1.7.0" - cached-path-relative "^1.0.0" - concat-stream "~1.6.0" - defined "^1.0.0" - detective "^5.0.2" - duplexer2 "^0.1.2" - inherits "^2.0.1" - parents "^1.0.0" - readable-stream "^2.0.2" - resolve "^1.4.0" - stream-combiner2 "^1.1.1" - subarg "^1.0.0" - through2 "^2.0.0" - xtend "^4.0.0" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -nan@^2.9.2: - version "2.11.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" - integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -needle@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" - integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== - dependencies: - debug "^2.1.2" - iconv-lite "^0.4.4" - sax "^1.2.4" - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= - -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" - integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -node-releases@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.1.tgz#8fff8aea1cfcad1fb4205f805149054fbf73cafd" - integrity sha512-2UXrBr6gvaebo5TNF84C66qyJJ6r0kxBObgZIDX3D3/mt1ADKiHux3NJPWisq0wxvJJdkjECH+9IIKYViKj71Q== - dependencies: - semver "^5.3.0" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.3.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-url@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" - integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== - dependencies: - prepend-http "^2.0.0" - query-string "^5.0.1" - sort-keys "^2.0.0" - -npm-bundled@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" - integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== - -npm-packlist@^1.1.6: - version "1.1.12" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" - integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -nyc@^11.0.0, nyc@^11.7.2: - version "11.9.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-11.9.0.tgz#4106e89e8fbe73623a1fc8b6ecb7abaa271ae1e4" - integrity sha512-w8OdJAhXL5izerzZMdqzYKMj/pgHJyY3qEPYBjLLxrhcVoHEY9pU5ENIiZyCgG9OR7x3VcUMoD40o6PtVpfR4g== - dependencies: - archy "^1.0.0" - arrify "^1.0.1" - caching-transform "^1.0.0" - convert-source-map "^1.5.1" - debug-log "^1.0.1" - default-require-extensions "^1.0.0" - find-cache-dir "^0.1.1" - find-up "^2.1.0" - foreground-child "^1.5.3" - glob "^7.0.6" - istanbul-lib-coverage "^1.1.2" - istanbul-lib-hook "^1.1.0" - istanbul-lib-instrument "^1.10.0" - istanbul-lib-report "^1.1.3" - istanbul-lib-source-maps "^1.2.3" - istanbul-reports "^1.4.0" - md5-hex "^1.2.0" - merge-source-map "^1.1.0" - micromatch "^3.1.10" - mkdirp "^0.5.0" - resolve-from "^2.0.0" - rimraf "^2.6.2" - signal-exit "^3.0.1" - spawn-wrap "^1.4.2" - test-exclude "^4.2.0" - yargs "11.1.0" - yargs-parser "^8.0.0" - -oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM= - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-inspect@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" - integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== - -object-keys@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" - integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - integrity sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c= - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -opener@^1.4.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" - integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== - -opener@~1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8" - integrity sha1-XG2ixdflgx6P+jlklQ+NZnSskLg= - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -os-browserify@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54" - integrity sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ= - -os-browserify@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - -os-homedir@^1.0.0, os-homedir@^1.0.1, os-homedir@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-tmpdir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -outpipe@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/outpipe/-/outpipe-1.1.1.tgz#50cf8616365e87e031e29a5ec9339a3da4725fa2" - integrity sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I= - dependencies: - shell-quote "^1.4.2" - -output-file-sync@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" - integrity sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ== - dependencies: - graceful-fs "^4.1.11" - is-plain-obj "^1.1.0" - mkdirp "^0.5.1" - -own-or-env@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/own-or-env/-/own-or-env-1.0.1.tgz#54ce601d3bf78236c5c65633aa1c8ec03f8007e4" - integrity sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw== - dependencies: - own-or "^1.0.0" - -own-or@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/own-or/-/own-or-1.0.0.tgz#4e877fbeda9a2ec8000fbc0bcae39645ee8bf8dc" - integrity sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw= - -p-cancelable@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" - integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" - integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-timeout@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" - integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== - dependencies: - p-finally "^1.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" - integrity sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU= - -pako@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.7.tgz#2473439021b57f1516c82f58be7275ad8ef1bb27" - integrity sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ== - -parents@^1.0.0, parents@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751" - integrity sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E= - dependencies: - path-platform "~0.11.15" - -parse-asn1@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8" - integrity sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw== - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-browserify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" - integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-parse@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-platform@~0.11.15: - version "0.11.15" - resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2" - integrity sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I= - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -pbkdf2@^3.0.3: - version "3.0.17" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" - integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -peek-stream@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/peek-stream/-/peek-stream-1.1.3.tgz#3b35d84b7ccbbd262fff31dc10da56856ead6d67" - integrity sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA== - dependencies: - buffer-from "^1.0.0" - duplexify "^3.5.0" - through2 "^2.0.3" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" - integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= - dependencies: - find-up "^1.0.0" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= - -private@^0.1.6: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= - -process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== - -process@~0.11.0: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -proxy-addr@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" - integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.8.0" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -psl@^1.1.24: - version "1.1.31" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" - integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pump@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" - integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^1.3.2, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -q@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" - integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= - -qs@6.5.2, qs@~6.5.1, qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -qs@^6.5.1: - version "6.6.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2" - integrity sha512-KIJqT9jQJDQx5h5uAVPimw6yVg2SekOKu959OCtktD3FjzbpvaPr8i4zzg07DOMz+igA4W/aNM7OV8H37pFYfA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring-es3@~0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -randomatic@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" - integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" - integrity sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - -raw-body@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" - integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== - dependencies: - bytes "3.0.0" - http-errors "1.6.3" - iconv-lite "0.4.23" - unpipe "1.0.0" - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-only-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0" - integrity sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A= - dependencies: - readable-stream "^2.0.2" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -"readable-stream@>=1.0.33-1 <1.1.0-0": - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2, readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@~1.1.9: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@~2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" - integrity sha1-j5A0HmilPMySh4jaz80Rs265t44= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -readdirp@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -regenerate-unicode-properties@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" - integrity sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw== - dependencies: - regenerate "^1.4.0" - -regenerate@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" - integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== - -regenerator-runtime@^0.11.0, regenerator-runtime@^0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-transform@^0.13.3: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" - integrity sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA== - dependencies: - private "^0.1.6" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== - dependencies: - is-equal-shallow "^0.1.3" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexpu-core@^4.1.3, regexpu-core@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" - integrity sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA== - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^7.0.0" - regjsgen "^0.5.0" - regjsparser "^0.6.0" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.0.2" - -regjsgen@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" - integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA== - -regjsparser@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" - integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== - dependencies: - jsesc "~0.5.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -request@2.85.0: - version "2.85.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa" - integrity sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - hawk "~6.0.2" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - stringstream "~0.0.5" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - -request@^2.85.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.0" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.4.3" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-from@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" - integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c= - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - -resolve@^1.1.3, resolve@^1.1.4, resolve@^1.3.2, resolve@^1.4.0: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - dependencies: - path-parse "^1.0.5" - -resolve@~1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" - integrity sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw== - dependencies: - path-parse "^1.0.5" - -responselike@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -resumer@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" - integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= - dependencies: - through "~2.3.4" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= - dependencies: - align-text "^0.1.1" - -rimraf@^2.6.1, rimraf@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== - dependencies: - glob "^7.0.5" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -runnel@~0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/runnel/-/runnel-0.5.3.tgz#f9362b165a05fc6f5e46e458f77a1f7ecdc0daec" - integrity sha1-+TYrFloF/G9eRuRY93offs3A2uw= - -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sauce-browsers@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sauce-browsers/-/sauce-browsers-2.0.0.tgz#a3ecd9252fd431b499a2df37b30b78fd57136612" - integrity sha512-IW+G/5ceUFRITwSqL9L9Pyg68VJerAGK4Nf1ubiZw5oAVNvH59lpBiHEaDfbr6MyZqUfVGExfihyHmbfbnlV7A== - dependencies: - got "^8.2.0" - -sax@>=0.6.0, sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== - -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serialize-javascript@^1.1.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" - integrity sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ== - -serve-static@1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - -server-destroy@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" - integrity sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0= - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shasum@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f" - integrity sha1-5wEjENj0F/TetXEhUOVni4euVl8= - dependencies: - json-stable-stringify "~0.0.0" - sha.js "~2.4.4" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shell-quote@^1.4.2, shell-quote@^1.6.1, shell-quote@~1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" - integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c= - dependencies: - array-filter "~0.0.0" - array-map "~0.0.0" - array-reduce "~0.0.0" - jsonify "~0.0.0" - -signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -simple-concat@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6" - integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY= - -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - -slide@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -sntp@2.x.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" - integrity sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg== - dependencies: - hoek "4.x.x" - -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= - dependencies: - is-plain-obj "^1.0.0" - -source-map-cjs@~0.1.31: - version "0.1.32" - resolved "https://registry.yarnpkg.com/source-map-cjs/-/source-map-cjs-0.1.32.tgz#b113f00065b484f4d3a1123ef084046a56228ce7" - integrity sha1-sRPwAGW0hPTToRI+8IQEalYijOc= - -source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== - dependencies: - atob "^2.1.1" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.5.5: - version "0.5.9" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" - integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - integrity sha1-dc449SvwczxafwwRjYEzSiu19BI= - -source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - integrity sha1-66T12pwNyZneaAMti092FzZSA2s= - dependencies: - amdefine ">=0.0.4" - -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spawn-wrap@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c" - integrity sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg== - dependencies: - foreground-child "^1.5.6" - mkdirp "^0.5.0" - os-homedir "^1.0.1" - rimraf "^2.6.2" - signal-exit "^3.0.2" - which "^1.3.0" - -spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== - -spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz#a59efc09784c2a5bada13cfeaf5c75dd214044d2" - integrity sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -split2@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" - integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== - dependencies: - through2 "^2.0.2" - -split@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/split/-/split-0.1.2.tgz#f0710744c453d551fc7143ead983da6014e336cc" - integrity sha1-8HEHRMRT1VH8cUPq2YPaYBTjNsw= - dependencies: - through "1" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -sshpk@^1.7.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.2.tgz#c946d6bd9b1a39d0e8635763f5242d6ed6dcb629" - integrity sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -stack-generator@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-2.0.3.tgz#bb74385c67ffc4ccf3c4dee5831832d4e509c8a0" - integrity sha512-kdzGoqrnqsMxOEuXsXyQTmvWXZmG0f3Ql2GDx5NtmZs59sT2Bt9Vdyq0XdtxUi58q/+nxtbF9KOQ9HkV1QznGg== - dependencies: - stackframe "^1.0.4" - -stack-mapper@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/stack-mapper/-/stack-mapper-0.2.2.tgz#789029054937b7d47c1b5b67612cbb1e7cfe7071" - integrity sha1-eJApBUk3t9R8G1tnYSy7Hnz+cHE= - dependencies: - array-map "0.0.0" - foreach-shim "~0.1.1" - isarray "0.0.1" - source-map-cjs "~0.1.31" - -stack-utils@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" - integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== - -stackframe@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.0.4.tgz#357b24a992f9427cba6b545d96a14ed2cbca187b" - integrity sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw== - -stacktrace-gps@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/stacktrace-gps/-/stacktrace-gps-3.0.2.tgz#33f8baa4467323ab2bd1816efa279942ba431ccc" - integrity sha512-9o+nWhiz5wFnrB3hBHs2PTyYrS60M1vvpSzHxwxnIbtY2q9Nt51hZvhrG1+2AxD374ecwyS+IUwfkHRE/2zuGg== - dependencies: - source-map "0.5.6" - stackframe "^1.0.4" - -stacktrace-js@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/stacktrace-js/-/stacktrace-js-2.0.0.tgz#776ca646a95bc6c6b2b90776536a7fc72c6ddb58" - integrity sha1-d2ymRqlbxsayuQd2U2p/xyxt21g= - dependencies: - error-stack-parser "^2.0.1" - stack-generator "^2.0.1" - stacktrace-gps "^3.0.1" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - -stream-browserify@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - integrity sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds= - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-combiner2@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" - integrity sha1-+02KFCDqNidk4hrUeAOXvry0HL4= - dependencies: - duplexer2 "~0.1.0" - readable-stream "^2.0.2" - -stream-http@^2.0.0: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= - -stream-splicer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83" - integrity sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.2" - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string.prototype.trim@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" - integrity sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo= - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.0" - function-bind "^1.0.2" - -string_decoder@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" - integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== - dependencies: - safe-buffer "~5.1.0" - -string_decoder@~0.10.0, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -stringstream@~0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" - integrity sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA== - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -subarg@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" - integrity sha1-9izxdYHplrSPyWVpn1TAauJouNI= - dependencies: - minimist "^1.1.0" - -superagent@~3.8.2: - version "3.8.3" - resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.8.3.tgz#460ea0dbdb7d5b11bc4f78deba565f86a178e128" - integrity sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA== - dependencies: - component-emitter "^1.2.0" - cookiejar "^2.1.0" - debug "^3.1.0" - extend "^3.0.0" - form-data "^2.3.1" - formidable "^1.2.0" - methods "^1.1.1" - mime "^1.4.1" - qs "^6.5.1" - readable-stream "^2.3.5" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^3.1.2: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -syntax-error@^1.1.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c" - integrity sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w== - dependencies: - acorn-node "^1.2.0" - -tap-finished@~0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tap-finished/-/tap-finished-0.0.1.tgz#08b5b543fdc04830290c6c561279552e71c4bd67" - integrity sha1-CLW1Q/3ASDApDGxWEnlVLnHEvWc= - dependencies: - tap-parser "~0.2.0" - through "~2.3.4" - -tap-mocha-reporter@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/tap-mocha-reporter/-/tap-mocha-reporter-3.0.7.tgz#235e57893b500861ea5d0924965dadfb2f05eaa7" - integrity sha512-GHVXJ38C3oPRpM3YUc43JlGdpVZYiKeT1fmAd3HH2+J+ZWwsNAUFvRRdoGsXLw9+gU9o+zXpBqhS/oXyRQYwlA== - dependencies: - color-support "^1.1.0" - debug "^2.1.3" - diff "^1.3.2" - escape-string-regexp "^1.0.3" - glob "^7.0.5" - js-yaml "^3.3.1" - tap-parser "^5.1.0" - unicode-length "^1.0.0" - optionalDependencies: - readable-stream "^2.1.5" - -tap-parser@^5.1.0, tap-parser@~5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-5.4.0.tgz#6907e89725d7b7fa6ae41ee2c464c3db43188aec" - integrity sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA== - dependencies: - events-to-array "^1.0.1" - js-yaml "^3.2.7" - optionalDependencies: - readable-stream "^2" - -tap-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-7.0.0.tgz#54db35302fda2c2ccc21954ad3be22b2cba42721" - integrity sha512-05G8/LrzqOOFvZhhAk32wsGiPZ1lfUrl+iV7+OkKgfofZxiceZWMHkKmow71YsyVQ8IvGBP2EjcIjE5gL4l5lA== - dependencies: - events-to-array "^1.0.1" - js-yaml "^3.2.7" - minipass "^2.2.0" - -tap-parser@~0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-0.2.1.tgz#8e1e823f2114ee21d032e2f31e4fb642a296f50b" - integrity sha1-jh6CPyEU7iHQMuLzHk+2QqKW9Qs= - dependencies: - split "~0.1.2" - -tap@^11.0.0: - version "11.1.5" - resolved "https://registry.yarnpkg.com/tap/-/tap-11.1.5.tgz#31bbef84c7a2ca78b2f811edf5fabd336c0ec846" - integrity sha512-rOmL7+8U5v7E8ADxFF9SYbGIrqdYPeJy8d6eFMStEXIasJ85tjv8F9M4SSry314eIvqRv/aKf/0YVrkoMj/byQ== - dependencies: - bind-obj-methods "^2.0.0" - bluebird "^3.5.1" - clean-yaml-object "^0.1.0" - color-support "^1.1.0" - coveralls "^3.0.1" - foreground-child "^1.3.3" - fs-exists-cached "^1.0.0" - function-loop "^1.0.1" - glob "^7.0.0" - isexe "^2.0.0" - js-yaml "^3.11.0" - minipass "^2.3.0" - mkdirp "^0.5.1" - nyc "^11.7.2" - opener "^1.4.1" - os-homedir "^1.0.2" - own-or "^1.0.0" - own-or-env "^1.0.1" - rimraf "^2.6.2" - signal-exit "^3.0.0" - source-map-support "^0.5.5" - stack-utils "^1.0.0" - tap-mocha-reporter "^3.0.7" - tap-parser "^7.0.0" - tmatch "^3.1.0" - trivial-deferred "^1.0.1" - tsame "^1.1.2" - write-file-atomic "^2.3.0" - yapool "^1.0.0" - -tape@^4.9.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/tape/-/tape-4.9.1.tgz#1173d7337e040c76fbf42ec86fcabedc9b3805c9" - integrity sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw== - dependencies: - deep-equal "~1.0.1" - defined "~1.0.0" - for-each "~0.3.3" - function-bind "~1.1.1" - glob "~7.1.2" - has "~1.0.3" - inherits "~2.0.3" - minimist "~1.2.0" - object-inspect "~1.6.0" - resolve "~1.7.1" - resumer "~0.0.0" - string.prototype.trim "~1.1.2" - through "~2.3.8" - -tar-fs@^1.16.2: - version "1.16.3" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" - integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw== - dependencies: - chownr "^1.0.1" - mkdirp "^0.5.1" - pump "^1.0.0" - tar-stream "^1.1.2" - -tar-stream@^1.1.2, tar-stream@^1.5.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" - integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== - dependencies: - bl "^1.0.0" - buffer-alloc "^1.2.0" - end-of-stream "^1.0.0" - fs-constants "^1.0.0" - readable-stream "^2.3.0" - to-buffer "^1.1.1" - xtend "^4.0.0" - -tar@^4: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.2" - -test-exclude@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" - integrity sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA== - dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - -through2@^2.0.0, through2@^2.0.2, through2@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through2@~0.6.3: - version "0.6.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" - integrity sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg= - dependencies: - readable-stream ">=1.0.33-1 <1.1.0-0" - xtend ">=4.0.0 <4.1.0-0" - -through@1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/through/-/through-1.1.2.tgz#344a5425a3773314ca7e0eb6512fbafaf76c0bfe" - integrity sha1-NEpUJaN3MxTKfg62US+6+vdsC/4= - -"through@>=2.2.7 <3", through@^2.3.8, through@~2.3.4, through@~2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - -timers-browserify@^1.0.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" - integrity sha1-ycWLV1voQHN1y14kYtrO50NZ9B0= - dependencies: - process "~0.11.0" - -tmatch@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/tmatch/-/tmatch-3.1.0.tgz#701264fd7582d0144a80c85af3358cca269c71e3" - integrity sha512-W3MSATOCN4pVu2qFxmJLIArSifeSOFqnfx9hiUaVgOmeRoI2NbU7RNga+6G+L8ojlFeQge+ZPCclWyUpQ8UeNQ== - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - -to-buffer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" - integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -tough-cookie@~2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA== - dependencies: - punycode "^1.4.1" - -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -trivial-deferred@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trivial-deferred/-/trivial-deferred-1.0.1.tgz#376d4d29d951d6368a6f7a0ae85c2f4d5e0658f3" - integrity sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM= - -tsame@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/tsame/-/tsame-1.1.2.tgz#5ce0002acf685942789c63018797a2aa5e6b03c5" - integrity sha512-ovCs24PGjmByVPr9tSIOs/yjUX9sJl0grEmOsj9dZA/UknQkgPOKcUqM84aSCvt9awHuhc/boMzTg3BHFalxWw== - -tty-browserify@0.0.1, tty-browserify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" - integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-is@~1.6.16: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" - integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.18" - -typedarray@^0.0.6, typedarray@~0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-js@^3.1.4: - version "3.4.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" - integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== - dependencies: - commander "~2.17.1" - source-map "~0.6.1" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= - -umd@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.3.tgz#aa9fe653c42b9097678489c01000acb69f0b26cf" - integrity sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow== - -undeclared-identifiers@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz#7d850a98887cff4bd0bf64999c014d08ed6d1acc" - integrity sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ== - dependencies: - acorn-node "^1.3.0" - get-assigned-identifiers "^1.2.0" - simple-concat "^1.0.0" - xtend "^4.0.1" - -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== - -unicode-length@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/unicode-length/-/unicode-length-1.0.3.tgz#5ada7a7fed51841a418a328cf149478ac8358abb" - integrity sha1-Wtp6f+1RhBpBijKM8UlHisg1irs= - dependencies: - punycode "^1.3.2" - strip-ansi "^3.0.1" - -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== - dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-value-ecmascript@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" - integrity sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ== - -unicode-property-aliases-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" - integrity sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg== - -union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.0.5: - version "1.1.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" - integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= - -url@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util-promisify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" - integrity sha1-PCI2R2xNMsX/PEcAKt18E7moKlM= - dependencies: - object.getownpropertydescriptors "^2.0.3" - -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= - dependencies: - inherits "2.0.1" - -util@~0.10.1: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== - dependencies: - inherits "2.0.3" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^3.0.0, uuid@^3.1.0, uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -vargs@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/vargs/-/vargs-0.1.0.tgz#6b6184da6520cc3204ce1b407cac26d92609ebff" - integrity sha1-a2GE2mUgzDIEzhtAfKwm2SYJ6/8= - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vm-browserify@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019" - integrity sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw== - -vm-browserify@~0.0.1: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - integrity sha1-XX6kW7755Kb/ZflUOOCofDV9WnM= - dependencies: - indexof "0.0.1" - -walk@2.3.9: - version "2.3.9" - resolved "https://registry.yarnpkg.com/walk/-/walk-2.3.9.tgz#31b4db6678f2ae01c39ea9fb8725a9031e558a7b" - integrity sha1-MbTbZnjyrgHDnqn7hyWpAx5Vins= - dependencies: - foreachasync "^3.0.0" - -watchify@~3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/watchify/-/watchify-3.11.0.tgz#03f1355c643955e7ab8dcbf399f624644221330f" - integrity sha512-7jWG0c3cKKm2hKScnSAMUEUjRJKXUShwMPk0ASVhICycQhwND3IMAdhJYmc1mxxKzBUJTSF5HZizfrKrS6BzkA== - dependencies: - anymatch "^1.3.0" - browserify "^16.1.0" - chokidar "^1.0.0" - defined "^1.0.0" - outpipe "^1.1.0" - through2 "^2.0.0" - xtend "^4.0.0" - -wd@~1.10.0: - version "1.10.3" - resolved "https://registry.yarnpkg.com/wd/-/wd-1.10.3.tgz#395ac7eb58a98e556369f8f8e5f845d91fb152a3" - integrity sha512-ffqqZDtFFLeg5u/4pw2vYKECW+z+vW6vc+7rcqF15uu1/rmw3BydV84BONNc9DIcQ5Z7gQFS/hAuMvj53eVtSg== - dependencies: - archiver "2.1.1" - async "2.0.1" - lodash "4.17.10" - mkdirp "^0.5.1" - q "1.4.1" - request "2.85.0" - vargs "0.1.0" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@^1.2.9, which@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^1.1.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" - integrity sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8= - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - slide "^1.1.5" - -write-file-atomic@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -xml2js@~0.4.4: - version "0.4.19" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" - integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q== - dependencies: - sax ">=0.6.0" - xmlbuilder "~9.0.1" - -xmlbuilder@~9.0.1: - version "9.0.7" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= - -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yallist@^3.0.0, yallist@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== - -yamljs@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.3.0.tgz#dc060bf267447b39f7304e9b2bfbe8b5a7ddb03b" - integrity sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ== - dependencies: - argparse "^1.0.7" - glob "^7.0.5" - -yapool@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/yapool/-/yapool-1.0.0.tgz#f693f29a315b50d9a9da2646a7a6645c96985b6a" - integrity sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o= - -yargs-parser@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" - integrity sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ== - dependencies: - camelcase "^4.1.0" - -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= - dependencies: - camelcase "^4.1.0" - -yargs@11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" - integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - -zip-stream@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-1.2.0.tgz#a8bc45f4c1b49699c6b90198baacaacdbcd4ba04" - integrity sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ= - dependencies: - archiver-utils "^1.3.0" - compress-commons "^1.2.0" - lodash "^4.8.0" - readable-stream "^2.0.0" diff --git a/deps/npm/node_modules/readdir-scoped-modules/.travis.yml b/deps/npm/node_modules/readdir-scoped-modules/.travis.yml deleted file mode 100644 index e1bcee1acd90c1..00000000000000 --- a/deps/npm/node_modules/readdir-scoped-modules/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -before_script: npm install -g npm@latest -node_js: - - '0.8' - - '0.10' - - '0.12' - - 'iojs' diff --git a/deps/npm/node_modules/readdir-scoped-modules/package.json b/deps/npm/node_modules/readdir-scoped-modules/package.json index 92afa2d9929e85..08e6e67b29a6bd 100644 --- a/deps/npm/node_modules/readdir-scoped-modules/package.json +++ b/deps/npm/node_modules/readdir-scoped-modules/package.json @@ -1,34 +1,31 @@ { - "_args": [ - [ - "readdir-scoped-modules@1.0.2", - "/Users/rebecca/code/npm" - ] - ], - "_from": "readdir-scoped-modules@1.0.2", - "_id": "readdir-scoped-modules@1.0.2", + "_from": "readdir-scoped-modules@*", + "_id": "readdir-scoped-modules@1.1.0", "_inBundle": false, - "_integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", + "_integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", "_location": "/readdir-scoped-modules", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "readdir-scoped-modules@1.0.2", + "raw": "readdir-scoped-modules@*", "name": "readdir-scoped-modules", "escapedName": "readdir-scoped-modules", - "rawSpec": "1.0.2", + "rawSpec": "*", "saveSpec": null, - "fetchSpec": "1.0.2" + "fetchSpec": "*" }, "_requiredBy": [ + "#USER", "/", + "/npm-registry-mock", "/read-installed", "/read-package-tree" ], - "_resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", - "_spec": "1.0.2", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "_shasum": "8d45407b4f870a0dcaebc0e28670d18e74514309", + "_spec": "readdir-scoped-modules@*", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -37,12 +34,14 @@ "bugs": { "url": "https://github.com/npm/readdir-scoped-modules/issues" }, + "bundleDependencies": false, "dependencies": { "debuglog": "^1.0.1", "dezalgo": "^1.0.0", "graceful-fs": "^4.1.2", "once": "^1.3.0" }, + "deprecated": false, "description": "Like `fs.readdir` but handling `@org/module` dirs as if they were a single entry.", "devDependencies": { "tap": "^1.2.0" @@ -50,6 +49,9 @@ "directories": { "test": "test" }, + "files": [ + "readdir.js" + ], "homepage": "https://github.com/npm/readdir-scoped-modules", "license": "ISC", "main": "readdir.js", @@ -61,5 +63,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "1.0.2" + "version": "1.1.0" } diff --git a/deps/npm/node_modules/readdir-scoped-modules/readdir.js b/deps/npm/node_modules/readdir-scoped-modules/readdir.js index efbe5526d8ccf1..806d7870518521 100644 --- a/deps/npm/node_modules/readdir-scoped-modules/readdir.js +++ b/deps/npm/node_modules/readdir-scoped-modules/readdir.js @@ -5,6 +5,7 @@ var path = require ('path') var debug = require ('debuglog') ('rds') module . exports = readdir +readdir.sync = readdirSync function readdir (dir, cb) { fs . readdir (dir, function (er, kids) { @@ -26,6 +27,18 @@ function readdir (dir, cb) { }) } +function readdirSync (dir) { + var kids = fs . readdirSync (dir) + debug ('dir=%j, kids=%j', dir, kids) + var data = readScopesSync (dir, kids) + // Sort for bonus consistency points + data = data . sort (function (a, b) { + return a > b ? 1 : -1 + }) + + return data +} + // Turn [ 'a', '@scope' ] into // ['a', '@scope/foo', '@scope/bar'] function readScopes (root, kids, cb) { @@ -69,3 +82,40 @@ function readScopes (root, kids, cb) { cb (null, kids) } } + +function readScopesSync (root, kids) { + var scopes = kids . filter (function (kid) { + return kid . charAt (0) === '@' + }) + + kids = kids . filter (function (kid) { + return kid . charAt (0) !== '@' + }) + + debug ('scopes=%j', scopes) + + if (scopes . length === 0) + return kids + + var l = scopes . length + scopes . forEach (function (scope) { + var scopedir = path . resolve (root, scope) + debug ('root=%j scope=%j scopedir=%j', root, scope, scopedir) + then (scope, fs . readdirSync (scopedir)) + }) + + function then (scope, scopekids) { + // XXX: Not sure how old this node bug is. Maybe superstition? + scopekids = scopekids . filter (function (scopekid) { + return !(scopekid === '.' || scopekid === '..' || !scopekid) + }) + + kids . push . apply (kids, scopekids . map (function (scopekid) { + return scope + '/' + scopekid + })) + + debug ('scope=%j scopekids=%j kids=%j', scope, scopekids, kids) + } + + return kids +} diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/basic.js b/deps/npm/node_modules/readdir-scoped-modules/test/basic.js deleted file mode 100644 index 715c40d584b57d..00000000000000 --- a/deps/npm/node_modules/readdir-scoped-modules/test/basic.js +++ /dev/null @@ -1,14 +0,0 @@ -var test = require ('tap') . test -var readdir = require ('../readdir.js') - -test ('basic', function (t) { - // should not get {a,b}/{x,y}, but SHOULD get @org/ and @scope children - var expect = [ '@org/x', '@org/y', '@scope/x', '@scope/y', 'a', 'b' ] - - readdir (__dirname + '/fixtures', function (er, kids) { - if (er) - throw er - t.same(kids, expect) - t.end() - }) -}) diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/x/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/x/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/y/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/y/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/x/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/x/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/y/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/y/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/x/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/x/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/y/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/y/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/x/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/x/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/y/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/y/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/require-directory/.jshintrc b/deps/npm/node_modules/require-directory/.jshintrc new file mode 100644 index 00000000000000..e14e4dcbd2975e --- /dev/null +++ b/deps/npm/node_modules/require-directory/.jshintrc @@ -0,0 +1,67 @@ +{ + "maxerr" : 50, + "bitwise" : true, + "camelcase" : true, + "curly" : true, + "eqeqeq" : true, + "forin" : true, + "immed" : true, + "indent" : 2, + "latedef" : true, + "newcap" : true, + "noarg" : true, + "noempty" : true, + "nonew" : true, + "plusplus" : true, + "quotmark" : true, + "undef" : true, + "unused" : true, + "strict" : true, + "trailing" : true, + "maxparams" : false, + "maxdepth" : false, + "maxstatements" : false, + "maxcomplexity" : false, + "maxlen" : false, + "asi" : false, + "boss" : false, + "debug" : false, + "eqnull" : true, + "es5" : false, + "esnext" : false, + "moz" : false, + "evil" : false, + "expr" : true, + "funcscope" : true, + "globalstrict" : true, + "iterator" : true, + "lastsemic" : false, + "laxbreak" : false, + "laxcomma" : false, + "loopfunc" : false, + "multistr" : false, + "proto" : false, + "scripturl" : false, + "smarttabs" : false, + "shadow" : false, + "sub" : false, + "supernew" : false, + "validthis" : false, + "browser" : true, + "couch" : false, + "devel" : true, + "dojo" : false, + "jquery" : false, + "mootools" : false, + "node" : true, + "nonstandard" : false, + "prototypejs" : false, + "rhino" : false, + "worker" : false, + "wsh" : false, + "yui" : false, + "nomen" : true, + "onevar" : true, + "passfail" : false, + "white" : true +} diff --git a/deps/npm/node_modules/sha/.npmignore b/deps/npm/node_modules/sha/.npmignore deleted file mode 100644 index fcfd9449475544..00000000000000 --- a/deps/npm/node_modules/sha/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -test -.gitignore -.travis.yml \ No newline at end of file diff --git a/deps/npm/node_modules/sha/README.md b/deps/npm/node_modules/sha/README.md index a2b300cc0366b6..43742bf4797926 100644 --- a/deps/npm/node_modules/sha/README.md +++ b/deps/npm/node_modules/sha/README.md @@ -3,8 +3,8 @@ Check and get file hashes (using any algorithm) [![Build Status](https://img.shields.io/travis/ForbesLindesay/sha/master.svg)](https://travis-ci.org/ForbesLindesay/sha) -[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/sha.svg)](https://gemnasium.com/ForbesLindesay/sha) -[![NPM version](https://img.shields.io/npm/v/sha.svg)](http://badge.fury.io/js/sha) +[![Dependency Status](https://img.shields.io/david/ForbesLindesay/sha.svg)](https://david-dm.org/ForbesLindesay/sha) +[![NPM version](https://img.shields.io/npm/v/sha.svg)](https://www.npmjs.com/package/sha) ## Installation diff --git a/deps/npm/node_modules/sha/index.js b/deps/npm/node_modules/sha/index.js index 44e7b4b5182734..3aed3e9ccf190a 100644 --- a/deps/npm/node_modules/sha/index.js +++ b/deps/npm/node_modules/sha/index.js @@ -1,6 +1,6 @@ 'use strict' -var Transform = require('stream').Transform || require('readable-stream').Transform +var Transform = require('stream').Transform var crypto = require('crypto') var fs = require('graceful-fs') diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml deleted file mode 100644 index 40992555bf5cc0..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58dca85b2..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f24bece..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2e59507..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js 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. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node 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. -""" diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/README.md b/deps/npm/node_modules/sha/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e3009a2..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -
    -## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index c141a99c26c638..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,58 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83dbe733..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbfdf5387..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a1ca813e5acbd8..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index a9c835884828d8..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index bf34ac65e1108f..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // 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; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // 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; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // 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 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // 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. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // 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. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // 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(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// 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) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 5d1f8b876d98c7..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - 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 - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b3f4e85a2f6e35..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // 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. - this.writing = false; - - // 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, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// 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) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd90b9c2..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88cec6f3..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fdae7060..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6ee57f4..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json deleted file mode 100644 index 3f5e9beb37c601..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@^2.0.2", - "_id": "readable-stream@2.3.6", - "_inBundle": false, - "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "_location": "/sha/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.0.2", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.0.2", - "saveSpec": null, - "fetchSpec": "^2.0.2" - }, - "_requiredBy": [ - "/sha" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf", - "_spec": "readable-stream@^2.0.2", - "_where": "/Users/aeschright/code/cli/node_modules/sha", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.6" -} diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7ff275a..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e50372592ee6c6..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53306497..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26da03dc..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a85dcb19..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f80d1abc..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725465058..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE deleted file mode 100644 index 2873b3b2e59507..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js 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. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node 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. -""" diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/README.md b/deps/npm/node_modules/sha/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315ed5880..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f7933e4..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/package.json b/deps/npm/node_modules/sha/node_modules/string_decoder/package.json deleted file mode 100644 index 8bd2cfa9ab49da..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/sha/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/sha/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/aeschright/code/cli/node_modules/sha/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/deps/npm/node_modules/sha/package.json b/deps/npm/node_modules/sha/package.json index 982780769bdfcf..43b78423286e91 100644 --- a/deps/npm/node_modules/sha/package.json +++ b/deps/npm/node_modules/sha/package.json @@ -1,43 +1,43 @@ { - "_args": [ - [ - "sha@2.0.1", - "/Users/rebecca/code/npm" - ] - ], - "_from": "sha@2.0.1", - "_id": "sha@2.0.1", + "_from": "sha@3.0.0", + "_id": "sha@3.0.0", "_inBundle": false, - "_integrity": "sha1-YDCCL70smCOUn49y7WQR7lzyWq4=", + "_integrity": "sha512-DOYnM37cNsLNSGIG/zZWch5CKIRNoLdYUQTQlcgkRkoYIUwDYjqDyye16YcDZg/OPdcbUgTKMjc4SY6TB7ZAPw==", "_location": "/sha", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "sha@2.0.1", + "raw": "sha@3.0.0", "name": "sha", "escapedName": "sha", - "rawSpec": "2.0.1", + "rawSpec": "3.0.0", "saveSpec": null, - "fetchSpec": "2.0.1" + "fetchSpec": "3.0.0" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/sha/-/sha-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/sha/-/sha-3.0.0.tgz", + "_shasum": "b2f2f90af690c16a3a839a6a6c680ea51fedd1ae", + "_spec": "sha@3.0.0", + "_where": "/Users/aeschright/code/cli", "bugs": { "url": "https://github.com/ForbesLindesay/sha/issues" }, + "bundleDependencies": false, "dependencies": { - "graceful-fs": "^4.1.2", - "readable-stream": "^2.0.2" + "graceful-fs": "^4.1.2" }, + "deprecated": false, "description": "Check and get file hashes", "devDependencies": { "mocha": "~1.9.0" }, + "files": [ + "index.js" + ], "homepage": "https://github.com/ForbesLindesay/sha#readme", "license": "(BSD-2-Clause OR MIT)", "name": "sha", @@ -48,5 +48,5 @@ "scripts": { "test": "mocha -R spec" }, - "version": "2.0.1" + "version": "3.0.0" } diff --git a/deps/npm/node_modules/tar/lib/large-numbers.js b/deps/npm/node_modules/tar/lib/large-numbers.js index ff49992630fbee..3e5c99255a494a 100644 --- a/deps/npm/node_modules/tar/lib/large-numbers.js +++ b/deps/npm/node_modules/tar/lib/large-numbers.js @@ -1,12 +1,13 @@ 'use strict' // Tar can encode large and negative numbers using a leading byte of -// 0xff for negative, and 0x80 for positive. The trailing byte in the -// section will always be 0x20, or in some implementations 0x00. -// this module encodes and decodes these things. +// 0xff for negative, and 0x80 for positive. const encode = exports.encode = (num, buf) => { - buf[buf.length - 1] = 0x20 - if (num < 0) + if (!Number.isSafeInteger(num)) + // The number is so large that javascript cannot represent it with integer + // precision. + throw TypeError('cannot encode number outside of javascript safe integer range') + else if (num < 0) encodeNegative(num, buf) else encodePositive(num, buf) @@ -15,13 +16,10 @@ const encode = exports.encode = (num, buf) => { const encodePositive = (num, buf) => { buf[0] = 0x80 - for (var i = buf.length - 2; i > 0; i--) { - if (num === 0) - buf[i] = 0 - else { - buf[i] = num % 0x100 - num = Math.floor(num / 0x100) - } + + for (var i = buf.length; i > 1; i--) { + buf[i-1] = num & 0xff + num = Math.floor(num / 0x100) } } @@ -29,21 +27,16 @@ const encodeNegative = (num, buf) => { buf[0] = 0xff var flipped = false num = num * -1 - for (var i = buf.length - 2; i > 0; i--) { - var byte - if (num === 0) - byte = 0 - else { - byte = num % 0x100 - num = Math.floor(num / 0x100) - } + for (var i = buf.length; i > 1; i--) { + var byte = num & 0xff + num = Math.floor(num / 0x100) if (flipped) - buf[i] = onesComp(byte) + buf[i-1] = onesComp(byte) else if (byte === 0) - buf[i] = 0 + buf[i-1] = 0 else { flipped = true - buf[i] = twosComp(byte) + buf[i-1] = twosComp(byte) } } } @@ -51,8 +44,20 @@ const encodeNegative = (num, buf) => { const parse = exports.parse = (buf) => { var post = buf[buf.length - 1] var pre = buf[0] - return pre === 0x80 ? pos(buf.slice(1, buf.length - 1)) - : twos(buf.slice(1, buf.length - 1)) + var value; + if (pre === 0x80) + value = pos(buf.slice(1, buf.length)) + else if (pre === 0xff) + value = twos(buf) + else + throw TypeError('invalid base256 encoding') + + if (!Number.isSafeInteger(value)) + // The number is so large that javascript cannot represent it with integer + // precision. + throw TypeError('parsed number outside of javascript safe integer range') + + return value } const twos = (buf) => { @@ -71,9 +76,9 @@ const twos = (buf) => { f = twosComp(byte) } if (f !== 0) - sum += f * Math.pow(256, len - i - 1) + sum -= f * Math.pow(256, len - i - 1) } - return sum * -1 + return sum } const pos = (buf) => { diff --git a/deps/npm/node_modules/tar/lib/mkdir.js b/deps/npm/node_modules/tar/lib/mkdir.js index 382329ef513739..c6a154c24fe600 100644 --- a/deps/npm/node_modules/tar/lib/mkdir.js +++ b/deps/npm/node_modules/tar/lib/mkdir.js @@ -69,7 +69,7 @@ const mkdir = module.exports = (dir, opt, cb) => { return done() if (dir === cwd) - return fs.lstat(dir, (er, st) => { + return fs.stat(dir, (er, st) => { if (er || !st.isDirectory()) er = new CwdError(dir, er && er.code || 'ENOTDIR') done(er) @@ -154,7 +154,7 @@ const mkdirSync = module.exports.sync = (dir, opt) => { let ok = false let code = 'ENOTDIR' try { - ok = fs.lstatSync(dir).isDirectory() + ok = fs.statSync(dir).isDirectory() } catch (er) { code = er.code } finally { diff --git a/deps/npm/node_modules/tar/node_modules/chownr/LICENSE b/deps/npm/node_modules/tar/node_modules/chownr/LICENSE deleted file mode 100644 index 19129e315fe593..00000000000000 --- a/deps/npm/node_modules/tar/node_modules/chownr/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 70e9a54a32b8e0..00000000000000 --- a/deps/npm/node_modules/tar/node_modules/chownr/README.md +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 7e63928827e2c6..00000000000000 --- a/deps/npm/node_modules/tar/node_modules/chownr/chownr.js +++ /dev/null @@ -1,88 +0,0 @@ -'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 deleted file mode 100644 index 41e75b7fa66791..00000000000000 --- a/deps/npm/node_modules/tar/node_modules/chownr/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_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/package.json b/deps/npm/node_modules/tar/package.json index 9d96d30ebed6d9..a41cc80aae14d5 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -1,31 +1,31 @@ { - "_from": "tar@4.4.8", - "_id": "tar@4.4.8", + "_from": "tar@latest", + "_id": "tar@4.4.10", "_inBundle": false, - "_integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "_integrity": "sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==", "_location": "/tar", "_phantomChildren": { "safe-buffer": "5.1.2" }, "_requested": { - "type": "version", + "type": "tag", "registry": true, - "raw": "tar@4.4.8", + "raw": "tar@latest", "name": "tar", "escapedName": "tar", - "rawSpec": "4.4.8", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "4.4.8" + "fetchSpec": "latest" }, "_requiredBy": [ "#USER", "/", "/pacote" ], - "_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", + "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.10.tgz", + "_shasum": "946b2810b9a5e0b26140cf78bea6b0b0d689eba1", + "_spec": "tar@latest", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -38,11 +38,11 @@ "dependencies": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" }, "deprecated": false, "description": "tar for node", @@ -51,8 +51,8 @@ "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", + "rimraf": "^2.6.3", + "tap": "^14.2.0", "tar-fs": "^1.16.3", "tar-stream": "^1.6.2" }, @@ -73,10 +73,14 @@ "scripts": { "bench": "for i in benchmarks/*/*.js; do echo $i; for j in {1..5}; do node $i || break; done; done", "genparse": "node scripts/generate-parse-fixtures.js", - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", - "test": "tap test/*.js --100 -J --coverage-report=text -c" + "test": "tap" }, - "version": "4.4.8" + "tap": { + "coverage-map": "map.js", + "check-coverage": true + }, + "version": "4.4.10" } diff --git a/deps/npm/node_modules/through2/.nyc_output/28dcebf0-9c4a-47bb-900e-93fcef37bbe2.json b/deps/npm/node_modules/through2/.nyc_output/28dcebf0-9c4a-47bb-900e-93fcef37bbe2.json new file mode 100644 index 00000000000000..78548b9a4a5f03 --- /dev/null +++ b/deps/npm/node_modules/through2/.nyc_output/28dcebf0-9c4a-47bb-900e-93fcef37bbe2.json @@ -0,0 +1 @@ +{"/Users/rvagg/git/through2/through2.js":{"path":"/Users/rvagg/git/through2/through2.js","statementMap":{"0":{"start":{"line":1,"column":16},"end":{"line":1,"column":52}},"1":{"start":{"line":2,"column":16},"end":{"line":2,"column":40}},"2":{"start":{"line":5,"column":2},"end":{"line":5,"column":28}},"3":{"start":{"line":6,"column":2},"end":{"line":6,"column":25}},"4":{"start":{"line":9,"column":0},"end":{"line":9,"column":41}},"5":{"start":{"line":11,"column":0},"end":{"line":21,"column":1}},"6":{"start":{"line":12,"column":2},"end":{"line":12,"column":29}},"7":{"start":{"line":12,"column":23},"end":{"line":12,"column":29}},"8":{"start":{"line":13,"column":2},"end":{"line":13,"column":24}},"9":{"start":{"line":15,"column":13},"end":{"line":15,"column":17}},"10":{"start":{"line":16,"column":2},"end":{"line":20,"column":4}},"11":{"start":{"line":17,"column":4},"end":{"line":18,"column":29}},"12":{"start":{"line":18,"column":6},"end":{"line":18,"column":29}},"13":{"start":{"line":19,"column":4},"end":{"line":19,"column":22}},"14":{"start":{"line":25,"column":2},"end":{"line":25,"column":23}},"15":{"start":{"line":32,"column":2},"end":{"line":46,"column":3}},"16":{"start":{"line":33,"column":4},"end":{"line":37,"column":5}},"17":{"start":{"line":34,"column":6},"end":{"line":34,"column":27}},"18":{"start":{"line":35,"column":6},"end":{"line":35,"column":25}},"19":{"start":{"line":36,"column":6},"end":{"line":36,"column":20}},"20":{"start":{"line":39,"column":4},"end":{"line":40,"column":22}},"21":{"start":{"line":40,"column":6},"end":{"line":40,"column":22}},"22":{"start":{"line":42,"column":4},"end":{"line":43,"column":18}},"23":{"start":{"line":43,"column":6},"end":{"line":43,"column":18}},"24":{"start":{"line":45,"column":4},"end":{"line":45,"column":47}},"25":{"start":{"line":51,"column":0},"end":{"line":60,"column":2}},"26":{"start":{"line":52,"column":11},"end":{"line":52,"column":44}},"27":{"start":{"line":54,"column":2},"end":{"line":54,"column":27}},"28":{"start":{"line":56,"column":2},"end":{"line":57,"column":21}},"29":{"start":{"line":57,"column":4},"end":{"line":57,"column":21}},"30":{"start":{"line":59,"column":2},"end":{"line":59,"column":11}},"31":{"start":{"line":65,"column":0},"end":{"line":83,"column":2}},"32":{"start":{"line":67,"column":4},"end":{"line":68,"column":35}},"33":{"start":{"line":68,"column":6},"end":{"line":68,"column":35}},"34":{"start":{"line":70,"column":4},"end":{"line":70,"column":55}},"35":{"start":{"line":72,"column":4},"end":{"line":72,"column":49}},"36":{"start":{"line":75,"column":2},"end":{"line":75,"column":42}},"37":{"start":{"line":77,"column":2},"end":{"line":77,"column":43}},"38":{"start":{"line":79,"column":2},"end":{"line":80,"column":37}},"39":{"start":{"line":80,"column":4},"end":{"line":80,"column":37}},"40":{"start":{"line":82,"column":2},"end":{"line":82,"column":17}},"41":{"start":{"line":86,"column":0},"end":{"line":95,"column":2}},"42":{"start":{"line":87,"column":11},"end":{"line":87,"column":100}},"43":{"start":{"line":89,"column":2},"end":{"line":89,"column":27}},"44":{"start":{"line":91,"column":2},"end":{"line":92,"column":21}},"45":{"start":{"line":92,"column":4},"end":{"line":92,"column":21}},"46":{"start":{"line":94,"column":2},"end":{"line":94,"column":11}}},"fnMap":{"0":{"name":"DestroyableTransform","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":29}},"loc":{"start":{"line":4,"column":36},"end":{"line":7,"column":1}},"line":4},"1":{"name":"(anonymous_1)","decl":{"start":{"line":11,"column":41},"end":{"line":11,"column":42}},"loc":{"start":{"line":11,"column":55},"end":{"line":21,"column":1}},"line":11},"2":{"name":"(anonymous_2)","decl":{"start":{"line":16,"column":19},"end":{"line":16,"column":20}},"loc":{"start":{"line":16,"column":30},"end":{"line":20,"column":3}},"line":16},"3":{"name":"noop","decl":{"start":{"line":24,"column":9},"end":{"line":24,"column":13}},"loc":{"start":{"line":24,"column":37},"end":{"line":26,"column":1}},"line":24},"4":{"name":"through2","decl":{"start":{"line":31,"column":9},"end":{"line":31,"column":17}},"loc":{"start":{"line":31,"column":30},"end":{"line":47,"column":1}},"line":31},"5":{"name":"(anonymous_5)","decl":{"start":{"line":32,"column":9},"end":{"line":32,"column":10}},"loc":{"start":{"line":32,"column":46},"end":{"line":46,"column":3}},"line":32},"6":{"name":"(anonymous_6)","decl":{"start":{"line":51,"column":26},"end":{"line":51,"column":27}},"loc":{"start":{"line":51,"column":63},"end":{"line":60,"column":1}},"line":51},"7":{"name":"(anonymous_7)","decl":{"start":{"line":65,"column":31},"end":{"line":65,"column":32}},"loc":{"start":{"line":65,"column":68},"end":{"line":83,"column":1}},"line":65},"8":{"name":"Through2","decl":{"start":{"line":66,"column":11},"end":{"line":66,"column":19}},"loc":{"start":{"line":66,"column":31},"end":{"line":73,"column":3}},"line":66},"9":{"name":"(anonymous_9)","decl":{"start":{"line":86,"column":30},"end":{"line":86,"column":31}},"loc":{"start":{"line":86,"column":67},"end":{"line":95,"column":1}},"line":86}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":2},"end":{"line":12,"column":29}},"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":12,"column":29}},{"start":{"line":12,"column":2},"end":{"line":12,"column":29}}],"line":12},"1":{"loc":{"start":{"line":17,"column":4},"end":{"line":18,"column":29}},"type":"if","locations":[{"start":{"line":17,"column":4},"end":{"line":18,"column":29}},{"start":{"line":17,"column":4},"end":{"line":18,"column":29}}],"line":17},"2":{"loc":{"start":{"line":33,"column":4},"end":{"line":37,"column":5}},"type":"if","locations":[{"start":{"line":33,"column":4},"end":{"line":37,"column":5}},{"start":{"line":33,"column":4},"end":{"line":37,"column":5}}],"line":33},"3":{"loc":{"start":{"line":39,"column":4},"end":{"line":40,"column":22}},"type":"if","locations":[{"start":{"line":39,"column":4},"end":{"line":40,"column":22}},{"start":{"line":39,"column":4},"end":{"line":40,"column":22}}],"line":39},"4":{"loc":{"start":{"line":42,"column":4},"end":{"line":43,"column":18}},"type":"if","locations":[{"start":{"line":42,"column":4},"end":{"line":43,"column":18}},{"start":{"line":42,"column":4},"end":{"line":43,"column":18}}],"line":42},"5":{"loc":{"start":{"line":56,"column":2},"end":{"line":57,"column":21}},"type":"if","locations":[{"start":{"line":56,"column":2},"end":{"line":57,"column":21}},{"start":{"line":56,"column":2},"end":{"line":57,"column":21}}],"line":56},"6":{"loc":{"start":{"line":67,"column":4},"end":{"line":68,"column":35}},"type":"if","locations":[{"start":{"line":67,"column":4},"end":{"line":68,"column":35}},{"start":{"line":67,"column":4},"end":{"line":68,"column":35}}],"line":67},"7":{"loc":{"start":{"line":79,"column":2},"end":{"line":80,"column":37}},"type":"if","locations":[{"start":{"line":79,"column":2},"end":{"line":80,"column":37}},{"start":{"line":79,"column":2},"end":{"line":80,"column":37}}],"line":79},"8":{"loc":{"start":{"line":91,"column":2},"end":{"line":92,"column":21}},"type":"if","locations":[{"start":{"line":91,"column":2},"end":{"line":92,"column":21}},{"start":{"line":91,"column":2},"end":{"line":92,"column":21}}],"line":91}},"s":{"0":1,"1":1,"2":16,"3":16,"4":1,"5":1,"6":3,"7":1,"8":2,"9":2,"10":2,"11":2,"12":0,"13":2,"14":0,"15":3,"16":15,"17":8,"18":8,"19":8,"20":15,"21":2,"22":15,"23":14,"24":15,"25":1,"26":6,"27":6,"28":6,"29":1,"30":6,"31":1,"32":16,"33":7,"34":9,"35":9,"36":8,"37":8,"38":8,"39":0,"40":8,"41":1,"42":1,"43":1,"44":1,"45":0,"46":1},"f":{"0":16,"1":3,"2":2,"3":0,"4":3,"5":15,"6":6,"7":8,"8":16,"9":1},"b":{"0":[1,2],"1":[0,2],"2":[8,7],"3":[2,13],"4":[14,1],"5":[1,5],"6":[7,9],"7":[0,8],"8":[0,1]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"0e6d9c139041e468222a5271346b1d4b44840ea4","contentHash":"e8d9fa1f16cd3fbb5bfdcbe9002323f0"}} \ No newline at end of file diff --git a/deps/npm/node_modules/util-promisify/.npmignore b/deps/npm/node_modules/util-promisify/.npmignore new file mode 100644 index 00000000000000..3c3629e647f5dd --- /dev/null +++ b/deps/npm/node_modules/util-promisify/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/deps/npm/node_modules/util-promisify/.travis.yml b/deps/npm/node_modules/util-promisify/.travis.yml new file mode 100644 index 00000000000000..58e15d6302e26e --- /dev/null +++ b/deps/npm/node_modules/util-promisify/.travis.yml @@ -0,0 +1,8 @@ +sudo: false +language: node_js +node_js: + - 4 + - 5 + - 6 + - 7 + - 8 diff --git a/deps/npm/node_modules/util-promisify/LICENSE b/deps/npm/node_modules/util-promisify/LICENSE new file mode 100644 index 00000000000000..d17113b221c0c3 --- /dev/null +++ b/deps/npm/node_modules/util-promisify/LICENSE @@ -0,0 +1,1072 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js 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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node 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. +""" + +The Node.js license applies to all parts of Node.js that are not externally +maintained libraries. + +The externally maintained libraries used by Node.js are: + +- c-ares, located at deps/cares, is licensed as follows: + """ + Copyright 1998 by the Massachusetts Institute of Technology. + Copyright (C) 2007-2013 by Daniel Stenberg + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright + notice and this permission notice appear in supporting + documentation, and that the name of M.I.T. not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + M.I.T. makes no representations about the suitability of + this software for any purpose. It is provided "as is" + without express or implied warranty. + """ + +- HTTP Parser, located at deps/http_parser, is licensed as follows: + """ + http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright + Igor Sysoev. + + Additional changes are licensed under the same terms as NGINX and + copyright Joyent, Inc. and other Node 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. + """ + +- ICU, located at deps/icu-small, is licensed as follows: + """ + COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) + + Copyright © 1991-2016 Unicode, Inc. All rights reserved. + Distributed under the Terms of Use in http://www.unicode.org/copyright.html + + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Unicode data files and any associated documentation + (the "Data Files") or Unicode software and any associated documentation + (the "Software") to deal in the Data Files or Software + without restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, and/or sell copies of + the Data Files or Software, and to permit persons to whom the Data Files + or Software are furnished to do so, provided that either + (a) this copyright and permission notice appear with all copies + of the Data Files or Software, or + (b) this copyright and permission notice appear in associated + Documentation. + + THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 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 THE DATA FILES OR SOFTWARE. + + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in these Data Files or Software without prior + written authorization of the copyright holder. + + --------------------- + + Third-Party Software Licenses + + This section contains third-party software notices and/or additional + terms for licensed third-party software components included within ICU + libraries. + + 1. ICU License - ICU 1.8.1 to ICU 57.1 + + COPYRIGHT AND PERMISSION NOTICE + + Copyright (c) 1995-2016 International Business Machines Corporation and others + 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, and/or sell copies of the Software, and to permit persons + to whom the Software is furnished to do so, provided that the above + copyright notice(s) and this permission notice appear in all copies of + the Software and that both the above copyright notice(s) and this + permission notice appear in supporting documentation. + + 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 + OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY + SPECIAL 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. + + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, use + or other dealings in this Software without prior written authorization + of the copyright holder. + + All trademarks and registered trademarks mentioned herein are the + property of their respective owners. + + 2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt) + + # The Google Chrome software developed by Google is licensed under + # the BSD license. Other software included in this distribution is + # provided under other licenses, as set forth below. + # + # The BSD License + # http://opensource.org/licenses/bsd-license.php + # Copyright (C) 2006-2008, Google Inc. + # + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are met: + # + # Redistributions of source code must retain the above copyright notice, + # this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided with + # the distribution. + # Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # + # The word list in cjdict.txt are generated by combining three word lists + # listed below with further processing for compound word breaking. The + # frequency is generated with an iterative training against Google web + # corpora. + # + # * Libtabe (Chinese) + # - https://sourceforge.net/project/?group_id=1519 + # - Its license terms and conditions are shown below. + # + # * IPADIC (Japanese) + # - http://chasen.aist-nara.ac.jp/chasen/distribution.html + # - Its license terms and conditions are shown below. + # + # ---------COPYING.libtabe ---- BEGIN-------------------- + # + # /* + # * Copyrighy (c) 1999 TaBE Project. + # * Copyright (c) 1999 Pai-Hsiang Hsiao. + # * All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the TaBE Project nor the names of its + # * contributors may be used to endorse or promote products derived + # * from this software without specific prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # /* + # * Copyright (c) 1999 Computer Systems and Communication Lab, + # * Institute of Information Science, Academia + # * Sinica. All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the Computer Systems and Communication Lab + # * nor the names of its contributors may be used to endorse or + # * promote products derived from this software without specific + # * prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, + # University of Illinois + # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 + # + # ---------------COPYING.libtabe-----END-------------------------------- + # + # + # ---------------COPYING.ipadic-----BEGIN------------------------------- + # + # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science + # and Technology. All Rights Reserved. + # + # Use, reproduction, and distribution of this software is permitted. + # Any copy of this software, whether in its original form or modified, + # must include both the above copyright notice and the following + # paragraphs. + # + # Nara Institute of Science and Technology (NAIST), + # the copyright holders, disclaims all warranties with regard to this + # software, including all implied warranties of merchantability and + # fitness, in no event shall NAIST be liable for + # any special, 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 tortuous action, arising out + # of or in connection with the use or performance of this software. + # + # A large portion of the dictionary entries + # originate from ICOT Free Software. The following conditions for ICOT + # Free Software applies to the current dictionary as well. + # + # Each User may also freely distribute the Program, whether in its + # original form or modified, to any third party or parties, PROVIDED + # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear + # on, or be attached to, the Program, which is distributed substantially + # in the same form as set out herein and that such intended + # distribution, if actually made, will neither violate or otherwise + # contravene any of the laws and regulations of the countries having + # jurisdiction over the User or the intended distribution itself. + # + # NO WARRANTY + # + # The program was produced on an experimental basis in the course of the + # research and development conducted during the project and is provided + # to users as so produced on an experimental basis. Accordingly, the + # program is provided without any warranty whatsoever, whether express, + # implied, statutory or otherwise. The term "warranty" used herein + # includes, but is not limited to, any warranty of the quality, + # performance, merchantability and fitness for a particular purpose of + # the program and the nonexistence of any infringement or violation of + # any right of any third party. + # + # Each user of the program will agree and understand, and be deemed to + # have agreed and understood, that there is no warranty whatsoever for + # the program and, accordingly, the entire risk arising from or + # otherwise connected with the program is assumed by the user. + # + # Therefore, neither ICOT, the copyright holder, or any other + # organization that participated in or was otherwise related to the + # development of the program and their respective officials, directors, + # officers and other employees shall be held liable for any and all + # damages, including, without limitation, general, special, incidental + # and consequential damages, arising out of or otherwise in connection + # with the use or inability to use the program or any product, material + # or result produced or otherwise obtained by using the program, + # regardless of whether they have been advised of, or otherwise had + # knowledge of, the possibility of such damages at any time during the + # project or thereafter. Each user will be deemed to have agreed to the + # foregoing by his or her commencement of use of the program. The term + # "use" as used herein includes, but is not limited to, the use, + # modification, copying and distribution of the program and the + # production of secondary products from the program. + # + # In the case where the program, whether in its original form or + # modified, was distributed or delivered to or received by a user from + # any person, organization or entity other than ICOT, unless it makes or + # grants independently of ICOT any specific warranty to the user in + # writing, such person, organization or entity, will also be exempted + # from and not be held liable to the user for any such damages as noted + # above as far as the program is concerned. + # + # ---------------COPYING.ipadic-----END---------------------------------- + + 3. Lao Word Break Dictionary Data (laodict.txt) + + # Copyright (c) 2013 International Business Machines Corporation + # and others. All Rights Reserved. + # + # Project: http://code.google.com/p/lao-dictionary/ + # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt + # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt + # (copied below) + # + # This file is derived from the above dictionary, with slight + # modifications. + # ---------------------------------------------------------------------- + # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, + # are permitted provided that the following conditions are met: + # + # + # Redistributions of source code must retain the above copyright notice, this + # list of conditions and the following disclaimer. Redistributions in + # binary form must reproduce the above copyright notice, this list of + # conditions and the following disclaimer in the documentation and/or + # other materials provided with the distribution. + # + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # OF THE POSSIBILITY OF SUCH DAMAGE. + # -------------------------------------------------------------------------- + + 4. Burmese Word Break Dictionary Data (burmesedict.txt) + + # Copyright (c) 2014 International Business Machines Corporation + # and others. All Rights Reserved. + # + # This list is part of a project hosted at: + # github.com/kanyawtech/myanmar-karen-word-lists + # + # -------------------------------------------------------------------------- + # Copyright (c) 2013, LeRoy Benjamin Sharon + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: Redistributions of source code must retain the above + # copyright notice, this list of conditions and the following + # disclaimer. Redistributions in binary form must reproduce the + # above copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided + # with the distribution. + # + # Neither the name Myanmar Karen Word Lists, nor the names of its + # contributors may be used to endorse or promote products derived + # from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # -------------------------------------------------------------------------- + + 5. Time Zone Database + + ICU uses the public domain data and code derived from Time Zone + Database for its time zone support. The ownership of the TZ database + is explained in BCP 175: Procedure for Maintaining the Time Zone + Database section 7. + + # 7. Database Ownership + # + # The TZ database itself is not an IETF Contribution or an IETF + # document. Rather it is a pre-existing and regularly updated work + # that is in the public domain, and is intended to remain in the + # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do + # not apply to the TZ Database or contributions that individuals make + # to it. Should any claims be made and substantiated against the TZ + # Database, the organization that is providing the IANA + # Considerations defined in this RFC, under the memorandum of + # understanding with the IETF, currently ICANN, may act in accordance + # with all competent court orders. No ownership claims will be made + # by ICANN or the IETF Trust on the database or the code. Any person + # making a contribution to the database or code waives all rights to + # future claims in that contribution or in the TZ Database. + """ + +- libuv, located at deps/uv, is licensed as follows: + """ + libuv is part of the Node project: http://nodejs.org/ + libuv may be distributed alone under Node's license: + + ==== + + Copyright Joyent, Inc. and other Node 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. + + ==== + + This license applies to all parts of libuv that are not externally + maintained libraries. + + The externally maintained libraries used by libuv are: + + - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license. + + - inet_pton and inet_ntop implementations, contained in src/inet.c, are + copyright the Internet Systems Consortium, Inc., and licensed under the ISC + license. + + - stdint-msvc2008.h (from msinttypes), copyright Alexander Chemeris. Three + clause BSD license. + + - pthread-fixes.h, pthread-fixes.c, copyright Google Inc. and Sony Mobile + Communications AB. Three clause BSD license. + + - android-ifaddrs.h, android-ifaddrs.c, copyright Berkeley Software Design + Inc, Kenneth MacKay and Emergya (Cloud4all, FP7/2007-2013, grant agreement + n° 289016). Three clause BSD license. + """ + +- OpenSSL, located at deps/openssl, is licensed as follows: + """ + Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + openssl-core@openssl.org. + + 5. Products derived from this software may not be called "OpenSSL" + nor may "OpenSSL" appear in their names without prior written + permission of the OpenSSL Project. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit (http://www.openssl.org/)" + + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + ==================================================================== + + This product includes cryptographic software written by Eric Young + (eay@cryptsoft.com). This product includes software written by Tim + Hudson (tjh@cryptsoft.com). + """ + +- Punycode.js, located at lib/punycode.js, is licensed as follows: + """ + Copyright Mathias Bynens + + 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. + """ + +- V8, located at deps/v8, is licensed as follows: + """ + This license applies to all parts of V8 that are not externally + maintained libraries. The externally maintained libraries used by V8 + are: + + - PCRE test suite, located in + test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the + test suite from PCRE-7.3, which is copyrighted by the University + of Cambridge and Google, Inc. The copyright notice and license + are embedded in regexp-pcre.js. + + - Layout tests, located in test/mjsunit/third_party/object-keys. These are + based on layout tests from webkit.org which are copyrighted by + Apple Computer, Inc. and released under a 3-clause BSD license. + + - Strongtalk assembler, the basis of the files assembler-arm-inl.h, + assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h, + assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h, + assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h, + assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h. + This code is copyrighted by Sun Microsystems Inc. and released + under a 3-clause BSD license. + + - Valgrind client API header, located at third_party/valgrind/valgrind.h + This is release under the BSD license. + + These libraries have their own licenses; we recommend you read them, + as their terms may differ from the terms below. + + Further license information can be found in LICENSE files located in + sub-directories. + + Copyright 2014, the V8 project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- zlib, located at deps/zlib, is licensed as follows: + """ + zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.8, April 28th, 2013 + + Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + """ + +- npm, located at deps/npm, is licensed as follows: + """ + The npm application + Copyright (c) npm, Inc. and Contributors + Licensed on the terms of The Artistic License 2.0 + + Node package dependencies of the npm application + Copyright (c) their respective copyright owners + Licensed on their respective license terms + + The npm public registry at https://registry.npmjs.org + and the npm website at https://www.npmjs.com + Operated by npm, Inc. + Use governed by terms published on https://www.npmjs.com + + "Node.js" + Trademark Joyent, Inc., https://joyent.com + Neither npm nor npm, Inc. are affiliated with Joyent, Inc. + + The Node.js application + Project of Node Foundation, https://nodejs.org + + The npm Logo + Copyright (c) Mathias Pettersson and Brian Hammond + + "Gubblebum Blocky" typeface + Copyright (c) Tjarda Koster, https://jelloween.deviantart.com + Used with permission + + -------- + + The Artistic License 2.0 + + Copyright (c) 2000-2006, The Perl Foundation. + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + This license establishes the terms under which a given free software + Package may be copied, modified, distributed, and/or redistributed. + The intent is that the Copyright Holder maintains some artistic + control over the development of that Package while still keeping the + Package available as open source and free software. + + You are always permitted to make arrangements wholly outside of this + license directly with the Copyright Holder of a given Package. If the + terms of this license do not permit the full use that you propose to + make of the Package, you should contact the Copyright Holder and seek + a different licensing arrangement. + + Definitions + + "Copyright Holder" means the individual(s) or organization(s) + named in the copyright notice for the entire Package. + + "Contributor" means any party that has contributed code or other + material to the Package, in accordance with the Copyright Holder's + procedures. + + "You" and "your" means any person who would like to copy, + distribute, or modify the Package. + + "Package" means the collection of files distributed by the + Copyright Holder, and derivatives of that collection and/or of + those files. A given Package may consist of either the Standard + Version, or a Modified Version. + + "Distribute" means providing a copy of the Package or making it + accessible to anyone else, or in the case of a company or + organization, to others outside of your company or organization. + + "Distributor Fee" means any fee that you charge for Distributing + this Package or providing support for this Package to another + party. It does not mean licensing fees. + + "Standard Version" refers to the Package if it has not been + modified, or has been modified only in ways explicitly requested + by the Copyright Holder. + + "Modified Version" means the Package, if it has been changed, and + such changes were not explicitly requested by the Copyright + Holder. + + "Original License" means this Artistic License as Distributed with + the Standard Version of the Package, in its current version or as + it may be modified by The Perl Foundation in the future. + + "Source" form means the source code, documentation source, and + configuration files for the Package. + + "Compiled" form means the compiled bytecode, object code, binary, + or any other form resulting from mechanical transformation or + translation of the Source form. + + Permission for Use and Modification Without Distribution + + (1) You are permitted to use the Standard Version and create and use + Modified Versions for any purpose without restriction, provided that + you do not Distribute the Modified Version. + + Permissions for Redistribution of the Standard Version + + (2) You may Distribute verbatim copies of the Source form of the + Standard Version of this Package in any medium without restriction, + either gratis or for a Distributor Fee, provided that you duplicate + all of the original copyright notices and associated disclaimers. At + your discretion, such verbatim copies may or may not include a + Compiled form of the Package. + + (3) You may apply any bug fixes, portability changes, and other + modifications made available from the Copyright Holder. The resulting + Package will still be considered the Standard Version, and as such + will be subject to the Original License. + + Distribution of Modified Versions of the Package as Source + + (4) You may Distribute your Modified Version as Source (either gratis + or for a Distributor Fee, and with or without a Compiled form of the + Modified Version) provided that you clearly document how it differs + from the Standard Version, including, but not limited to, documenting + any non-standard features, executables, or modules, and provided that + you do at least ONE of the following: + + (a) make the Modified Version available to the Copyright Holder + of the Standard Version, under the Original License, so that the + Copyright Holder may include your modifications in the Standard + Version. + + (b) ensure that installation of your Modified Version does not + prevent the user installing or running the Standard Version. In + addition, the Modified Version must bear a name that is different + from the name of the Standard Version. + + (c) allow anyone who receives a copy of the Modified Version to + make the Source form of the Modified Version available to others + under + + (i) the Original License or + + (ii) a license that permits the licensee to freely copy, + modify and redistribute the Modified Version using the same + licensing terms that apply to the copy that the licensee + received, and requires that the Source form of the Modified + Version, and of any works derived from it, be made freely + available in that license fees are prohibited but Distributor + Fees are allowed. + + Distribution of Compiled Forms of the Standard Version + or Modified Versions without the Source + + (5) You may Distribute Compiled forms of the Standard Version without + the Source, provided that you include complete instructions on how to + get the Source of the Standard Version. Such instructions must be + valid at the time of your distribution. If these instructions, at any + time while you are carrying out such distribution, become invalid, you + must provide new instructions on demand or cease further distribution. + If you provide valid instructions or cease distribution within thirty + days after you become aware that the instructions are invalid, then + you do not forfeit any of your rights under this license. + + (6) You may Distribute a Modified Version in Compiled form without + the Source, provided that you comply with Section 4 with respect to + the Source of the Modified Version. + + Aggregating or Linking the Package + + (7) You may aggregate the Package (either the Standard Version or + Modified Version) with other packages and Distribute the resulting + aggregation provided that you do not charge a licensing fee for the + Package. Distributor Fees are permitted, and licensing fees for other + components in the aggregation are permitted. The terms of this license + apply to the use and Distribution of the Standard or Modified Versions + as included in the aggregation. + + (8) You are permitted to link Modified and Standard Versions with + other works, to embed the Package in a larger work of your own, or to + build stand-alone binary or bytecode versions of applications that + include the Package, and Distribute the result without restriction, + provided the result does not expose a direct interface to the Package. + + Items That are Not Considered Part of a Modified Version + + (9) Works (including, but not limited to, modules and scripts) that + merely extend or make use of the Package, do not, by themselves, cause + the Package to be a Modified Version. In addition, such works are not + considered parts of the Package itself, and are not subject to the + terms of this license. + + General Provisions + + (10) Any use, modification, and distribution of the Standard or + Modified Versions is governed by this Artistic License. By using, + modifying or distributing the Package, you accept this license. Do not + use, modify, or distribute the Package, if you do not accept this + license. + + (11) If your Modified Version has been derived from a Modified + Version made by someone other than you, you are nevertheless required + to ensure that your Modified Version complies with the requirements of + this license. + + (12) This license does not grant you the right to use any trademark, + service mark, tradename, or logo of the Copyright Holder. + + (13) This license includes the non-exclusive, worldwide, + free-of-charge patent license to make, have made, use, offer to sell, + sell, import and otherwise transfer the Package with respect to any + patent claims licensable by the Copyright Holder that are necessarily + infringed by the Package. If you institute patent litigation + (including a cross-claim or counterclaim) against any party alleging + that the Package constitutes direct or contributory patent + infringement, then this Artistic License to you shall terminate on the + date that such litigation is filed. + + (14) Disclaimer of Warranty: + THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS + IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR + NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL + LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL + DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + -------- + """ + +- GYP, located at tools/gyp, is licensed as follows: + """ + Copyright (c) 2009 Google Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- marked, located at tools/doc/node_modules/marked, is licensed as follows: + """ + Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/) + + 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. + """ + +- cpplint.py, located at tools/cpplint.py, is licensed as follows: + """ + Copyright (c) 2009 Google Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- ESLint, located at tools/eslint, is licensed as follows: + """ + ESLint + Copyright jQuery Foundation and other contributors, https://jquery.org/ + + 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. + """ + +- gtest, located at deps/gtest, is licensed as follows: + """ + Copyright 2008, Google Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ diff --git a/deps/npm/node_modules/util-promisify/README.md b/deps/npm/node_modules/util-promisify/README.md new file mode 100644 index 00000000000000..18c84207beacbc --- /dev/null +++ b/deps/npm/node_modules/util-promisify/README.md @@ -0,0 +1,42 @@ + +# util-promisify + +Node 8's [`require('util').promisify`](https://nodejs.org/api/util.html#util_util_promisify_original) as a node module, so you can use it right now! + +Supports [all major node versions](https://github.com/nodejs/LTS#lts-schedule1). + +[![build status](https://travis-ci.org/juliangruber/util-promisify.svg?branch=master)](http://travis-ci.org/juliangruber/util-promisify) +[![downloads](https://img.shields.io/npm/dm/util-promisify.svg)](https://www.npmjs.org/package/util-promisify) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/util-promisify.svg)](https://greenkeeper.io/) + +## Usage + +```js +const promisify = require('util-promisify'); +const fs = require('fs'); + +const stat = promisify(fs.stat); + +stat('/tmp/').then(s => { + // ... +}); +``` + +## Installation + +```bash +$ npm install util-promisify +``` + +## API + +See `util.promisify`'s [API docs](https://nodejs.org/api/util.html#util_util_promisify_original). + +### promisify(original) +### (Symbol) promisify.custom + +If available, the Symbol is reexported from node core's `util` module. + +## License + +MIT diff --git a/deps/npm/node_modules/util-promisify/index.js b/deps/npm/node_modules/util-promisify/index.js new file mode 100644 index 00000000000000..2d2719ed1f794d --- /dev/null +++ b/deps/npm/node_modules/util-promisify/index.js @@ -0,0 +1,91 @@ +'use strict'; + +const ObjectGetOwnPropertyDescriptors = require('object.getownpropertydescriptors'); +const util = require('util'); +const timers = require('timers'); + +const kCustomPromisifiedSymbol = util.promisify && util.promisify.custom || Symbol('util.promisify.custom'); +//const kCustomPromisifyArgsSymbol = Symbol('customPromisifyArgs'); + +function promisify(orig) { + if (typeof orig !== 'function') { + //const errors = require('internal/errors'); + //throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function'); + var err = TypeError(`The "original" argument must be of type function`); + err.code = 'ERR_INVALID_ARG_TYPE'; + err.name = `TypeError [${err.code}]`; + throw err + } + + if (orig === timers.setTimeout || orig === timers.setImmediate) { + const _orig = orig + orig = function () { + var args = []; + for (var i = 0; i < arguments.length; i ++) args.push(arguments[i]); + const _cb = args.pop() + const cb = function () { + var args = []; + for (var i = 0; i < arguments.length; i ++) args.push(arguments[i]); + _cb.apply(null, [null].concat(args)) + } + _orig.apply(timers, [cb].concat(args)) + } + } + + if (orig[kCustomPromisifiedSymbol]) { + const fn = orig[kCustomPromisifiedSymbol]; + if (typeof fn !== 'function') { + throw new TypeError('The [util.promisify.custom] property must be ' + + 'a function'); + } + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return fn; + } + + // Names to create an object from in case the callback receives multiple + // arguments, e.g. ['stdout', 'stderr'] for child_process.exec. + //const argumentNames = orig[kCustomPromisifyArgsSymbol]; + + function fn() { + var args = []; + for (var i = 0; i < arguments.length; i ++) args.push(arguments[i]); + + let resolve, reject; + const promise = new Promise(function (_resolve, _reject) { + resolve = _resolve; + reject = _reject; + }); + try { + orig.apply(this, args.concat(function (err) { + var values = []; + for (var i = 1; i < arguments.length; i++) values.push(arguments[i]); + if (err) { + reject(err); + //} else if (argumentNames !== undefined && values.length > 1) { + // const obj = {}; + // for (var i = 0; i < argumentNames.length; i++) + // obj[argumentNames[i]] = values[i]; + // resolve(obj); + } else { + resolve(values[0]); + } + })); + } catch (err) { + reject(err); + } + return promise; + } + + Object.setPrototypeOf(fn, Object.getPrototypeOf(orig)); + + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return Object.defineProperties(fn, ObjectGetOwnPropertyDescriptors(orig)); +} + +promisify.custom = kCustomPromisifiedSymbol; + +module.exports = promisify; diff --git a/deps/npm/node_modules/util-promisify/package.json b/deps/npm/node_modules/util-promisify/package.json new file mode 100644 index 00000000000000..404bd92be6ebaa --- /dev/null +++ b/deps/npm/node_modules/util-promisify/package.json @@ -0,0 +1,45 @@ +{ + "_from": "util-promisify@^2.1.0", + "_id": "util-promisify@2.1.0", + "_inBundle": false, + "_integrity": "sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=", + "_location": "/util-promisify", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "util-promisify@^2.1.0", + "name": "util-promisify", + "escapedName": "util-promisify", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/read-package-tree" + ], + "_resolved": "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz", + "_shasum": "3c2236476c4d32c5ff3c47002add7c13b9a82a53", + "_spec": "util-promisify@^2.1.0", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/read-package-tree", + "bugs": { + "url": "https://github.com/juliangruber/util-promisify/issues" + }, + "bundleDependencies": false, + "dependencies": { + "object.getownpropertydescriptors": "^2.0.3" + }, + "deprecated": false, + "description": "Node 8's util.promisify, as a node module", + "homepage": "https://github.com/juliangruber/util-promisify#readme", + "license": "MIT", + "name": "util-promisify", + "repository": { + "type": "git", + "url": "git+https://github.com/juliangruber/util-promisify.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.1.0" +} diff --git a/deps/npm/node_modules/util-promisify/test/common.js b/deps/npm/node_modules/util-promisify/test/common.js new file mode 100644 index 00000000000000..72262b7feb36aa --- /dev/null +++ b/deps/npm/node_modules/util-promisify/test/common.js @@ -0,0 +1,56 @@ +const mustCallChecks = []; + +function runCallChecks(exitCode) { + if (exitCode !== 0) return; + + const failed = mustCallChecks.filter(function(context) { + return context.actual !== context.expected; + }); + + failed.forEach(function(context) { + console.log('Mismatched %s function calls. Expected %d, actual %d.', + context.name, + context.expected, + context.actual); + console.log(context.stack.split('\n').slice(2).join('\n')); + }); + + if (failed.length) process.exit(1); +} + +exports.mustCall = function(fn, expected) { + if (typeof fn === 'number') { + expected = fn; + fn = noop; + } else if (fn === undefined) { + fn = noop; + } + + if (expected === undefined) + expected = 1; + else if (typeof expected !== 'number') + throw new TypeError(`Invalid expected value: ${expected}`); + + const context = { + expected: expected, + actual: 0, + stack: (new Error()).stack, + name: fn.name || '' + }; + + // add the exit listener only once to avoid listener leak warnings + if (mustCallChecks.length === 0) process.on('exit', runCallChecks); + + mustCallChecks.push(context); + + return function() { + context.actual++; + return fn.apply(this, arguments); + }; +}; + +// Crash the process on unhandled rejections. +exports.crashOnUnhandledRejection = function() { + process.on('unhandledRejection', + (err) => process.nextTick(() => { throw err; })); +}; diff --git a/deps/npm/node_modules/util-promisify/test/index.js b/deps/npm/node_modules/util-promisify/test/index.js new file mode 100644 index 00000000000000..a8e8491628baa5 --- /dev/null +++ b/deps/npm/node_modules/util-promisify/test/index.js @@ -0,0 +1,194 @@ +'use strict'; + +const common = require('./common'); +const assert = require('assert'); +const fs = require('fs'); +const vm = require('vm'); +const promisify = require('..'); +//const customPromisifyArgs = require('..').customPromisifyArgs; + +const stat = promisify(fs.stat); + +{ + const promise = stat(__filename); + assert(promise instanceof Promise); + promise.then(common.mustCall((value) => { + assert.deepStrictEqual(value, fs.statSync(__filename)); + })); +} + +{ + const promise = stat('/dontexist'); + promise.catch(common.mustCall((error) => { + assert(error.message.includes('ENOENT: no such file or directory, stat')); + })); +} + +{ + function fn() {} + function promisifedFn() {} + fn[promisify.custom] = promisifedFn; + assert.strictEqual(promisify(fn), promisifedFn); + assert.strictEqual(promisify(promisify(fn)), promisifedFn); +} + +{ + function fn() {} + fn[promisify.custom] = 42; + assert.throws( + () => promisify(fn), + (err) => err instanceof TypeError && + err.message === 'The [util.promisify.custom] property must ' + + 'be a function'); +} + +/*{ + const firstValue = 5; + const secondValue = 17; + + function fn(callback) { + callback(null, firstValue, secondValue); + } + + fn[customPromisifyArgs] = ['first', 'second']; + + promisify(fn)().then(common.mustCall((obj) => { + assert.deepStrictEqual(obj, {first: firstValue, second: secondValue}); + })); +}*/ + +{ + const fn = vm.runInNewContext('(function() {})'); + assert.notStrictEqual(Object.getPrototypeOf(promisify(fn)), + Function.prototype); +} + +{ + function fn(callback) { + callback(null, 'foo', 'bar'); + } + promisify(fn)().then(common.mustCall((value) => { + assert.deepStrictEqual(value, 'foo'); + })); +} + +{ + function fn(callback) { + callback(null); + } + promisify(fn)().then(common.mustCall((value) => { + assert.strictEqual(value, undefined); + })); +} + +{ + function fn(callback) { + callback(); + } + promisify(fn)().then(common.mustCall((value) => { + assert.strictEqual(value, undefined); + })); +} + +{ + function fn(err, val, callback) { + callback(err, val); + } + promisify(fn)(null, 42).then(common.mustCall((value) => { + assert.strictEqual(value, 42); + })); +} + +{ + function fn(err, val, callback) { + callback(err, val); + } + promisify(fn)(new Error('oops'), null).catch(common.mustCall((err) => { + assert.strictEqual(err.message, 'oops'); + })); +} + +if (Number(process.version[1]) >= 7) eval` +{ + + function fn(err, val, callback) { + callback(err, val); + } + + (async () => { + const value = await promisify(fn)(null, 42); + assert.strictEqual(value, 42); + })(); +}` + +{ + const o = {}; + const fn = promisify(function(cb) { + + cb(null, this === o); + }); + + o.fn = fn; + + o.fn().then(common.mustCall(function(val) { + assert(val); + })); +} + +if (Number(process.version[1]) >= 7) eval` +{ + const err = new Error('Should not have called the callback with the error.'); + const stack = err.stack; + + const fn = promisify(function(cb) { + cb(null); + cb(err); + }); + + (async () => { + await fn(); + await Promise.resolve(); + return assert.strictEqual(stack, err.stack); + })(); +}` + +{ + function c() { } + const a = promisify(function() { }); + const b = promisify(a); + assert.notStrictEqual(c, a); + assert.strictEqual(a, b); +} + +{ + let errToThrow; + const thrower = promisify(function(a, b, c, cb) { + errToThrow = new Error(); + throw errToThrow; + }); + thrower(1, 2, 3) + .then(assert.fail) + .then(assert.fail, (e) => assert.strictEqual(e, errToThrow)); +} + +{ + const err = new Error(); + + const a = promisify((cb) => cb(err))(); + const b = promisify(() => { throw err; })(); + + Promise.all([ + a.then(assert.fail, function(e) { + assert.strictEqual(err, e); + }), + b.then(assert.fail, function(e) { + assert.strictEqual(err, e); + }) + ]); +} + +if (Number(process.version[1]) >= 8) +{ + const coreUtil = require('util'); + assert.strictEqual(coreUtil.promisify.custom, promisify.custom); +} diff --git a/deps/npm/node_modules/util-promisify/test/timers.js b/deps/npm/node_modules/util-promisify/test/timers.js new file mode 100644 index 00000000000000..de12be034d3043 --- /dev/null +++ b/deps/npm/node_modules/util-promisify/test/timers.js @@ -0,0 +1,38 @@ +'use strict'; +const common = require('./common'); +const assert = require('assert'); +const timers = require('timers'); +const promisify = require('..'); + +common.crashOnUnhandledRejection(); + +const setTimeout = promisify(timers.setTimeout); +const setImmediate = promisify(timers.setImmediate); + +{ + const promise = setTimeout(1); + promise.then(common.mustCall((value) => { + assert.strictEqual(value, undefined); + })); +} + +{ + const promise = setTimeout(1, 'foobar'); + promise.then(common.mustCall((value) => { + assert.strictEqual(value, 'foobar'); + })); +} + +{ + const promise = setImmediate(); + promise.then(common.mustCall((value) => { + assert.strictEqual(value, undefined); + })); +} + +{ + const promise = setImmediate('foobar'); + promise.then(common.mustCall((value) => { + assert.strictEqual(value, 'foobar'); + })); +} diff --git a/deps/npm/node_modules/validate-npm-package-name/.nyc_output/aa4ee25ac41a9c3c7ee37ce965e6d1ac.json b/deps/npm/node_modules/validate-npm-package-name/.nyc_output/aa4ee25ac41a9c3c7ee37ce965e6d1ac.json new file mode 100644 index 00000000000000..8540780a8efbe5 --- /dev/null +++ b/deps/npm/node_modules/validate-npm-package-name/.nyc_output/aa4ee25ac41a9c3c7ee37ce965e6d1ac.json @@ -0,0 +1 @@ +{"/Users/chris/projects/npm/validate-npm-package-name/index.js":{"path":"/Users/chris/projects/npm/validate-npm-package-name/index.js","statementMap":{"0":{"start":{"line":3,"column":27},"end":{"line":3,"column":68}},"1":{"start":{"line":4,"column":15},"end":{"line":4,"column":34}},"2":{"start":{"line":5,"column":16},"end":{"line":8,"column":1}},"3":{"start":{"line":10,"column":15},"end":{"line":91,"column":1}},"4":{"start":{"line":11,"column":17},"end":{"line":11,"column":19}},"5":{"start":{"line":12,"column":15},"end":{"line":12,"column":17}},"6":{"start":{"line":14,"column":2},"end":{"line":17,"column":3}},"7":{"start":{"line":15,"column":4},"end":{"line":15,"column":38}},"8":{"start":{"line":16,"column":4},"end":{"line":16,"column":33}},"9":{"start":{"line":19,"column":2},"end":{"line":22,"column":3}},"10":{"start":{"line":20,"column":4},"end":{"line":20,"column":43}},"11":{"start":{"line":21,"column":4},"end":{"line":21,"column":33}},"12":{"start":{"line":24,"column":2},"end":{"line":27,"column":3}},"13":{"start":{"line":25,"column":4},"end":{"line":25,"column":40}},"14":{"start":{"line":26,"column":4},"end":{"line":26,"column":33}},"15":{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},"16":{"start":{"line":30,"column":4},"end":{"line":30,"column":56}},"17":{"start":{"line":33,"column":2},"end":{"line":35,"column":3}},"18":{"start":{"line":34,"column":4},"end":{"line":34,"column":50}},"19":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"20":{"start":{"line":38,"column":4},"end":{"line":38,"column":55}},"21":{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},"22":{"start":{"line":42,"column":4},"end":{"line":42,"column":65}},"23":{"start":{"line":46,"column":2},"end":{"line":50,"column":4}},"24":{"start":{"line":47,"column":4},"end":{"line":49,"column":5}},"25":{"start":{"line":48,"column":6},"end":{"line":48,"column":61}},"26":{"start":{"line":55,"column":2},"end":{"line":59,"column":4}},"27":{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},"28":{"start":{"line":57,"column":6},"end":{"line":57,"column":55}},"29":{"start":{"line":63,"column":2},"end":{"line":65,"column":3}},"30":{"start":{"line":64,"column":4},"end":{"line":64,"column":72}},"31":{"start":{"line":68,"column":2},"end":{"line":70,"column":3}},"32":{"start":{"line":69,"column":4},"end":{"line":69,"column":63}},"33":{"start":{"line":72,"column":2},"end":{"line":74,"column":3}},"34":{"start":{"line":73,"column":4},"end":{"line":73,"column":78}},"35":{"start":{"line":76,"column":2},"end":{"line":88,"column":3}},"36":{"start":{"line":78,"column":20},"end":{"line":78,"column":52}},"37":{"start":{"line":79,"column":4},"end":{"line":85,"column":5}},"38":{"start":{"line":80,"column":17},"end":{"line":80,"column":29}},"39":{"start":{"line":81,"column":16},"end":{"line":81,"column":28}},"40":{"start":{"line":82,"column":6},"end":{"line":84,"column":7}},"41":{"start":{"line":83,"column":8},"end":{"line":83,"column":37}},"42":{"start":{"line":87,"column":4},"end":{"line":87,"column":64}},"43":{"start":{"line":90,"column":2},"end":{"line":90,"column":31}},"44":{"start":{"line":93,"column":0},"end":{"line":93,"column":52}},"45":{"start":{"line":95,"column":11},"end":{"line":105,"column":1}},"46":{"start":{"line":96,"column":15},"end":{"line":101,"column":3}},"47":{"start":{"line":102,"column":2},"end":{"line":102,"column":53}},"48":{"start":{"line":102,"column":31},"end":{"line":102,"column":53}},"49":{"start":{"line":103,"column":2},"end":{"line":103,"column":49}},"50":{"start":{"line":103,"column":29},"end":{"line":103,"column":49}},"51":{"start":{"line":104,"column":2},"end":{"line":104,"column":15}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":32},"end":{"line":10,"column":33}},"loc":{"start":{"line":10,"column":48},"end":{"line":91,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":46,"column":20},"end":{"line":46,"column":21}},"loc":{"start":{"line":46,"column":47},"end":{"line":50,"column":3}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":55,"column":19},"end":{"line":55,"column":20}},"loc":{"start":{"line":55,"column":38},"end":{"line":59,"column":3}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":95,"column":11},"end":{"line":95,"column":12}},"loc":{"start":{"line":95,"column":39},"end":{"line":105,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":14,"column":2},"end":{"line":17,"column":3}},"type":"if","locations":[{"start":{"line":14,"column":2},"end":{"line":17,"column":3}},{"start":{"line":14,"column":2},"end":{"line":17,"column":3}}]},"1":{"loc":{"start":{"line":19,"column":2},"end":{"line":22,"column":3}},"type":"if","locations":[{"start":{"line":19,"column":2},"end":{"line":22,"column":3}},{"start":{"line":19,"column":2},"end":{"line":22,"column":3}}]},"2":{"loc":{"start":{"line":24,"column":2},"end":{"line":27,"column":3}},"type":"if","locations":[{"start":{"line":24,"column":2},"end":{"line":27,"column":3}},{"start":{"line":24,"column":2},"end":{"line":27,"column":3}}]},"3":{"loc":{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},"type":"if","locations":[{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},{"start":{"line":29,"column":2},"end":{"line":31,"column":3}}]},"4":{"loc":{"start":{"line":33,"column":2},"end":{"line":35,"column":3}},"type":"if","locations":[{"start":{"line":33,"column":2},"end":{"line":35,"column":3}},{"start":{"line":33,"column":2},"end":{"line":35,"column":3}}]},"5":{"loc":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"type":"if","locations":[{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},{"start":{"line":37,"column":2},"end":{"line":39,"column":3}}]},"6":{"loc":{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},"type":"if","locations":[{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},{"start":{"line":41,"column":2},"end":{"line":43,"column":3}}]},"7":{"loc":{"start":{"line":47,"column":4},"end":{"line":49,"column":5}},"type":"if","locations":[{"start":{"line":47,"column":4},"end":{"line":49,"column":5}},{"start":{"line":47,"column":4},"end":{"line":49,"column":5}}]},"8":{"loc":{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},"type":"if","locations":[{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},{"start":{"line":56,"column":4},"end":{"line":58,"column":5}}]},"9":{"loc":{"start":{"line":63,"column":2},"end":{"line":65,"column":3}},"type":"if","locations":[{"start":{"line":63,"column":2},"end":{"line":65,"column":3}},{"start":{"line":63,"column":2},"end":{"line":65,"column":3}}]},"10":{"loc":{"start":{"line":68,"column":2},"end":{"line":70,"column":3}},"type":"if","locations":[{"start":{"line":68,"column":2},"end":{"line":70,"column":3}},{"start":{"line":68,"column":2},"end":{"line":70,"column":3}}]},"11":{"loc":{"start":{"line":72,"column":2},"end":{"line":74,"column":3}},"type":"if","locations":[{"start":{"line":72,"column":2},"end":{"line":74,"column":3}},{"start":{"line":72,"column":2},"end":{"line":74,"column":3}}]},"12":{"loc":{"start":{"line":76,"column":2},"end":{"line":88,"column":3}},"type":"if","locations":[{"start":{"line":76,"column":2},"end":{"line":88,"column":3}},{"start":{"line":76,"column":2},"end":{"line":88,"column":3}}]},"13":{"loc":{"start":{"line":79,"column":4},"end":{"line":85,"column":5}},"type":"if","locations":[{"start":{"line":79,"column":4},"end":{"line":85,"column":5}},{"start":{"line":79,"column":4},"end":{"line":85,"column":5}}]},"14":{"loc":{"start":{"line":82,"column":6},"end":{"line":84,"column":7}},"type":"if","locations":[{"start":{"line":82,"column":6},"end":{"line":84,"column":7}},{"start":{"line":82,"column":6},"end":{"line":84,"column":7}}]},"15":{"loc":{"start":{"line":82,"column":10},"end":{"line":82,"column":78}},"type":"binary-expr","locations":[{"start":{"line":82,"column":10},"end":{"line":82,"column":43}},{"start":{"line":82,"column":47},"end":{"line":82,"column":78}}]},"16":{"loc":{"start":{"line":97,"column":25},"end":{"line":97,"column":69}},"type":"binary-expr","locations":[{"start":{"line":97,"column":25},"end":{"line":97,"column":44}},{"start":{"line":97,"column":48},"end":{"line":97,"column":69}}]},"17":{"loc":{"start":{"line":102,"column":2},"end":{"line":102,"column":53}},"type":"if","locations":[{"start":{"line":102,"column":2},"end":{"line":102,"column":53}},{"start":{"line":102,"column":2},"end":{"line":102,"column":53}}]},"18":{"loc":{"start":{"line":103,"column":2},"end":{"line":103,"column":49}},"type":"if","locations":[{"start":{"line":103,"column":2},"end":{"line":103,"column":49}},{"start":{"line":103,"column":2},"end":{"line":103,"column":49}}]}},"s":{"0":1,"1":1,"2":1,"3":1,"4":22,"5":22,"6":22,"7":0,"8":0,"9":22,"10":0,"11":0,"12":22,"13":0,"14":0,"15":22,"16":2,"17":22,"18":1,"19":22,"20":1,"21":22,"22":2,"23":22,"24":44,"25":2,"26":22,"27":726,"28":1,"29":22,"30":1,"31":22,"32":1,"33":22,"34":2,"35":22,"36":6,"37":6,"38":5,"39":5,"40":5,"41":2,"42":4,"43":20,"44":1,"45":1,"46":22,"47":22,"48":17,"49":22,"50":12,"51":22},"f":{"0":22,"1":44,"2":726,"3":22},"b":{"0":[0,22],"1":[0,22],"2":[0,22],"3":[2,20],"4":[1,21],"5":[1,21],"6":[2,20],"7":[2,42],"8":[1,725],"9":[1,21],"10":[1,21],"11":[2,20],"12":[6,16],"13":[5,1],"14":[2,3],"15":[5,2],"16":[22,12],"17":[17,5],"18":[12,10]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"7a01205bc1fdf589bdf194d23f1405400131fa00","contentHash":"8b2210ff664cab8b0916540357b1d2f9_10.1.2"}} \ No newline at end of file diff --git a/deps/npm/node_modules/validate-npm-package-name/.nyc_output/bb918173e62b9517f55b630902d07ef4.json b/deps/npm/node_modules/validate-npm-package-name/.nyc_output/bb918173e62b9517f55b630902d07ef4.json new file mode 100644 index 00000000000000..9e26dfeeb6e641 --- /dev/null +++ b/deps/npm/node_modules/validate-npm-package-name/.nyc_output/bb918173e62b9517f55b630902d07ef4.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/deps/npm/node_modules/write-file-atomic/CHANGELOG.md b/deps/npm/node_modules/write-file-atomic/CHANGELOG.md index 61fb4d22330e49..920ae2cb4d1fdb 100644 --- a/deps/npm/node_modules/write-file-atomic/CHANGELOG.md +++ b/deps/npm/node_modules/write-file-atomic/CHANGELOG.md @@ -1,3 +1,8 @@ +# 2.4.3 + +* Ignore errors raised by `fs.closeSync` when cleaning up after a write + error. + # 2.4.2 * A pair of patches to fix some fd leaks. We would leak fds with sync use diff --git a/deps/npm/node_modules/write-file-atomic/index.js b/deps/npm/node_modules/write-file-atomic/index.js index fe9fdfb9db221c..64ae987c011a9f 100644 --- a/deps/npm/node_modules/write-file-atomic/index.js +++ b/deps/npm/node_modules/write-file-atomic/index.js @@ -209,7 +209,6 @@ function writeFileSync (filename, data, options) { var removeOnExitHandler = onExit(cleanup) try { - fd = fs.openSync(tmpfile, 'w', options.mode) if (Buffer.isBuffer(data)) { fs.writeSync(fd, data, 0, data.length, 0) @@ -225,7 +224,13 @@ function writeFileSync (filename, data, options) { fs.renameSync(tmpfile, filename) removeOnExitHandler() } catch (err) { - if (fd) fs.closeSync(fd) + if (fd) { + try { + fs.closeSync(fd) + } catch (ex) { + // ignore close errors at this stage, error may have closed fd already. + } + } removeOnExitHandler() cleanup() throw err diff --git a/deps/npm/node_modules/write-file-atomic/package.json b/deps/npm/node_modules/write-file-atomic/package.json index f8f55fbd22bfc2..bffa0bbbb3472f 100644 --- a/deps/npm/node_modules/write-file-atomic/package.json +++ b/deps/npm/node_modules/write-file-atomic/package.json @@ -1,31 +1,32 @@ { - "_from": "write-file-atomic@^2.3.0", - "_id": "write-file-atomic@2.4.2", + "_from": "write-file-atomic@^2.4.2", + "_id": "write-file-atomic@2.4.3", "_inBundle": false, - "_integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", + "_integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", "_location": "/write-file-atomic", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "write-file-atomic@^2.3.0", + "raw": "write-file-atomic@^2.4.2", "name": "write-file-atomic", "escapedName": "write-file-atomic", - "rawSpec": "^2.3.0", + "rawSpec": "^2.4.2", "saveSpec": null, - "fetchSpec": "^2.3.0" + "fetchSpec": "^2.4.2" }, "_requiredBy": [ "#USER", "/", "/bin-links", + "/caching-transform", "/configstore", "/tap" ], - "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", - "_shasum": "a7181706dfba17855d221140a9c06e15fcdd87b9", - "_spec": "write-file-atomic@^2.3.0", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "_shasum": "1fd2e9ae1df3e75b8d8c367443c692d4ca81f481", + "_spec": "write-file-atomic@^2.4.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org", @@ -65,7 +66,10 @@ "url": "git+ssh://git@github.com/iarna/write-file-atomic.git" }, "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", "test": "standard && tap --100 test/*.js" }, - "version": "2.4.2" + "version": "2.4.3" } diff --git a/deps/npm/node_modules/xtend/.jshintrc b/deps/npm/node_modules/xtend/.jshintrc new file mode 100644 index 00000000000000..77887b5f0f2efc --- /dev/null +++ b/deps/npm/node_modules/xtend/.jshintrc @@ -0,0 +1,30 @@ +{ + "maxdepth": 4, + "maxstatements": 200, + "maxcomplexity": 12, + "maxlen": 80, + "maxparams": 5, + + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": false, + "noarg": true, + "noempty": true, + "nonew": true, + "undef": true, + "unused": "vars", + "trailing": true, + + "quotmark": true, + "expr": true, + "asi": true, + + "browser": false, + "esnext": true, + "devel": false, + "node": false, + "nonstandard": false, + + "predef": ["require", "module", "__dirname", "__filename"] +} diff --git a/deps/npm/package.json b/deps/npm/package.json index 24827e59cfd9a1..80143f7c53cb65 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "6.9.0", + "version": "6.10.0", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -40,9 +40,9 @@ "aproba": "^2.0.0", "archy": "~1.0.0", "bin-links": "^1.1.2", - "bluebird": "^3.5.3", + "bluebird": "^3.5.5", "byte-size": "^5.0.1", - "cacache": "^11.3.2", + "cacache": "^11.3.3", "call-limit": "~1.1.0", "chownr": "^1.1.1", "ci-info": "^2.0.0", @@ -61,7 +61,7 @@ "fs-write-stream-atomic": "~1.0.10", "gentle-fs": "^2.0.1", "glob": "^7.1.3", - "graceful-fs": "^4.1.15", + "graceful-fs": "^4.2.0", "has-unicode": "~2.0.1", "hosted-git-info": "^2.7.1", "iferr": "^1.0.2", @@ -96,7 +96,7 @@ "npm-install-checks": "~3.0.0", "npm-lifecycle": "^2.1.0", "npm-package-arg": "^6.1.0", - "npm-packlist": "^1.4.1", + "npm-packlist": "^1.4.4", "npm-pick-manifest": "^2.2.3", "npm-registry-fetch": "^3.9.0", "npm-user-validate": "~1.0.0", @@ -104,30 +104,31 @@ "once": "~1.4.0", "opener": "^1.5.1", "osenv": "^0.1.5", - "pacote": "^9.5.0", + "pacote": "^9.5.1", "path-is-inside": "~1.0.2", "promise-inflight": "~1.0.1", "qrcode-terminal": "^0.12.0", - "query-string": "^6.2.0", + "query-string": "^6.4.0", "qw": "~1.0.1", "read": "~1.0.7", "read-cmd-shim": "~1.0.1", "read-installed": "~4.0.3", "read-package-json": "^2.0.13", - "read-package-tree": "^5.2.2", - "readable-stream": "^3.1.1", + "read-package-tree": "^5.3.1", + "readable-stream": "^3.3.0", + "readdir-scoped-modules": "^1.1.0", "request": "^2.88.0", "retry": "^0.12.0", "rimraf": "^2.6.3", "safe-buffer": "^5.1.2", "semver": "^5.6.0", - "sha": "~2.0.1", + "sha": "^3.0.0", "slide": "~1.1.6", "sorted-object": "~2.0.1", "sorted-union-stream": "~2.1.3", "ssri": "^6.0.1", "stringify-package": "^1.0.0", - "tar": "^4.4.8", + "tar": "^4.4.10", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "uid-number": "0.0.6", @@ -140,7 +141,7 @@ "validate-npm-package-name": "~3.0.0", "which": "^1.3.1", "worker-farm": "^1.6.0", - "write-file-atomic": "^2.4.2" + "write-file-atomic": "^2.4.3" }, "bundleDependencies": [ "abbrev", @@ -269,26 +270,28 @@ "devDependencies": { "deep-equal": "^1.0.1", "get-stream": "^4.1.0", - "licensee": "^6.1.0", + "licensee": "^7.0.2", "marked": "^0.6.0", "marked-man": "^0.2.1", - "npm-registry-couchapp": "^2.7.1", - "npm-registry-mock": "^1.1.0", + "npm-registry-couchapp": "^2.7.2", + "npm-registry-mock": "^1.2.1", "require-inject": "^1.4.4", "sprintf-js": "^1.1.2", "standard": "^11.0.1", - "tacks": "^1.2.7", - "tap": "^12.5.3", - "tar-stream": "^2.0.0" + "tacks": "^1.3.0", + "tap": "^12.7.0", + "tar-stream": "^2.0.1" }, "scripts": { "dumpconf": "env | grep npm | sort | uniq", "prepare": "node bin/npm-cli.js rebuild && 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", + "tap": "tap -J --timeout 300", + "tap-cover": "tap -J --nyc-arg=--cache --coverage --timeout 600", + "pretest": "standard", + "test": "npm run test-tap --", + "posttest": "rimraf test/npm_cache*", "test-coverage": "npm run tap-cover -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", "test-tap": "npm run tap -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", "test-node": "tap --timeout 240 \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-nyc*/*.js\"" diff --git a/deps/npm/test/common-config.js b/deps/npm/test/common-config.js new file mode 100644 index 00000000000000..003150335483a3 --- /dev/null +++ b/deps/npm/test/common-config.js @@ -0,0 +1,90 @@ +if (module === require.main) { + console.log('1..1') + console.log('ok 1 setup done') + process.exit(0) +} + +var fs = require('graceful-fs') +var path = require('path') +var userconfigSrc = path.resolve(__dirname, 'fixtures', 'config', 'userconfig') +exports.userconfig = userconfigSrc + '-with-gc' +exports.globalconfig = path.resolve(__dirname, 'fixtures', 'config', 'globalconfig') + +// if this hasn't been written yet, then do it now. +try { + fs.statSync(exports.userconfig) +} catch (er) { + var uc = fs.readFileSync(userconfigSrc) + var gcini = 'globalconfig = ' + exports.globalconfig + '\n' + // atomic! + fs.writeFileSync(exports.userconfig + '.' + process.pid, gcini + uc) + fs.renameSync(exports.userconfig + '.' + process.pid, exports.userconfig) +} + +exports.builtin = path.resolve(__dirname, 'fixtures', 'config', 'builtin') +exports.malformed = path.resolve(__dirname, 'fixtures', 'config', 'malformed') +exports.ucData = + { globalconfig: exports.globalconfig, + email: 'i@izs.me', + 'env-thing': 'asdf', + 'init.author.name': 'Isaac Z. Schlueter', + 'init.author.email': 'i@izs.me', + 'init.author.url': 'http://blog.izs.me/', + 'init.version': '1.2.3', + 'npm:publishtest': true, + '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry', + 'npm-www:nocache': '1', + nodedir: '/Users/isaacs/dev/js/node-v0.8', + 'sign-git-tag': true, + message: 'v%s', + 'strict-ssl': false, + 'tmp': path.normalize(process.env.HOME + '/.tmp'), + _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=', + _token: + { AuthSession: 'yabba-dabba-doodle', + version: '1', + expires: '1345001053415', + path: '/', + httponly: true } } + +// set the userconfig in the env +// unset anything else that npm might be trying to foist on us +Object.keys(process.env).forEach(function (k) { + if (k.match(/^npm_config_/i)) { + delete process.env[k] + } +}) +process.env.npm_config_userconfig = exports.userconfig +process.env.npm_config_other_env_thing = '1000' +process.env.random_env_var = 'asdf' +process.env.npm_config__underbar_env_thing = 'underful' +process.env.NPM_CONFIG_UPPERCASE_ENV_THING = '42' + +exports.envData = { + userconfig: exports.userconfig, + '_underbar-env-thing': 'underful', + 'uppercase-env-thing': '42', + 'other-env-thing': '1000' +} +exports.envDataFix = { + userconfig: exports.userconfig, + '_underbar-env-thing': 'underful', + 'uppercase-env-thing': 42, + 'other-env-thing': 1000 +} + +var projectConf = path.resolve(__dirname, '..', '.npmrc') +try { + fs.statSync(projectConf) +} catch (er) { + // project conf not found, probably working with packed npm + fs.writeFileSync(projectConf, '') +} + +var projectRc = path.join(__dirname, 'fixtures', 'config', '.npmrc') +try { + fs.statSync(projectRc) +} catch (er) { + // project conf not found, probably working with packed npm + fs.writeFileSync(projectRc, 'just = testing') +} diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js index 37d5efe9f86c82..d54a8699954514 100644 --- a/deps/npm/test/common-tap.js +++ b/deps/npm/test/common-tap.js @@ -1,6 +1,7 @@ 'use strict' /* eslint-disable camelcase */ +const configCommon = require('./common-config.js') var fs = require('graceful-fs') var readCmdShim = require('read-cmd-shim') var isWindows = require('../lib/utils/is-windows.js') @@ -17,9 +18,32 @@ if (!global.setImmediate || !require('timers').setImmediate) { var spawn = require('child_process').spawn var path = require('path') -var port = exports.port = 1337 +// provide a working dir unique to each test +const main = require.main.filename +exports.pkg = path.resolve(path.dirname(main), path.basename(main, '.js')) +const mkdirp = require('mkdirp') +const rimraf = require('rimraf') +mkdirp.sync(exports.pkg) +require('tap').teardown(() => { + try { + rimraf.sync(exports.pkg) + } catch (e) { + if (process.platform !== 'win32') { + throw e + } + } +}) + +// space these out to help prevent collisions +const testId = 3 * (+process.env.TAP_CHILD_ID || 0) + +var port = exports.port = 15443 + testId exports.registry = 'http://localhost:' + port +exports.altPort = 7331 + testId + +exports.gitPort = 4321 + testId + var fakeRegistry = require('./fake-registry.js') exports.fakeRegistry = fakeRegistry @@ -29,10 +53,10 @@ ourenv.npm_config_progress = 'false' ourenv.npm_config_metrics = 'false' ourenv.npm_config_audit = 'false' -var npm_config_cache = path.resolve(__dirname, 'npm_cache') +var npm_config_cache = path.resolve(__dirname, 'npm_cache_' + testId) ourenv.npm_config_cache = exports.npm_config_cache = npm_config_cache -ourenv.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') -ourenv.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') +ourenv.npm_config_userconfig = exports.npm_config_userconfig = configCommon.userconfig +ourenv.npm_config_globalconfig = exports.npm_config_globalconfig = configCommon.globalconfig ourenv.npm_config_global_style = 'false' ourenv.npm_config_legacy_bundling = 'false' ourenv.npm_config_fetch_retries = '0' @@ -114,6 +138,9 @@ exports.makeGitRepo = function (params, cb) { git.chainableExec(['init'], opts), git.chainableExec(['config', 'user.name', user], opts), git.chainableExec(['config', 'user.email', email], opts), + // don't time out tests waiting for a gpg passphrase or 2fa + git.chainableExec(['config', 'commit.gpgsign', 'false'], opts), + git.chainableExec(['config', 'tag.forceSignAnnotated', 'false'], opts), git.chainableExec(['add'].concat(added), opts), git.chainableExec(['commit', '-m', message], opts) ] diff --git a/deps/npm/test/fake-registry.js b/deps/npm/test/fake-registry.js index 7566443e64cf19..e09e154c76514e 100644 --- a/deps/npm/test/fake-registry.js +++ b/deps/npm/test/fake-registry.js @@ -1,7 +1,14 @@ 'use strict' const common = require('./common-tap.js') const Bluebird = require('bluebird') -const log = require('npmlog') +const silentLogger = { + http: () => {}, + silly: () => {} +} + +const log = process.env.TAP_CHILD_ID + ? silentLogger + : require('npmlog') const http = require('http') const EventEmitter = require('events') diff --git a/deps/npm/test/fixtures/config/userconfig-with-gc b/deps/npm/test/fixtures/config/userconfig-with-gc new file mode 100644 index 00000000000000..cf774bb883d966 --- /dev/null +++ b/deps/npm/test/fixtures/config/userconfig-with-gc @@ -0,0 +1,23 @@ +globalconfig = /Users/isaacs/dev/npm/cli/test/fixtures/config/globalconfig +email = i@izs.me +env-thing = ${random_env_var} +init.author.name = Isaac Z. Schlueter +init.author.email = i@izs.me +init.author.url = http://blog.izs.me/ +init.version = 1.2.3 +npm:publishtest = true +_npmjs.org:couch = https://admin:password@localhost:5984/registry +npm-www:nocache = 1 +nodedir = /Users/isaacs/dev/js/node-v0.8 +sign-git-tag = true +message = v%s +strict-ssl = false +tmp = ~/.tmp +_auth = dXNlcm5hbWU6cGFzc3dvcmQ= + +[_token] +AuthSession = yabba-dabba-doodle +version = 1 +expires = 1345001053415 +path = / +httponly = true diff --git a/deps/npm/test/need-npm5-update/ignore-shrinkwrap.js b/deps/npm/test/need-npm5-update/ignore-shrinkwrap.js index 9468162eeef863..4980b659fd23f4 100644 --- a/deps/npm/test/need-npm5-update/ignore-shrinkwrap.js +++ b/deps/npm/test/need-npm5-update/ignore-shrinkwrap.js @@ -24,7 +24,7 @@ var json = { name: 'ignore-shrinkwrap', version: '0.0.0', dependencies: { - 'npm-test-ignore-shrinkwrap-file': 'http://localhost:1337/package.js' + 'npm-test-ignore-shrinkwrap-file': 'http://localhost:' + common.port + '/package.js' } } @@ -34,8 +34,8 @@ var shrinkwrap = { dependencies: { 'npm-test-ignore-shrinkwrap-file': { version: '1.2.3', - from: 'http://localhost:1337/shrinkwrap.js', - resolved: 'http://localhost:1337/shrinkwrap.js', + from: 'http://localhost:' + common.port + '/shrinkwrap.js', + resolved: 'http://localhost:' + common.port + '/shrinkwrap.js', dependencies: { opener: { version: '1.3.0', diff --git a/deps/npm/test/need-npm5-update/peer-deps-invalid.js b/deps/npm/test/need-npm5-update/peer-deps-invalid.js index 39ad612e5a9bef..15fda253ecc48c 100644 --- a/deps/npm/test/need-npm5-update/peer-deps-invalid.js +++ b/deps/npm/test/need-npm5-update/peer-deps-invalid.js @@ -18,8 +18,8 @@ var json = { name: 'peer-deps-invalid', version: '0.0.0', dependencies: { - 'npm-test-peer-deps-file': 'http://localhost:1337/ok.js', - 'npm-test-peer-deps-file-invalid': 'http://localhost:1337/invalid.js' + 'npm-test-peer-deps-file': 'http://localhost:' + common.port + '/ok.js', + 'npm-test-peer-deps-file-invalid': 'http://localhost:' + common.port + '/invalid.js' } } diff --git a/deps/npm/test/network/registry.js b/deps/npm/test/network/registry.js index 3dbe23ffd25bdc..d7e11c6007111f 100644 --- a/deps/npm/test/network/registry.js +++ b/deps/npm/test/network/registry.js @@ -2,7 +2,7 @@ // This verifies that the server-side stuff still works. var common = require('../common-tap') -var test = require('tap').test +var t = require('tap') var npmExec = require.resolve('../../bin/npm-cli.js') var path = require('path') @@ -17,16 +17,15 @@ if (v[0] === 0 && v[1] < 10) { process.versions.node ) } else { - which('couchdb', function (er) { - if (er) { - console.error('WARNING: need couch to run test: ' + er.message) - } else { - runTests() - } - }) + try { + which.sync('couchdb') + t.test(runTests) + } catch (er) { + console.error('WARNING: need couch to run test: ' + er.message) + } } -function runTests () { +function runTests (t) { var env = Object.assign({ TAP: 1 }, process.env) env.npm = npmExec // TODO: fix tap and / or nyc to handle nested invocations properly @@ -39,10 +38,8 @@ function runTests () { common.npm(['install'], opts, function (err, code) { if (err) { throw err } if (code) { - return test('need install to work', function (t) { - t.fail('install failed with: ' + code) - t.end() - }) + t.fail('install failed with: ' + code) + return t.end() } else { opts = { cwd: ca, @@ -52,10 +49,8 @@ function runTests () { common.npm(['test', '--', '-Rtap', '--no-coverage'], opts, function (err, code) { if (err) { throw err } if (code) { - return test('need test to work', function (t) { - t.fail('test failed with: ' + code) - t.end() - }) + t.fail('test failed with: ' + code) + return t.end() } opts = { cwd: ca, @@ -63,8 +58,9 @@ function runTests () { stdio: 'inherit' } common.npm(['prune', '--production'], opts, function (err, code) { - if (err) { throw err } - process.exit(code || 0) + t.ifError(err) + t.equal(code, 0) + return t.end() }) }) } diff --git a/deps/npm/test/tap/404-parent.js b/deps/npm/test/tap/404-parent.js index 67835efc1df102..539ead7a45e0e8 100644 --- a/deps/npm/test/tap/404-parent.js +++ b/deps/npm/test/tap/404-parent.js @@ -6,7 +6,7 @@ var path = require('path') var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, '404-parent') +const pkg = common.pkg var mr = require('npm-registry-mock') test('404-parent: if parent exists, specify parent in error message', function (t) { @@ -42,6 +42,9 @@ function setup () { function performInstall (cb) { mr({port: common.port}, function (er, s) { // create mock registry. + if (er) { + return cb(er) + } s.get('/test-npm-404-parent-test') .many().reply(404, {'error': 'version not found'}) npm.load({ diff --git a/deps/npm/test/tap/404-private-registry-scoped.js b/deps/npm/test/tap/404-private-registry-scoped.js index f8a8c5b05a5721..5565f7a404e9cc 100644 --- a/deps/npm/test/tap/404-private-registry-scoped.js +++ b/deps/npm/test/tap/404-private-registry-scoped.js @@ -1,12 +1,11 @@ var test = require('tap').test -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') var mr = common.fakeRegistry.compat var server -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg function setup () { cleanup() diff --git a/deps/npm/test/tap/404-private-registry.js b/deps/npm/test/tap/404-private-registry.js index da6e446918f924..869125eba18f0b 100644 --- a/deps/npm/test/tap/404-private-registry.js +++ b/deps/npm/test/tap/404-private-registry.js @@ -7,7 +7,7 @@ var mr = common.fakeRegistry.compat var server var packageName = path.basename(__filename, '.js') -var testdir = path.join(__dirname, packageName) +var testdir = common.pkg function setup () { cleanup() diff --git a/deps/npm/test/tap/404.js b/deps/npm/test/tap/404.js index 710780ad26e60c..450b0c2816fba0 100644 --- a/deps/npm/test/tap/404.js +++ b/deps/npm/test/tap/404.js @@ -9,7 +9,7 @@ const common = require('../common-tap.js') const e404 = /test-npm-404@latest' is not in the npm registry/ const invalidPackage = /Your package name is not valid, because[\s\S]+1\. name can only contain URL-friendly characters/ -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/access.js b/deps/npm/test/tap/access.js index d400b4d33b134c..db03cbfc9e80bb 100644 --- a/deps/npm/test/tap/access.js +++ b/deps/npm/test/tap/access.js @@ -9,7 +9,8 @@ const mr = require('npm-registry-mock') const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.resolve(__dirname, 'access') +const pkg = common.pkg + let server const scoped = { @@ -63,7 +64,7 @@ test('npm access public on current package', function (t) { test('npm access public when no package passed and no package.json', function (t) { // need to simulate a missing package.json - var missing = path.join(__dirname, 'access-public-missing-guard') + var missing = path.join(pkg, 'access-public-missing-guard') mkdirp.sync(path.join(missing, 'node_modules')) common.npm([ @@ -83,7 +84,7 @@ test('npm access public when no package passed and no package.json', function (t test('npm access public when no package passed and invalid package.json', function (t) { // need to simulate a missing package.json - var invalid = path.join(__dirname, 'access-public-invalid-package') + var invalid = path.join(pkg, 'access-public-invalid-package') mkdirp.sync(path.join(invalid, 'node_modules')) // it's hard to force `read-package-json` to break w/o ENOENT, but this will do it fs.writeFileSync(path.join(invalid, 'package.json'), '{\n') @@ -380,7 +381,7 @@ test('npm access ls-packages on user', function (t) { test('npm access ls-packages with no package specified or package.json', function (t) { // need to simulate a missing package.json - var missing = path.join(__dirname, 'access-missing-guard') + var missing = path.join(pkg, 'access-missing-guard') mkdirp.sync(path.join(missing, 'node_modules')) var serverPackages = { diff --git a/deps/npm/test/tap/add-named-update-protocol-port.js b/deps/npm/test/tap/add-named-update-protocol-port.js index 37851e10686a14..2876b6cdbc4803 100644 --- a/deps/npm/test/tap/add-named-update-protocol-port.js +++ b/deps/npm/test/tap/add-named-update-protocol-port.js @@ -15,7 +15,7 @@ var fooPkg = { name: packageName, version: '0.0.0', dist: { - tarball: 'https://localhost:1338/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz', + tarball: 'https://localhost:' + common.altPort + '/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz', shasum: '356a192b7913b04c54574d18c28d46e6395428ab' } } @@ -30,7 +30,7 @@ var fooiPkg = { name: iPackageName, version: '0.0.0', dist: { - tarball: 'http://127.0.0.1:1338/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz', + tarball: 'http://127.0.0.1:' + common.altPort + '/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz', shasum: '356a192b7913b04c54574d18c28d46e6395428ab' } } @@ -39,13 +39,13 @@ var fooiPkg = { test('setup', function (t) { mr({ - port: 1337, + port: common.port, throwOnUnmatched: true }, function (err, s) { t.ifError(err, 'registry mocked successfully') server1 = s mr({ - port: 1338, + port: common.altPort, throwOnUnmatched: true }, function (err, s) { t.ifError(err, 'registry mocked successfully') @@ -67,7 +67,7 @@ test('tarball paths should update port if updating protocol', function (t) { 'add', packageName + '@0.0.0', '--registry', - 'http://localhost:1337/registry' + 'http://localhost:' + common.port + '/registry' ], {}, function (er, code, stdout, stderr) { @@ -92,7 +92,7 @@ test('tarball paths should NOT update if different hostname', function (t) { 'add', iPackageName + '@0.0.0', '--registry', - 'http://localhost:1337/registry' + 'http://localhost:' + common.port + '/registry' ], {}, function (er, code, stdout, stderr) { diff --git a/deps/npm/test/tap/add-remote-git-file.js b/deps/npm/test/tap/add-remote-git-file.js index 20392af8770be8..7d64609072dda0 100644 --- a/deps/npm/test/tap/add-remote-git-file.js +++ b/deps/npm/test/tap/add-remote-git-file.js @@ -13,8 +13,8 @@ var npm = require('../../lib/npm.js') var fetchPackageMetadata = require('../../lib/fetch-package-metadata.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-file') -var repo = resolve(__dirname, 'add-remote-git-file-repo') +var pkg = common.pkg +var repo = common.pkg + '-repo' var git var cloneURL = 'git+file://' + resolve(pkg, 'child.git') diff --git a/deps/npm/test/tap/add-remote-git-shrinkwrap.js b/deps/npm/test/tap/add-remote-git-shrinkwrap.js index c7fb2f9b961aa0..0daf2922e76455 100644 --- a/deps/npm/test/tap/add-remote-git-shrinkwrap.js +++ b/deps/npm/test/tap/add-remote-git-shrinkwrap.js @@ -9,8 +9,8 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-shrinkwrap') -var repo = resolve(__dirname, 'add-remote-git-shrinkwrap-repo') +var pkg = common.pkg +var repo = pkg + '-repo' var daemon var daemonPID @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git#master' + 'child': 'git://localhost:' + common.gitPort + '/child.git#master' } }, null, 2) + '\n' @@ -73,7 +73,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) { t.notOk(stderr, 'no error output') var treeish = stdout.trim() - t.like(shrinkwrap, {dependencies: {child: {version: 'git://localhost:1234/child.git#' + treeish}}}, + t.like(shrinkwrap, {dependencies: {child: {version: 'git://localhost:' + common.gitPort + '/child.git#' + treeish}}}, 'npm shrinkwrapped resolved correctly' ) @@ -114,7 +114,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, diff --git a/deps/npm/test/tap/add-remote-git-submodule.js b/deps/npm/test/tap/add-remote-git-submodule.js index 6e26712c561778..43b30f7a65bcb5 100644 --- a/deps/npm/test/tap/add-remote-git-submodule.js +++ b/deps/npm/test/tap/add-remote-git-submodule.js @@ -9,12 +9,12 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-submodule') -var repos = resolve(__dirname, 'add-remote-git-submodule-repos') +var pkg = common.pkg +var repos = pkg + '-repos' var subwt = resolve(repos, 'subwt') var topwt = resolve(repos, 'topwt') -var suburl = 'git://localhost:1234/sub.git' -var topurl = 'git://localhost:1234/top.git' +var suburl = 'git://localhost:' + common.gitPort + '/sub.git' +var topurl = 'git://localhost:' + common.gitPort + '/top.git' var daemon var daemonPID @@ -97,7 +97,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: repos, diff --git a/deps/npm/test/tap/add-remote-git.js b/deps/npm/test/tap/add-remote-git.js index 24abf33a773fd2..44294924f15a77 100644 --- a/deps/npm/test/tap/add-remote-git.js +++ b/deps/npm/test/tap/add-remote-git.js @@ -9,8 +9,8 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git') -var repo = resolve(__dirname, 'add-remote-git-repo') +var pkg = common.pkg +var repo = pkg + '-repo' var daemon var daemonPID @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - child: 'git://localhost:1234/child.git' + child: 'git://localhost:' + common.gitPort + '/child.git' } }, null, 2) + '\n' @@ -61,6 +61,7 @@ test('clean', function (t) { }) function bootstrap () { + cleanup() mkdirp.sync(pkg) fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) } @@ -81,12 +82,12 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, env: process.env, - stdio: ['pipe', 'pipe', 'pipe'] + stdio: ['pipe', 1, 'pipe'] } ) d.stderr.on('data', childFinder) diff --git a/deps/npm/test/tap/adduser-always-auth.js b/deps/npm/test/tap/adduser-always-auth.js index d327e35a9e547a..26541eebbc7b64 100644 --- a/deps/npm/test/tap/adduser-always-auth.js +++ b/deps/npm/test/tap/adduser-always-auth.js @@ -6,8 +6,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = {cwd: __dirname} -var outfile = path.resolve(__dirname, '_npmrc') +var opts = { cwd: common.pkg } +var outfile = path.resolve(common.pkg, '_npmrc') var responses = { 'Username': 'u\n', 'Password': 'p\n', @@ -98,7 +98,7 @@ test('npm login --scope uses :registry as its URI', function (t) ], opts, function (err, code) { - t.notOk(code, 'exited OK') + t.equal(code, 0, 'exited OK') t.notOk(err, 'no error output') var config = fs.readFileSync(outfile, 'utf8') t.like(config, new RegExp(scope + ':registry=' + uri), 'scope:registry is set') diff --git a/deps/npm/test/tap/adduser-legacy-auth.js b/deps/npm/test/tap/adduser-legacy-auth.js index 49015878f7d8ea..e46901c2b95fe5 100644 --- a/deps/npm/test/tap/adduser-legacy-auth.js +++ b/deps/npm/test/tap/adduser-legacy-auth.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-legacy-auth') +var opts = { cwd: common.pkg } +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var contents = '_auth=' + Buffer.from('u:x').toString('base64') + '\n' + @@ -42,6 +42,7 @@ function mocks (server) { } test('setup', function (t) { + rimraf.sync(pkg) mkdirp(pkg, function (er) { t.ifError(er, pkg + ' made successfully') @@ -65,8 +66,8 @@ test('npm login', function (t) { opts, function (err, code, stdout, stderr) { if (err) throw err - t.is(code, 0, 'exited OK') t.is(stderr, '', 'no error output') + t.is(code, 0, 'exited OK') var config = fs.readFileSync(outfile, 'utf8') t.like(config, /:always-auth=false/, 'always-auth is scoped and false (by default)') s.close() diff --git a/deps/npm/test/tap/adduser-oauth.js b/deps/npm/test/tap/adduser-oauth.js index 04065048c425bb..241fef2a2ed7fa 100644 --- a/deps/npm/test/tap/adduser-oauth.js +++ b/deps/npm/test/tap/adduser-oauth.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-oauth') +var opts = { cwd: common.pkg } +var pkg = common.pkg var fakeBrowser = path.resolve(pkg, '_script.sh') var configfile = path.resolve(pkg, '_npmrc') var outfile = path.resolve(pkg, '_outfile') diff --git a/deps/npm/test/tap/adduser-saml.js b/deps/npm/test/tap/adduser-saml.js index 530ebb52b3c0ef..17a1a9f7b3de6b 100644 --- a/deps/npm/test/tap/adduser-saml.js +++ b/deps/npm/test/tap/adduser-saml.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-saml') +var opts = { cwd: common.pkg } +var pkg = common.pkg var fakeBrowser = path.resolve(pkg, '_script.sh') var configfile = path.resolve(pkg, '_npmrc') var outfile = path.resolve(pkg, '_outfile') diff --git a/deps/npm/test/tap/aliases.js b/deps/npm/test/tap/aliases.js index 19f0b1293e9358..0a0a9dfd953b1f 100644 --- a/deps/npm/test/tap/aliases.js +++ b/deps/npm/test/tap/aliases.js @@ -15,7 +15,7 @@ const { Dir, File } = Tacks const readdirAsync = BB.promisify(fs.readdir) const readFileAsync = BB.promisify(fs.readFile) -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg let server test('setup', t => { @@ -98,12 +98,12 @@ test('installs an npm: protocol alias package', t => { bar: { version: '1.2.3', from: 'bar@npm:foo@1.2.3', - resolved: 'http://localhost:1337/foo/-/foo-1.2.3.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.3.tgz' }, foo: { version: '1.2.3', from: 'foo@1.2.3', - resolved: 'http://localhost:1337/foo/-/foo-1.2.3.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.3.tgz' } } }, 'both dependencies listed correctly') @@ -149,12 +149,12 @@ test('installs an npm: protocol alias package', t => { bar: { version: '1.2.4', from: 'bar@npm:foo@1.2.4', - resolved: 'http://localhost:1337/foo/-/foo-1.2.4.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.4.tgz' }, foo: { version: '1.2.4', from: 'foo@1.2.4', - resolved: 'http://localhost:1337/foo/-/foo-1.2.4.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.4.tgz' } } }, 'ls shows updated packages') diff --git a/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js b/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js index 0b4dd0e26d5ce2..9c1babd59c96c8 100644 --- a/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js @@ -1,6 +1,6 @@ 'use strict' -require('../common-tap.js') +const common = require('../common-tap.js') const getStream = require('get-stream') const mkdirp = require('mkdirp') @@ -13,7 +13,7 @@ const {File} = Tacks const _createCacheEntryStream = require('../../lib/search/all-package-metadata.js')._createCacheEntryStream -const PKG_DIR = path.resolve(__dirname, 'create-cache-entry-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') function setup () { diff --git a/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js b/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js index 4e916229cd852d..e693e6b33d76e4 100644 --- a/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js @@ -14,7 +14,7 @@ const {File} = Tacks const _createEntryStream = require('../../lib/search/all-package-metadata.js')._createEntryStream -const PKG_DIR = path.resolve(__dirname, 'create-entry-update-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') let server diff --git a/deps/npm/test/tap/all-package-metadata-update-stream-unit.js b/deps/npm/test/tap/all-package-metadata-update-stream-unit.js index 2c08ac347ed697..782bdf231c88db 100644 --- a/deps/npm/test/tap/all-package-metadata-update-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-update-stream-unit.js @@ -11,7 +11,7 @@ const mr = require('npm-registry-mock') var _createEntryUpdateStream = require('../../lib/search/all-package-metadata.js')._createEntryUpdateStream -var PKG_DIR = path.resolve(__dirname, 'create-entry-update-stream') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var server diff --git a/deps/npm/test/tap/all-package-metadata-write-stream-unit.js b/deps/npm/test/tap/all-package-metadata-write-stream-unit.js index 94bb7413f1b321..b258b40dfe666f 100644 --- a/deps/npm/test/tap/all-package-metadata-write-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-write-stream-unit.js @@ -12,7 +12,7 @@ const ms = require('mississippi') const _createCacheWriteStream = require('../../lib/search/all-package-metadata.js')._createCacheWriteStream -const PKG_DIR = path.resolve(__dirname, 'create-cache-write-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') function setup () { diff --git a/deps/npm/test/tap/all-package-metadata.js b/deps/npm/test/tap/all-package-metadata.js index 99d3fa26c52b87..ec605c3486bb9d 100644 --- a/deps/npm/test/tap/all-package-metadata.js +++ b/deps/npm/test/tap/all-package-metadata.js @@ -15,7 +15,7 @@ const File = Tacks.File const allPackageMetadata = require('../../lib/search/all-package-metadata.js') -const PKG_DIR = path.resolve(__dirname, path.basename(__filename, '.js'), 'update-index') +const PKG_DIR = path.resolve(common.pkg, 'update-index') const CACHE_DIR = path.resolve(PKG_DIR, 'cache', '_cacache') let cacheBase let cachePath diff --git a/deps/npm/test/tap/anon-cli-metrics.js b/deps/npm/test/tap/anon-cli-metrics.js index 100ca526cf1688..d021cf62bc92f0 100644 --- a/deps/npm/test/tap/anon-cli-metrics.js +++ b/deps/npm/test/tap/anon-cli-metrics.js @@ -9,7 +9,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/audit-fix.js b/deps/npm/test/tap/audit-fix.js index 7e955682890055..a832078ae9369e 100644 --- a/deps/npm/test/tap/audit-fix.js +++ b/deps/npm/test/tap/audit-fix.js @@ -13,7 +13,7 @@ const test = tap.test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } diff --git a/deps/npm/test/tap/audit.js b/deps/npm/test/tap/audit.js index 3384579f77ba70..631eedf276e37e 100644 --- a/deps/npm/test/tap/audit.js +++ b/deps/npm/test/tap/audit.js @@ -12,21 +12,10 @@ const test = tap.test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } -tap.tearDown(function () { - process.chdir(__dirname) - try { - rimraf.sync(testDir) - } catch (e) { - if (process.platform !== 'win32') { - throw e - } - } -}) - function tmock (t) { return mr({port: common.port}).then(s => { t.tearDown(function () { @@ -263,6 +252,209 @@ test('exits with non-zero exit code for vulnerabilities at the `audit-level` fla }) }) +test('exits with zero exit code for vulnerabilities in devDependencies when running with production flag', t => { + const fixture = new Tacks(new Dir({ + 'package.json': new File({ + name: 'foo', + version: '1.0.0', + dependencies: { + gooddep: '1.0.0' + }, + devDependencies: { + baddep: '1.0.0' + } + }) + })) + fixture.create(testDir) + return tmock(t).then(srv => { + srv.filteringRequestBody(req => 'ok') + srv.post('/-/npm/v1/security/audits/quick', 'ok').reply(200, 'yeah') + srv.get('/gooddep').twice().reply(200, { + name: 'gooddep', + 'dist-tags': { + 'latest': '1.2.3' + }, + versions: { + '1.0.0': { + name: 'gooddep', + version: '1.0.0', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.0.0.tgz' + } + }, + '1.2.3': { + name: 'gooddep', + version: '1.2.3', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.2.3.tgz' + } + } + } + }) + srv.get('/baddep').twice().reply(200, { + name: 'baddep', + 'dist-tags': { + 'latest': '1.2.3' + }, + versions: { + '1.0.0': { + name: 'baddep', + version: '1.0.0', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.0.0.tgz' + } + }, + '1.2.3': { + name: 'baddep', + version: '1.2.3', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.2.3.tgz' + } + } + } + }) + return common.npm([ + 'install', + '--audit', + '--json', + '--production', + '--package-lock-only', + '--registry', common.registry, + '--cache', path.join(testDir, 'npm-cache') + ], EXEC_OPTS).then(([code, stdout, stderr]) => { + srv.filteringRequestBody(req => 'ok') + srv.post('/-/npm/v1/security/audits', 'ok').reply(200, { + actions: [], + metadata: { + vulnerabilities: {} + } + }) + return common.npm([ + 'audit', + '--json', + '--production', + '--registry', common.registry, + '--cache', path.join(testDir, 'npm-cache') + ], EXEC_OPTS).then(([code, stdout, stderr]) => { + t.equal(code, 0, 'exited OK') + }) + }) + }) +}) + +test('exits with non-zero exit code for vulnerabilities in dependencies when running with production flag', t => { + const fixture = new Tacks(new Dir({ + 'package.json': new File({ + name: 'foo', + version: '1.0.0', + dependencies: { + baddep: '1.0.0' + }, + devDependencies: { + gooddep: '1.0.0' + } + }) + })) + fixture.create(testDir) + return tmock(t).then(srv => { + srv.filteringRequestBody(req => 'ok') + srv.post('/-/npm/v1/security/audits/quick', 'ok').reply(200, 'yeah') + srv.get('/baddep').twice().reply(200, { + name: 'baddep', + 'dist-tags': { + 'latest': '1.2.3' + }, + versions: { + '1.0.0': { + name: 'baddep', + version: '1.0.0', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.0.0.tgz' + } + }, + '1.2.3': { + name: 'baddep', + version: '1.2.3', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.2.3.tgz' + } + } + } + }) + srv.get('/gooddep').twice().reply(200, { + name: 'gooddep', + 'dist-tags': { + 'latest': '1.2.3' + }, + versions: { + '1.0.0': { + name: 'gooddep', + version: '1.0.0', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.0.0.tgz' + } + }, + '1.2.3': { + name: 'gooddep', + version: '1.2.3', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.2.3.tgz' + } + } + } + }) + return common.npm([ + 'install', + '--audit', + '--json', + '--production', + '--package-lock-only', + '--registry', common.registry, + '--cache', path.join(testDir, 'npm-cache') + ], EXEC_OPTS).then(([code, stdout, stderr]) => { + srv.filteringRequestBody(req => 'ok') + srv.post('/-/npm/v1/security/audits', 'ok').reply(200, { + actions: [{ + action: 'update', + module: 'baddep', + target: '1.2.3', + resolves: [{path: 'baddep'}] + }], + metadata: { + vulnerabilities: { + low: 1 + } + } + }) + return common.npm([ + 'audit', + '--json', + '--production', + '--registry', common.registry, + '--cache', path.join(testDir, 'npm-cache') + ], EXEC_OPTS).then(([code, stdout, stderr]) => { + t.equal(code, 1, 'exited OK') + }) + }) + }) +}) + test('cleanup', t => { return rimraf(testDir) }) diff --git a/deps/npm/test/tap/auto-prune.js b/deps/npm/test/tap/auto-prune.js index 3fa5d5d05b3609..8d129c4a83b21d 100644 --- a/deps/npm/test/tap/auto-prune.js +++ b/deps/npm/test/tap/auto-prune.js @@ -7,7 +7,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/bearer-token-check.js b/deps/npm/test/tap/bearer-token-check.js index e3af793e602e5b..21c6b0beb2c2f0 100644 --- a/deps/npm/test/tap/bearer-token-check.js +++ b/deps/npm/test/tap/bearer-token-check.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var toNerfDart = require('../../lib/config/nerf-dart.js') -var pkg = resolve(__dirname, 'install-bearer-check') +var pkg = common.pkg var outfile = resolve(pkg, '_npmrc') var modules = resolve(pkg, 'node_modules') var tarballPath = '/scoped-underscore/-/scoped-underscore-1.3.1.tgz' diff --git a/deps/npm/test/tap/bin.js b/deps/npm/test/tap/bin.js index 33320bc21f59a1..bf2397777ce402 100644 --- a/deps/npm/test/tap/bin.js +++ b/deps/npm/test/tap/bin.js @@ -2,12 +2,12 @@ var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var binDir = '../../node_modules/.bin' -var fixture = path.resolve(__dirname, binDir) +var opts = { cwd: common.pkg } +var binDir = '../../../node_modules/.bin' +var fixture = path.resolve(common.pkg, binDir) test('setup', function (t) { - rimraf.sync(path.join(__dirname, 'node_modules')) + rimraf.sync(path.join(common.pkg, 'node_modules')) t.end() }) diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js index ce65f15b28fba6..4177d5f89fcb76 100644 --- a/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js +++ b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds-package') +var pkg = common.pkg var json = { name: 'bitbucket-https-url-with-creds-package', diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds.js b/deps/npm/test/tap/bitbucket-https-url-with-creds.js index ae87d858487528..09f7e0e8e54889 100644 --- a/deps/npm/test/tap/bitbucket-https-url-with-creds.js +++ b/deps/npm/test/tap/bitbucket-https-url-with-creds.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds') +var pkg = common.pkg var json = { name: 'bitbucket-https-url-with-creds', diff --git a/deps/npm/test/tap/bitbucket-shortcut-package.js b/deps/npm/test/tap/bitbucket-shortcut-package.js index 8c418d37dcd0a8..bf1a39068ec875 100644 --- a/deps/npm/test/tap/bitbucket-shortcut-package.js +++ b/deps/npm/test/tap/bitbucket-shortcut-package.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-shortcut-package') +var pkg = common.pkg var json = { name: 'bitbucket-shortcut-package', diff --git a/deps/npm/test/tap/bitbucket-shortcut.js b/deps/npm/test/tap/bitbucket-shortcut.js index f8167fdd2dce23..c81554e2d9d208 100644 --- a/deps/npm/test/tap/bitbucket-shortcut.js +++ b/deps/npm/test/tap/bitbucket-shortcut.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-shortcut') +var pkg = common.pkg var json = { name: 'bitbucket-shortcut', diff --git a/deps/npm/test/tap/bugs.js b/deps/npm/test/tap/bugs.js index 4d2ee37e132d19..8e2685220dd936 100644 --- a/deps/npm/test/tap/bugs.js +++ b/deps/npm/test/tap/bugs.js @@ -8,15 +8,15 @@ var rimraf = require('rimraf') var fs = require('fs') var path = require('path') var join = path.join -var outFile = path.join(__dirname, '/_output') +var outFile = path.join(common.pkg, '/_output') -var opts = { cwd: __dirname } +var opts = { cwd: common.pkg } test('setup', function (t) { var s = '#!/usr/bin/env bash\n' + - 'echo "$@" > ' + JSON.stringify(__dirname) + '/_output\n' - fs.writeFileSync(join(__dirname, '/_script.sh'), s, 'ascii') - fs.chmodSync(join(__dirname, '/_script.sh'), '0755') + 'echo "$@" > ' + JSON.stringify(common.pkg) + '/_output\n' + fs.writeFileSync(join(common.pkg, '/_script.sh'), s, 'ascii') + fs.chmodSync(join(common.pkg, '/_script.sh'), '0755') t.pass('made script') t.end() }) @@ -28,7 +28,7 @@ test('npm bugs underscore', function (t) { 'bugs', 'underscore', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -52,7 +52,7 @@ test('npm bugs optimist - github (https://)', function (t) { 'bugs', 'optimist', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -76,7 +76,7 @@ test('npm bugs npm-test-peer-deps - no repo', function (t) { 'bugs', 'npm-test-peer-deps', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -100,7 +100,7 @@ test('npm bugs test-repo-url-http - non-github (http://)', function (t) { 'bugs', 'test-repo-url-http', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -124,7 +124,7 @@ test('npm bugs test-repo-url-https - gitlab (https://)', function (t) { 'bugs', 'test-repo-url-https', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -148,7 +148,7 @@ test('npm bugs test-repo-url-ssh - gitlab (ssh://)', function (t) { 'bugs', 'test-repo-url-ssh', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -166,7 +166,7 @@ test('npm bugs test-repo-url-ssh - gitlab (ssh://)', function (t) { }) test('cleanup', function (t) { - fs.unlinkSync(join(__dirname, '/_script.sh')) + rimraf.sync(common.pkg) t.pass('cleaned up') t.end() }) diff --git a/deps/npm/test/tap/build-already-built.js b/deps/npm/test/tap/build-already-built.js index 8a66f66e69f933..1e7359a558fa32 100644 --- a/deps/npm/test/tap/build-already-built.js +++ b/deps/npm/test/tap/build-already-built.js @@ -10,7 +10,8 @@ var requireInject = require('require-inject') var npm = require('../../lib/npm.js') -var PKG_DIR = path.resolve(__dirname, 'build-already-built') +const common = require('../common-tap.js') +var PKG_DIR = common.pkg var fakePkg = 'foo' test('setup', function (t) { diff --git a/deps/npm/test/tap/builtin-config.js b/deps/npm/test/tap/builtin-config.js index b960ed0383b7b6..dddd40565101a8 100644 --- a/deps/npm/test/tap/builtin-config.js +++ b/deps/npm/test/tap/builtin-config.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var folder = path.resolve(__dirname, 'builtin-config') +var folder = common.pkg var test = require('tap').test var npm = path.resolve(__dirname, '../..') var spawn = require('child_process').spawn diff --git a/deps/npm/test/tap/bundled-dependencies-nonarray.js b/deps/npm/test/tap/bundled-dependencies-nonarray.js index 924e1b27b60a3a..fdc32c2883af14 100644 --- a/deps/npm/test/tap/bundled-dependencies-nonarray.js +++ b/deps/npm/test/tap/bundled-dependencies-nonarray.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var dir = path.resolve(__dirname, path.basename(__filename, '.js')) +var dir = common.pkg var pkg = path.resolve(dir, 'pkg-with-bundled') var dep = path.resolve(dir, 'a-bundled-dep') diff --git a/deps/npm/test/tap/bundled-dependencies.js b/deps/npm/test/tap/bundled-dependencies.js index c6d67e3c503a57..6dbfa8cb08d74f 100644 --- a/deps/npm/test/tap/bundled-dependencies.js +++ b/deps/npm/test/tap/bundled-dependencies.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var fs = require('graceful-fs') var tar = require('tar') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-bundled-deps') var targetpath = path.resolve(basepath, 'target') var Tacks = require('tacks') diff --git a/deps/npm/test/tap/bundled-transitive-deps.js b/deps/npm/test/tap/bundled-transitive-deps.js index fe591490626365..d3f296ab1612f5 100644 --- a/deps/npm/test/tap/bundled-transitive-deps.js +++ b/deps/npm/test/tap/bundled-transitive-deps.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var npm = require('../../lib/npm.js') var tar = require('tar') var mkdirp = require('mkdirp') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var packed = path.join(testdir, 'packed') var fixture = new Tacks( diff --git a/deps/npm/test/tap/cache-add-unpublished.js b/deps/npm/test/tap/cache-add-unpublished.js index 0e8a9de8bfa67a..08592a50deebb3 100644 --- a/deps/npm/test/tap/cache-add-unpublished.js +++ b/deps/npm/test/tap/cache-add-unpublished.js @@ -11,7 +11,7 @@ test('cache add', function (t) { 'cache', 'add', 'superfoo', - '--registry=http://localhost:1337/' + '--registry=http://localhost:' + common.port + '/' ], {}, function (er, c, so, se) { @@ -31,7 +31,7 @@ function setup (cb) { res.statusCode = 404 res.end('{"error":"not_found"}\n') }) - s.listen(1337, function () { + s.listen(common.port, function () { cb(null, s) }) } diff --git a/deps/npm/test/tap/cache-shasum-fork.js b/deps/npm/test/tap/cache-shasum-fork.js index 1e92d437560d71..3bc2a5d2a59ae9 100644 --- a/deps/npm/test/tap/cache-shasum-fork.js +++ b/deps/npm/test/tap/cache-shasum-fork.js @@ -14,7 +14,7 @@ var common = require('../common-tap.js') var forkPath = path.resolve( __dirname, '..', 'fixtures', 'forked-underscore-1.5.1.tgz' ) -var pkg = path.resolve(__dirname, 'cache-shasum-fork') +var pkg = common.pkg var cache = path.join(pkg, 'cache') var server diff --git a/deps/npm/test/tap/check-cpu-reqs.js b/deps/npm/test/tap/check-cpu-reqs.js index 4d8c3dc6551c4b..0a36492430badf 100644 --- a/deps/npm/test/tap/check-cpu-reqs.js +++ b/deps/npm/test/tap/check-cpu-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/deps/npm/test/tap/check-engine-reqs.js b/deps/npm/test/tap/check-engine-reqs.js index 8dd9b8231fb5ed..7cbbcd354f9973 100644 --- a/deps/npm/test/tap/check-engine-reqs.js +++ b/deps/npm/test/tap/check-engine-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/deps/npm/test/tap/check-install-self.js b/deps/npm/test/tap/check-install-self.js index 2cde1606a91e05..e7591b55e09393 100644 --- a/deps/npm/test/tap/check-install-self.js +++ b/deps/npm/test/tap/check-install-self.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/deps/npm/test/tap/check-os-reqs.js b/deps/npm/test/tap/check-os-reqs.js index 5d0c1ecf78b07c..6c43fa61aa637f 100644 --- a/deps/npm/test/tap/check-os-reqs.js +++ b/deps/npm/test/tap/check-os-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/deps/npm/test/tap/check-permissions.js b/deps/npm/test/tap/check-permissions.js index 0a5f2e038adf13..74e49fb65fb6c4 100644 --- a/deps/npm/test/tap/check-permissions.js +++ b/deps/npm/test/tap/check-permissions.js @@ -8,7 +8,8 @@ var writableFallback = require('../../lib/install/writable.js').fsOpenImplementa var exists = require('../../lib/install/exists.js').fsAccessImplementation var existsFallback = require('../../lib/install/exists.js').fsStatImplementation -var testBase = path.resolve(__dirname, 'check-permissions') +const common = require('../common-tap.js') +var testBase = common.pkg var existingDir = path.resolve(testBase, 'exists') var nonExistingDir = path.resolve(testBase, 'does-not-exist') var writableDir = path.resolve(testBase, 'writable') diff --git a/deps/npm/test/tap/ci-header.js b/deps/npm/test/tap/ci-header.js index dc20cc53c305a0..530da3bf3a72a7 100644 --- a/deps/npm/test/tap/ci-header.js +++ b/deps/npm/test/tap/ci-header.js @@ -8,7 +8,7 @@ var Dir = Tacks.Dir var chain = require('slide').chain var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/ci.js b/deps/npm/test/tap/ci.js index 9d69e3e5eb5240..9150f26efeedce 100644 --- a/deps/npm/test/tap/ci.js +++ b/deps/npm/test/tap/ci.js @@ -12,7 +12,7 @@ const test = require('tap').test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, 'ci') +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } @@ -44,25 +44,27 @@ test('setup', () => { const fixture = new Tacks(Dir({ 'package.json': File(PKG) })) - fixture.create(testDir) - return mr({port: common.port}) + return rimraf(testDir).then(() => { + fixture.create(testDir) + return mr({port: common.port}) + }) .then((server) => { SERVER = server return common.npm([ 'install', '--registry', common.registry ], EXEC_OPTS) - .then(() => fs.readFileAsync( - path.join(testDir, 'package-lock.json'), - 'utf8') - ) - .then((lock) => { - RAW_LOCKFILE = lock - }) - .then(() => common.npm(['ls', '--json'], EXEC_OPTS)) - .then((ret) => { - TREE = scrubFrom(JSON.parse(ret[1])) - }) + }) + .then(() => fs.readFileAsync( + path.join(testDir, 'package-lock.json'), + 'utf8') + ) + .then((lock) => { + RAW_LOCKFILE = lock + }) + .then(() => common.npm(['ls', '--json'], EXEC_OPTS)) + .then((ret) => { + TREE = scrubFrom(JSON.parse(ret[1])) }) }) diff --git a/deps/npm/test/tap/circular-dep.js b/deps/npm/test/tap/circular-dep.js index d7f66eacef1ac9..a08c41bf4a9af3 100644 --- a/deps/npm/test/tap/circular-dep.js +++ b/deps/npm/test/tap/circular-dep.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'circular-dep') +var pkg = common.pkg var minimist = path.join(pkg, 'minimist') var EXEC_OPTS = { diff --git a/deps/npm/test/tap/config-basic.js b/deps/npm/test/tap/config-basic.js index 0483695cf5f25c..a95e94db29fd66 100644 --- a/deps/npm/test/tap/config-basic.js +++ b/deps/npm/test/tap/config-basic.js @@ -1,6 +1,6 @@ var test = require('tap').test +var common = require('../common-config.js') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') var path = require('path') var projectData = { @@ -58,15 +58,7 @@ var expectSources = { } function isDeeplyDetails (t, aa, bb, msg, seen) { - if (aa == null && bb == null) return t.pass(msg) - if (typeof bb !== 'object') return t.is(aa, bb, msg) - if (!seen) seen = [] - for (var kk in seen) if (seen[kk] === aa || seen[kk] === bb) return - seen.push(aa, bb) - t.is(Object.keys(aa).length, Object.keys(bb).length, msg + ': # of elements') - Object.keys(bb).forEach(function (key) { - isDeeplyDetails(t, aa[key], bb[key], msg + ' -> ' + key, seen) - }) + return t.same(aa, bb, msg) } test('no builtin', function (t) { diff --git a/deps/npm/test/tap/config-builtin.js b/deps/npm/test/tap/config-builtin.js index 885d099a1fc305..713522d6ccfa23 100644 --- a/deps/npm/test/tap/config-builtin.js +++ b/deps/npm/test/tap/config-builtin.js @@ -1,6 +1,6 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var path = require('path') var ucData = common.ucData diff --git a/deps/npm/test/tap/config-certfile.js b/deps/npm/test/tap/config-certfile.js index 4b960672ad79e5..904a8c0147718b 100644 --- a/deps/npm/test/tap/config-certfile.js +++ b/deps/npm/test/tap/config-certfile.js @@ -1,4 +1,4 @@ -require('./00-config-setup.js') +require('../common-config.js') var path = require('path') var fs = require('fs') diff --git a/deps/npm/test/tap/config-credentials.js b/deps/npm/test/tap/config-credentials.js index f6f00ee0e65183..d8f6770666e2dd 100644 --- a/deps/npm/test/tap/config-credentials.js +++ b/deps/npm/test/tap/config-credentials.js @@ -1,7 +1,7 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var URI = 'https://registry.lvh.me:8661/' diff --git a/deps/npm/test/tap/config-edit.js b/deps/npm/test/tap/config-edit.js index 7d6eb2588d48b6..a4f78a262c8b9a 100644 --- a/deps/npm/test/tap/config-edit.js +++ b/deps/npm/test/tap/config-edit.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'npm-global-edit') +var pkg = common.pkg var editorSrc = function () { /* #!/usr/bin/env node diff --git a/deps/npm/test/tap/config-envReplace.js b/deps/npm/test/tap/config-envReplace.js index 0b4f628d67339a..f65609f050f751 100644 --- a/deps/npm/test/tap/config-envReplace.js +++ b/deps/npm/test/tap/config-envReplace.js @@ -8,7 +8,8 @@ const ini = require('ini') const test = require('tap').test const npmconf = require('../../lib/config/core.js') -const packagePath = path.resolve(__dirname, 'config-envReplace') +const common = require('../common-tap.js') +const packagePath = common.pkg const packageJsonFile = JSON.stringify({ name: 'config-envReplace' diff --git a/deps/npm/test/tap/config-list.js b/deps/npm/test/tap/config-list.js index 05402d4bbe6ee5..7559214a727a57 100644 --- a/deps/npm/test/tap/config-list.js +++ b/deps/npm/test/tap/config-list.js @@ -5,7 +5,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'config-list') +var pkg = common.pkg var opts = { cwd: pkg, env: common.emptyEnv() } var npmrc = path.resolve(pkg, '.npmrc') var npmrcContents = ` diff --git a/deps/npm/test/tap/config-malformed.js b/deps/npm/test/tap/config-malformed.js index 4f74ea5387e59c..0d859e00340f33 100644 --- a/deps/npm/test/tap/config-malformed.js +++ b/deps/npm/test/tap/config-malformed.js @@ -1,7 +1,7 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') test('with malformed', function (t) { npmconf.load({}, common.malformed, function (er, conf) { diff --git a/deps/npm/test/tap/config-new-cafile.js b/deps/npm/test/tap/config-new-cafile.js index 9cffb19008ed4b..bd5792f3e3ff7d 100644 --- a/deps/npm/test/tap/config-new-cafile.js +++ b/deps/npm/test/tap/config-new-cafile.js @@ -1,4 +1,4 @@ -require('./00-config-setup.js') +const common = require('../common-tap.js') var path = require('path') var fs = require('graceful-fs') @@ -8,8 +8,9 @@ var rimraf = require('rimraf') var osenv = require('osenv') var npmconf = require('../../lib/config/core.js') -var dir = path.resolve(__dirname, 'config-new-cafile') +var dir = common.pkg var beep = path.resolve(dir, 'beep.pem') +var npmrc = path.resolve(dir, 'npmrc') test('setup', function (t) { bootstrap() @@ -18,7 +19,7 @@ test('setup', function (t) { test('can set new cafile when old is gone', function (t) { t.plan(5) - npmconf.load(function (error, conf) { + npmconf.load({ userconfig: npmrc }, function (error, conf) { npmconf.loaded = false t.ifError(error) conf.set('cafile', beep, 'user') @@ -26,7 +27,7 @@ test('can set new cafile when old is gone', function (t) { t.ifError(error) t.equal(conf.get('cafile'), beep) rimraf.sync(beep) - npmconf.load(function (error, conf) { + npmconf.load({ userconfig: npmrc }, function (error, conf) { if (error) { throw error } @@ -47,6 +48,7 @@ test('cleanup', function (t) { function bootstrap () { mkdirp.sync(dir) + fs.writeFileSync(npmrc, '') fs.writeFileSync(beep, '') } diff --git a/deps/npm/test/tap/config-private.js b/deps/npm/test/tap/config-private.js index 91582921e6dffa..e6bf9d2e83cee3 100644 --- a/deps/npm/test/tap/config-private.js +++ b/deps/npm/test/tap/config-private.js @@ -5,7 +5,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'config-private') +var pkg = common.pkg var opts = { cwd: pkg } test('setup', function (t) { diff --git a/deps/npm/test/tap/config-project.js b/deps/npm/test/tap/config-project.js index b9e8b7ac04a2ef..0f7be913c097fa 100644 --- a/deps/npm/test/tap/config-project.js +++ b/deps/npm/test/tap/config-project.js @@ -3,7 +3,7 @@ var path = require('path') var fix = path.resolve(__dirname, '..', 'fixtures', 'config') var projectRc = path.resolve(fix, '.npmrc') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var projectData = { just: 'testing' } diff --git a/deps/npm/test/tap/config-save.js b/deps/npm/test/tap/config-save.js index a7f85d6015e4bb..23dc7b59607859 100644 --- a/deps/npm/test/tap/config-save.js +++ b/deps/npm/test/tap/config-save.js @@ -1,13 +1,15 @@ var fs = require('fs') var ini = require('ini') -var test = require('tap').test +var t = require('tap') +const test = t.test +var common = require('../common-config.js') +var commonTap = require('../common-tap.js') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') var expectConf = [ 'globalconfig = ' + common.globalconfig, 'email = i@izs.me', - 'env-thing = asdf', + 'env-thing = foo', 'init.author.name = Isaac Z. Schlueter', 'init.author.email = i@izs.me', 'init.author.url = http://blog.izs.me/', @@ -32,7 +34,7 @@ var expectConf = [ var expectFile = [ 'globalconfig = ' + common.globalconfig, 'email = i@izs.me', - 'env-thing = asdf', + 'env-thing = foo', 'init.author.name = Isaac Z. Schlueter', 'init.author.email = i@izs.me', 'init.author.url = http://blog.izs.me/', @@ -54,6 +56,10 @@ var expectFile = [ '' ].join('\n') +const userconfig = commonTap.pkg + '/userconfig' +fs.writeFileSync(userconfig, fs.readFileSync(common.userconfig)) +process.env.npm_config_userconfig = userconfig + test('saving configs', function (t) { npmconf.load(function (er, conf) { if (er) throw er diff --git a/deps/npm/test/tap/correct-mkdir.js b/deps/npm/test/tap/correct-mkdir.js index 2c93f943ad5c46..c69f8b00b55d53 100644 --- a/deps/npm/test/tap/correct-mkdir.js +++ b/deps/npm/test/tap/correct-mkdir.js @@ -1,9 +1,9 @@ /* eslint-disable camelcase */ var test = require('tap').test var assert = require('assert') -var path = require('path') var requireInject = require('require-inject') -var cache_dir = path.resolve(__dirname, 'correct-mkdir') +const common = require('../common-tap.js') +var cache_dir = common.pkg test('correct-mkdir: no race conditions', function (t) { var mock_fs = {} diff --git a/deps/npm/test/tap/cruft-test.js b/deps/npm/test/tap/cruft-test.js index 0cbcc6f56c61d6..4f2ed6c0d0a713 100644 --- a/deps/npm/test/tap/cruft-test.js +++ b/deps/npm/test/tap/cruft-test.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var cruft = path.join(base, 'node_modules', 'cruuuft') var pkg = { name: 'example', diff --git a/deps/npm/test/tap/debug-logs.js b/deps/npm/test/tap/debug-logs.js index a6997352636fe2..0e951c4bb082be 100644 --- a/deps/npm/test/tap/debug-logs.js +++ b/deps/npm/test/tap/debug-logs.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') @@ -66,16 +66,28 @@ test('example', function (t) { t.matches(path.relative(cachedir, logfile), /^_logs/, 'debug log is inside the cache in _logs') } - // we run a bunch concurrently, this will actually create > than our limit as the check is done - // when the command starts - var todo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + // we run a bunch concurrently, this will actually create > than our limit + // as the check is done when the command starts + // + // It has to be > the log count (10) but also significantly higher than + // the number of cores on the machine, or else some might be able to get + // to the log folder pruning logic in parallel, resulting in FEWER files + // than we expect being present at the end. + var procCount = Math.max(require('os').cpus().length * 2, 12) + var todo = new Array(procCount).join(',').split(',').map((v, k) => k) asyncMap(todo, function (num, next) { + // another way would be to just simulate this? + // var f = path.join(cachedir, '_logs', num + '-debug.log') + // require('fs').writeFile(f, 'log ' + num, next) common.npm(['run', '--logs-max=10', 'false'], conf, function (err, code) { if (err) throw err t.is(code, 1, 'run #' + num + ' errored as expected') next() }) }, function () { + var files = glob.sync(path.join(cachedir, '_logs', '*')) + t.ok(files.length > 10, 'there should be more than 10 log files') + // now we do one more and that should clean up the list common.npm(['run', '--logs-max=10', 'false'], conf, function (err, code) { if (err) throw err diff --git a/deps/npm/test/tap/dedupe-git-semver.js b/deps/npm/test/tap/dedupe-git-semver.js index 21e372e24b0d0e..35bb2c87d80e78 100644 --- a/deps/npm/test/tap/dedupe-git-semver.js +++ b/deps/npm/test/tap/dedupe-git-semver.js @@ -36,7 +36,8 @@ const npm = requireInject.installGlobally('../../lib/npm.js', { } }) -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const common = require('../common-tap.js') +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/dedupe-scoped.js b/deps/npm/test/tap/dedupe-scoped.js index 9d5ff9ac4c0034..957f67e141c40c 100644 --- a/deps/npm/test/tap/dedupe-scoped.js +++ b/deps/npm/test/tap/dedupe-scoped.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = join(__dirname, 'dedupe-scoped') +var pkg = common.pkg var modules = join(pkg, 'node_modules') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/dedupe.js b/deps/npm/test/tap/dedupe.js index b6c601cbad37e3..109f81656237bf 100644 --- a/deps/npm/test/tap/dedupe.js +++ b/deps/npm/test/tap/dedupe.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'dedupe') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/dist-tag.js b/deps/npm/test/tap/dist-tag.js index 3631a598e9c684..0567964d35a230 100644 --- a/deps/npm/test/tap/dist-tag.js +++ b/deps/npm/test/tap/dist-tag.js @@ -7,7 +7,7 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'dist-tag') +var pkg = common.pkg var server var scoped = { diff --git a/deps/npm/test/tap/do-not-remove-other-bins.js b/deps/npm/test/tap/do-not-remove-other-bins.js index 6fec728d43bcc3..4e6b0d27b2f537 100644 --- a/deps/npm/test/tap/do-not-remove-other-bins.js +++ b/deps/npm/test/tap/do-not-remove-other-bins.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installPath = path.resolve(base, 'install') var installBin = path.resolve(installPath, 'node_modules', '.bin') var packageApath = path.resolve(base, 'packageA') diff --git a/deps/npm/test/tap/doctor.js b/deps/npm/test/tap/doctor.js index 26c74833e2bfcf..6ee05746960d6a 100644 --- a/deps/npm/test/tap/doctor.js +++ b/deps/npm/test/tap/doctor.js @@ -13,7 +13,7 @@ const which = require('which') const Dir = Tacks.Dir const File = Tacks.File -const ROOT = path.join(__dirname, path.basename(__filename, '.js')) +const ROOT = common.pkg const CACHE = path.join(ROOT, 'cache') const TMP = path.join(ROOT, 'tmp') const PREFIX = path.join(ROOT, 'global-prefix') diff --git a/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js b/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js index d483b3e22ac332..11f52209ed8359 100644 --- a/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js +++ b/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var pathModA = path.join(pkg, 'node_modules', 'moduleA') var pathModB = path.join(pkg, 'node_modules', 'moduleB') diff --git a/deps/npm/test/tap/false-name.js b/deps/npm/test/tap/false-name.js index 1e2a4d43ddbb93..301be4fc8ef945 100644 --- a/deps/npm/test/tap/false-name.js +++ b/deps/npm/test/tap/false-name.js @@ -18,7 +18,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'false-name') +var pkg = common.pkg var cache = path.join(pkg, 'cache') var server diff --git a/deps/npm/test/tap/fetch-package-metadata.js b/deps/npm/test/tap/fetch-package-metadata.js index 2fc501369e52f1..9a45fb57a92deb 100644 --- a/deps/npm/test/tap/fetch-package-metadata.js +++ b/deps/npm/test/tap/fetch-package-metadata.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg function setup (cb) { cleanup() @@ -56,7 +56,7 @@ test('fetch-package-metadata provides resolved metadata', function (t) { function thenVerifyMetadata (err, pkg) { t.ifError(err, 'fetched metadata') - t.equals(pkg._resolved, 'http://localhost:1337/test-package/-/test-package-0.0.0.tgz', '_resolved') + t.equals(pkg._resolved, 'http://localhost:' + common.port + '/test-package/-/test-package-0.0.0.tgz', '_resolved') t.equals(pkg._integrity, 'sha1-sNMrbEXCWcV4uiADdisgUTG9+9E=', '_integrity') server.close() t.end() diff --git a/deps/npm/test/tap/full-warning-messages.js b/deps/npm/test/tap/full-warning-messages.js index c986695d67e994..945cf66a629dd1 100644 --- a/deps/npm/test/tap/full-warning-messages.js +++ b/deps/npm/test/tap/full-warning-messages.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var fs = require('graceful-fs') var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var modA = path.resolve(base, 'modA') var modB = path.resolve(base, 'modB') diff --git a/deps/npm/test/tap/gently-rm-cmdshims.js b/deps/npm/test/tap/gently-rm-cmdshims.js index 304c6956bdfd60..6726fe76d8dbae 100644 --- a/deps/npm/test/tap/gently-rm-cmdshims.js +++ b/deps/npm/test/tap/gently-rm-cmdshims.js @@ -7,7 +7,8 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var npm = require('../../lib/npm.js') -var work = path.join(__dirname, path.basename(__filename, '.js')) +const common = require('../common-tap.js') +var work = common.pkg var doremove = path.join(work, 'doremove') var dontremove = path.join(work, 'dontremove') var example_json = { diff --git a/deps/npm/test/tap/gently-rm-linked-module.js b/deps/npm/test/tap/gently-rm-linked-module.js index 877c683c9f04e6..ab595e10c740f7 100644 --- a/deps/npm/test/tap/gently-rm-linked-module.js +++ b/deps/npm/test/tap/gently-rm-linked-module.js @@ -1,6 +1,5 @@ var common = require('../common-tap.js') -var basename = require('path').basename var resolve = require('path').resolve var fs = require('graceful-fs') var test = require('tap').test @@ -11,7 +10,7 @@ var Dir = Tacks.Dir var Symlink = Tacks.Symlink var isWindows = require('../../lib/utils/is-windows.js') -var base = resolve(__dirname, basename(__filename, '.js')) +var base = common.pkg var fixture = new Tacks(Dir({ 'working-dir': Dir({ 'node_modules': Dir({}) // so it doesn't try to install into npm's own node_modules diff --git a/deps/npm/test/tap/gently-rm-overeager.js b/deps/npm/test/tap/gently-rm-overeager.js index 7299b2c3f4ce11..91a3768aff705a 100644 --- a/deps/npm/test/tap/gently-rm-overeager.js +++ b/deps/npm/test/tap/gently-rm-overeager.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var pkg = path.join(testdir, 'gently-rm-overeager') var dep = path.join(testdir, 'test-whoops') diff --git a/deps/npm/test/tap/gently-rm-symlinked-global-dir.js b/deps/npm/test/tap/gently-rm-symlinked-global-dir.js index 8ac290091ca5c1..0a27dae5c5e955 100644 --- a/deps/npm/test/tap/gently-rm-symlinked-global-dir.js +++ b/deps/npm/test/tap/gently-rm-symlinked-global-dir.js @@ -7,10 +7,10 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var isWindows = require('../../lib/utils/is-windows.js') -var pkg = resolve(__dirname, 'gently-rm-linked') -var dep = resolve(__dirname, 'test-linked') -var glb = resolve(__dirname, 'test-global') -var lnk = resolve(__dirname, 'test-global-link') +var pkg = resolve(common.pkg, 'package') +var dep = resolve(common.pkg, 'test-linked') +var glb = resolve(common.pkg, 'test-global') +var lnk = resolve(common.pkg, 'test-global-link') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/gist-short-shortcut-package.js b/deps/npm/test/tap/gist-short-shortcut-package.js index 4074995ee5cc49..d7c70b16b029fc 100644 --- a/deps/npm/test/tap/gist-short-shortcut-package.js +++ b/deps/npm/test/tap/gist-short-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-short-shortcut-package') +var pkg = common.pkg var json = { name: 'gist-short-shortcut-package', diff --git a/deps/npm/test/tap/gist-short-shortcut.js b/deps/npm/test/tap/gist-short-shortcut.js index 875c30e0365124..04bf5bd42a9859 100644 --- a/deps/npm/test/tap/gist-short-shortcut.js +++ b/deps/npm/test/tap/gist-short-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-short-shortcut') +var pkg = common.pkg var json = { name: 'gist-short-shortcut', diff --git a/deps/npm/test/tap/gist-shortcut-package.js b/deps/npm/test/tap/gist-shortcut-package.js index dd6f41359e9edd..9851e80b0e07ac 100644 --- a/deps/npm/test/tap/gist-shortcut-package.js +++ b/deps/npm/test/tap/gist-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-shortcut-package') +var pkg = common.pkg var json = { name: 'gist-shortcut-package', diff --git a/deps/npm/test/tap/gist-shortcut.js b/deps/npm/test/tap/gist-shortcut.js index 8ad5ef001ce237..9958a996e076c9 100644 --- a/deps/npm/test/tap/gist-shortcut.js +++ b/deps/npm/test/tap/gist-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-shortcut') +var pkg = common.pkg var json = { name: 'gist-shortcut', diff --git a/deps/npm/test/tap/git-dependency-install-link.js b/deps/npm/test/tap/git-dependency-install-link.js index 1bf839f3028910..462df8973fead1 100644 --- a/deps/npm/test/tap/git-dependency-install-link.js +++ b/deps/npm/test/tap/git-dependency-install-link.js @@ -11,9 +11,9 @@ var mr = require('npm-registry-mock') var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'git-dependency-install-link') -var repo = resolve(__dirname, 'git-dependency-install-link-repo') -var prefix = resolve(__dirname, 'git-dependency-install-link-prefix') +var pkg = common.pkg +var repo = pkg + '-repo' +var prefix = pkg + '-prefix' var cache = resolve(pkg, 'cache') var daemon @@ -32,7 +32,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git' + 'child': 'git://localhost:' + common.gitPort + '/child.git' } }, null, 2) + '\n' @@ -139,7 +139,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, diff --git a/deps/npm/test/tap/git-npmignore.js b/deps/npm/test/tap/git-npmignore.js index 19d014c3d9a929..42c1637b18013b 100644 --- a/deps/npm/test/tap/git-npmignore.js +++ b/deps/npm/test/tap/git-npmignore.js @@ -1,7 +1,6 @@ /* eslint-disable camelcase */ var child_process = require('child_process') var readdir = require('graceful-fs').readdirSync -var path = require('path') var resolve = require('path').resolve var rimraf = require('rimraf') @@ -42,7 +41,7 @@ var fixture = new Tacks(Dir({ }) })) -var testdir = resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = resolve(testdir, 'cache') var dep = resolve(testdir, 'deps', 'gitch') var packname = 'gitch-1.0.0.tgz' diff --git a/deps/npm/test/tap/git-prepare.js b/deps/npm/test/tap/git-prepare.js index 1a61056b4beda1..9112828ce40cde 100644 --- a/deps/npm/test/tap/git-prepare.js +++ b/deps/npm/test/tap/git-prepare.js @@ -11,7 +11,7 @@ const mr = require('npm-registry-mock') const npm = require('../../lib/npm.js') const common = require('../common-tap.js') -const testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +const testdir = common.pkg const repo = path.join(testdir, 'repo') const prefix = path.join(testdir, 'prefix') const cache = path.join(testdir, 'cache') @@ -37,7 +37,7 @@ const fixture = new Tacks(Dir({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git' + 'child': 'git://localhost:' + common.gitPort + '/child.git' } }) }), @@ -144,7 +144,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: repo, diff --git a/deps/npm/test/tap/github-shortcut-package.js b/deps/npm/test/tap/github-shortcut-package.js index 73385436b78930..a084479e1791e1 100644 --- a/deps/npm/test/tap/github-shortcut-package.js +++ b/deps/npm/test/tap/github-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'github-shortcut-package') +var pkg = common.pkg var json = { name: 'github-shortcut-package', diff --git a/deps/npm/test/tap/github-shortcut.js b/deps/npm/test/tap/github-shortcut.js index 641d64f3b92fea..90f4655149bb9d 100644 --- a/deps/npm/test/tap/github-shortcut.js +++ b/deps/npm/test/tap/github-shortcut.js @@ -13,7 +13,7 @@ const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.resolve(__dirname, 'github-shortcut') +const pkg = common.pkg const json = { name: 'github-shortcut', diff --git a/deps/npm/test/tap/gitlab-shortcut-package.js b/deps/npm/test/tap/gitlab-shortcut-package.js index 1dd1ba99fbd295..54632f8370403b 100644 --- a/deps/npm/test/tap/gitlab-shortcut-package.js +++ b/deps/npm/test/tap/gitlab-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gitlab-shortcut-package') +var pkg = common.pkg var json = { name: 'gitlab-shortcut-package', diff --git a/deps/npm/test/tap/gitlab-shortcut.js b/deps/npm/test/tap/gitlab-shortcut.js index 6b2bfbc3edd86e..724178867aedec 100644 --- a/deps/npm/test/tap/gitlab-shortcut.js +++ b/deps/npm/test/tap/gitlab-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gitlab-shortcut') +var pkg = common.pkg var json = { name: 'gitlab-shortcut', diff --git a/deps/npm/test/tap/graceful-restart.js b/deps/npm/test/tap/graceful-restart.js index 56513fbf7ebbb2..740561bd79efa4 100644 --- a/deps/npm/test/tap/graceful-restart.js +++ b/deps/npm/test/tap/graceful-restart.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'graceful-restart') +var pkg = common.pkg var outGraceless = [ 'prerestart', diff --git a/deps/npm/test/tap/ignore-install-link.js b/deps/npm/test/tap/ignore-install-link.js index 684c6a05b24c09..129df3c2717ca1 100644 --- a/deps/npm/test/tap/ignore-install-link.js +++ b/deps/npm/test/tap/ignore-install-link.js @@ -9,7 +9,7 @@ var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var root = path.resolve(__dirname, 'ignore-install-link') +var root = common.pkg var pkg = path.resolve(root, 'pkg') var dep = path.resolve(root, 'dep') var target = path.resolve(pkg, 'node_modules', 'dep') diff --git a/deps/npm/test/tap/ignore-scripts.js b/deps/npm/test/tap/ignore-scripts.js index 785921d7eb2d67..f5af4553c26c0f 100644 --- a/deps/npm/test/tap/ignore-scripts.js +++ b/deps/npm/test/tap/ignore-scripts.js @@ -9,7 +9,7 @@ var common = require('../common-tap') // ignore-scripts/package.json has scripts that always exit with non-zero error // codes. -var pkg = path.resolve(__dirname, 'ignore-scripts') +var pkg = common.pkg var gypfile = 'bad_binding_file\n' var json = { diff --git a/deps/npm/test/tap/init-interrupt.js b/deps/npm/test/tap/init-interrupt.js index b0c7643ddf044d..114bb2bacba274 100644 --- a/deps/npm/test/tap/init-interrupt.js +++ b/deps/npm/test/tap/init-interrupt.js @@ -2,7 +2,6 @@ // if 'npm init' is interrupted with ^C, don't report // 'init written successfully' var test = require('tap').test -var path = require('path') var osenv = require('osenv') var rimraf = require('rimraf') var npmlog = require('npmlog') @@ -10,7 +9,8 @@ var requireInject = require('require-inject') var npm = require('../../lib/npm.js') -var PKG_DIR = path.resolve(__dirname, 'init-interrupt') +const common = require('../common-tap.js') +var PKG_DIR = common.pkg test('setup', function (t) { cleanup() diff --git a/deps/npm/test/tap/install-at-locally.js b/deps/npm/test/tap/install-at-locally.js index fa0190ceb3ee28..705c2df1196424 100644 --- a/deps/npm/test/tap/install-at-locally.js +++ b/deps/npm/test/tap/install-at-locally.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-at-locally') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/deps/npm/test/tap/install-at-sub-path-locally.js b/deps/npm/test/tap/install-at-sub-path-locally.js index e16b75179ebaf2..08b64746af6786 100644 --- a/deps/npm/test/tap/install-at-sub-path-locally.js +++ b/deps/npm/test/tap/install-at-sub-path-locally.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-at-sub-path-locally') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/deps/npm/test/tap/install-bad-dep-format.js b/deps/npm/test/tap/install-bad-dep-format.js index 94c7d175fde459..d01996f1552127 100644 --- a/deps/npm/test/tap/install-bad-dep-format.js +++ b/deps/npm/test/tap/install-bad-dep-format.js @@ -21,7 +21,7 @@ test('invalid url format returns appropriate error', function (t) { setup(json) common.npm(['install'], {}, function (err, code, stdout, stderr) { t.ifError(err, 'install ran without error') - t.equals(code, 1, 'inall exited with code 1') + t.equals(code, 1, 'install exited with code 1') t.match(stderr, /ERR.*Unsupported URL Type/, 'Error should report that invalid url-style formats are used') @@ -43,12 +43,12 @@ function cleanup () { process.chdir(osenv.tmpdir()) var pkgs = [json] pkgs.forEach(function (json) { - rimraf.sync(path.resolve(__dirname, json.name)) + rimraf.sync(path.resolve(common.pkg, json.name)) }) } function mkPkg (json) { - var pkgPath = path.resolve(__dirname, json.name) + var pkgPath = path.resolve(common.pkg, json.name) mkdirp.sync(pkgPath) fs.writeFileSync( path.join(pkgPath, 'package.json'), diff --git a/deps/npm/test/tap/install-bad-man.js b/deps/npm/test/tap/install-bad-man.js index 226d0b24fc06d2..98c8e9a7e04538 100644 --- a/deps/npm/test/tap/install-bad-man.js +++ b/deps/npm/test/tap/install-bad-man.js @@ -8,8 +8,8 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-bad-man') -var target = resolve(__dirname, 'install-bad-man-target') +var pkg = common.pkg +var target = pkg + '-target' var EXEC_OPTS = { cwd: target diff --git a/deps/npm/test/tap/install-before.js b/deps/npm/test/tap/install-before.js index c99b996c43029d..05a254a1ef1ce9 100644 --- a/deps/npm/test/tap/install-before.js +++ b/deps/npm/test/tap/install-before.js @@ -12,7 +12,7 @@ const { test } = require('tap') const { Dir, File } = Tacks -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg let server test('setup', t => { diff --git a/deps/npm/test/tap/install-bin-null.js b/deps/npm/test/tap/install-bin-null.js index f45528a75acf45..7a87a2e0bbc270 100644 --- a/deps/npm/test/tap/install-bin-null.js +++ b/deps/npm/test/tap/install-bin-null.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-bin-null') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-only-development.js b/deps/npm/test/tap/install-cli-only-development.js index ff9d05f547f26a..a68c0f8aac0a25 100644 --- a/deps/npm/test/tap/install-cli-only-development.js +++ b/deps/npm/test/tap/install-cli-only-development.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-development') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-only-production.js b/deps/npm/test/tap/install-cli-only-production.js index 40328d773539f2..e43692d3d7c9cf 100644 --- a/deps/npm/test/tap/install-cli-only-production.js +++ b/deps/npm/test/tap/install-cli-only-production.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-only-production') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-only-shrinkwrap.js b/deps/npm/test/tap/install-cli-only-shrinkwrap.js index aa731909d3539d..e3a4685d9c459d 100644 --- a/deps/npm/test/tap/install-cli-only-shrinkwrap.js +++ b/deps/npm/test/tap/install-cli-only-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-production-nosave.js b/deps/npm/test/tap/install-cli-production-nosave.js index cf69ad3fae05db..46b3460b7232c1 100644 --- a/deps/npm/test/tap/install-cli-production-nosave.js +++ b/deps/npm/test/tap/install-cli-production-nosave.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-cli-production-nosave') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-production.js b/deps/npm/test/tap/install-cli-production.js index a1fdac6e880d5a..4c88add92fffcf 100644 --- a/deps/npm/test/tap/install-cli-production.js +++ b/deps/npm/test/tap/install-cli-production.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-production') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-unicode.js b/deps/npm/test/tap/install-cli-unicode.js index 01a5f4a471dc06..2691db96d06777 100644 --- a/deps/npm/test/tap/install-cli-unicode.js +++ b/deps/npm/test/tap/install-cli-unicode.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'install-cli-unicode') +var pkg = common.pkg function hasOnlyAscii (s) { return /^[\000-\177]*$/.test(s) diff --git a/deps/npm/test/tap/install-contributors-count.js b/deps/npm/test/tap/install-contributors-count.js index 52fba0fd249999..ead925081330bb 100644 --- a/deps/npm/test/tap/install-contributors-count.js +++ b/deps/npm/test/tap/install-contributors-count.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ node_modules: Dir({ a: Dir({ diff --git a/deps/npm/test/tap/install-dep-classification.js b/deps/npm/test/tap/install-dep-classification.js index 153a7f3927ec19..3c65459d345fbc 100644 --- a/deps/npm/test/tap/install-dep-classification.js +++ b/deps/npm/test/tap/install-dep-classification.js @@ -7,7 +7,7 @@ const Dir = Tacks.Dir const common = require('../common-tap.js') const fs = require('fs') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/install-duplicate-deps-warning.js b/deps/npm/test/tap/install-duplicate-deps-warning.js index 017a5cdfe117cb..2b10d8aa319646 100644 --- a/deps/npm/test/tap/install-duplicate-deps-warning.js +++ b/deps/npm/test/tap/install-duplicate-deps-warning.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var json = { dependencies: { diff --git a/deps/npm/test/tap/install-from-local.js b/deps/npm/test/tap/install-from-local.js index 3cac382a70d38c..a3e63b359dbea2 100644 --- a/deps/npm/test/tap/install-from-local.js +++ b/deps/npm/test/tap/install-from-local.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var root = path.join(__dirname, 'install-from-local') +var root = common.pkg var pkg = path.join(root, 'package-with-local-paths') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-into-likenamed-folder.js b/deps/npm/test/tap/install-into-likenamed-folder.js index 187d5fbf11bca9..c7bc86f3baaf48 100644 --- a/deps/npm/test/tap/install-into-likenamed-folder.js +++ b/deps/npm/test/tap/install-into-likenamed-folder.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var moduleDir = path.join(base, 'example-src') var destDir = path.join(base, 'example') var moduleJson = { diff --git a/deps/npm/test/tap/install-link-scripts.js b/deps/npm/test/tap/install-link-scripts.js index acc88b4b2ccdc9..bff4dd5ef0106e 100644 --- a/deps/npm/test/tap/install-link-scripts.js +++ b/deps/npm/test/tap/install-link-scripts.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-link-scripts') +var pkg = common.pkg var tmp = path.join(pkg, 'tmp') var dep = path.join(pkg, 'dep') diff --git a/deps/npm/test/tap/install-local-dep-cycle.js b/deps/npm/test/tap/install-local-dep-cycle.js index 1f76ad9598a2d0..a66f04bce4715d 100644 --- a/deps/npm/test/tap/install-local-dep-cycle.js +++ b/deps/npm/test/tap/install-local-dep-cycle.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var baseJSON = { name: 'base', diff --git a/deps/npm/test/tap/install-man.js b/deps/npm/test/tap/install-man.js index d24819ca7887d1..720b4c217b3757 100644 --- a/deps/npm/test/tap/install-man.js +++ b/deps/npm/test/tap/install-man.js @@ -8,8 +8,8 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-man') -var target = resolve(__dirname, 'install-man-target') +var pkg = common.pkg +var target = pkg + '-target' common.pendIfWindows('man pages do not get installed on Windows') diff --git a/deps/npm/test/tap/install-noargs-dev.js b/deps/npm/test/tap/install-noargs-dev.js index ec9c7e3687eef8..4716dc2243b537 100644 --- a/deps/npm/test/tap/install-noargs-dev.js +++ b/deps/npm/test/tap/install-noargs-dev.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-noargs-dev') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-package-json-order.js b/deps/npm/test/tap/install-package-json-order.js index 93977c6c3dc441..ae000ff6738df3 100644 --- a/deps/npm/test/tap/install-package-json-order.js +++ b/deps/npm/test/tap/install-package-json-order.js @@ -5,7 +5,8 @@ var mkdirp = require('mkdirp') var spawn = require('child_process').spawn var npm = require.resolve('../../bin/npm-cli.js') var node = process.execPath -var pkg = path.resolve(__dirname, 'install-package-json-order') +const common = require('../common-tap.js') +var pkg = common.pkg var workdir = path.join(pkg, 'workdir') var tmp = path.join(pkg, 'tmp') var cache = path.join(pkg, 'cache') diff --git a/deps/npm/test/tap/install-package-lock-only.js b/deps/npm/test/tap/install-package-lock-only.js index 1610988851c12c..6e98f27b30021e 100644 --- a/deps/npm/test/tap/install-package-lock-only.js +++ b/deps/npm/test/tap/install-package-lock-only.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/install-parse-error.js b/deps/npm/test/tap/install-parse-error.js index 1330195ead9f06..1a72c336de0714 100644 --- a/deps/npm/test/tap/install-parse-error.js +++ b/deps/npm/test/tap/install-parse-error.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ 'package.json': File( diff --git a/deps/npm/test/tap/install-property-conflicts.js b/deps/npm/test/tap/install-property-conflicts.js index 8f293885abf401..c8f58e139fbccd 100644 --- a/deps/npm/test/tap/install-property-conflicts.js +++ b/deps/npm/test/tap/install-property-conflicts.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-property-conflicts') +var pkg = common.pkg var target = resolve(pkg, '_target') var EXEC_OPTS = { diff --git a/deps/npm/test/tap/install-report-just-installed.js b/deps/npm/test/tap/install-report-just-installed.js index 0a2cde2562ac78..23b373b2694050 100644 --- a/deps/npm/test/tap/install-report-just-installed.js +++ b/deps/npm/test/tap/install-report-just-installed.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ node_modules: Dir({ a: Dir({ diff --git a/deps/npm/test/tap/install-save-consistent-newlines.js b/deps/npm/test/tap/install-save-consistent-newlines.js index 6250377445a79f..acea57c987bfb9 100644 --- a/deps/npm/test/tap/install-save-consistent-newlines.js +++ b/deps/npm/test/tap/install-save-consistent-newlines.js @@ -11,7 +11,7 @@ const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.join(__dirname, 'install-save-consistent-newlines') +const pkg = common.pkg const EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-save-exact.js b/deps/npm/test/tap/install-save-exact.js index 14e32f0f84b62c..3d57ead361be8f 100644 --- a/deps/npm/test/tap/install-save-exact.js +++ b/deps/npm/test/tap/install-save-exact.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-save-exact') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-save-local.js b/deps/npm/test/tap/install-save-local.js index 5965281bf29677..8f4f5ecb0023e6 100644 --- a/deps/npm/test/tap/install-save-local.js +++ b/deps/npm/test/tap/install-save-local.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var root = path.join(__dirname, 'install-save-local') +var root = common.pkg var pkg = path.join(root, 'package') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-save-prefix.js b/deps/npm/test/tap/install-save-prefix.js index b669c5fb7ef706..001e24d873558a 100644 --- a/deps/npm/test/tap/install-save-prefix.js +++ b/deps/npm/test/tap/install-save-prefix.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-save-prefix') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-scoped-already-installed.js b/deps/npm/test/tap/install-scoped-already-installed.js index 58966b047c4308..707d82a44353ed 100644 --- a/deps/npm/test/tap/install-scoped-already-installed.js +++ b/deps/npm/test/tap/install-scoped-already-installed.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var root = path.join(__dirname, 'install-scoped-already-installed') +var root = common.pkg var pkg = path.join(root, 'package-with-scoped-paths') var modules = path.join(pkg, 'node_modules') diff --git a/deps/npm/test/tap/install-scoped-link.js b/deps/npm/test/tap/install-scoped-link.js index 9171b8f46f4397..920e7e3d4531af 100644 --- a/deps/npm/test/tap/install-scoped-link.js +++ b/deps/npm/test/tap/install-scoped-link.js @@ -12,8 +12,8 @@ var escapeExecPath = require('../../lib/utils/escape-exec-path') var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-scoped-link') -var work = path.join(__dirname, 'install-scoped-link-TEST') +var pkg = common.pkg +var work = pkg + '-TEST' var modules = path.join(work, 'node_modules') var EXEC_OPTS = { cwd: work } diff --git a/deps/npm/test/tap/install-scoped-with-bundled-dependency.js b/deps/npm/test/tap/install-scoped-with-bundled-dependency.js index bd197ae036591c..76f440dc6c158d 100644 --- a/deps/npm/test/tap/install-scoped-with-bundled-dependency.js +++ b/deps/npm/test/tap/install-scoped-with-bundled-dependency.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/install-scoped-with-peer-dependency.js b/deps/npm/test/tap/install-scoped-with-peer-dependency.js index 7f60c732210927..477a04a1055dd3 100644 --- a/deps/npm/test/tap/install-scoped-with-peer-dependency.js +++ b/deps/npm/test/tap/install-scoped-with-peer-dependency.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-scoped-with-peer-dependency') +var pkg = common.pkg var local = path.join(pkg, 'package') var EXEC_OPTS = { } diff --git a/deps/npm/test/tap/install-shrinkwrapped-git.js b/deps/npm/test/tap/install-shrinkwrapped-git.js index 7bbb4f6e5fb755..7e50aa713d570c 100644 --- a/deps/npm/test/tap/install-shrinkwrapped-git.js +++ b/deps/npm/test/tap/install-shrinkwrapped-git.js @@ -11,7 +11,7 @@ var npm = require('../../lib/npm') var common = require('../common-tap') var chain = require('slide').chain -var mockPath = resolve(__dirname, 'install-shrinkwrapped') +var mockPath = common.pkg var parentPath = resolve(mockPath, 'parent') var parentNodeModulesPath = path.join(parentPath, 'node_modules') var outdatedNodeModulesPath = resolve(mockPath, 'node-modules-backup') @@ -53,11 +53,11 @@ test('shrinkwrapped git dependency got updated', function (t) { if (err) { throw err } chain([ // Install & shrinkwrap child package's first commit - [npm.commands.install, ['git://localhost:1234/child.git#' + refs[0]]], + [npm.commands.install, ['git://localhost:' + common.gitPort + '/child.git#' + refs[0]]], // Backup node_modules with the first commit [fs.rename, parentNodeModulesPath, outdatedNodeModulesPath], // Install & shrinkwrap child package's latest commit - [npm.commands.install, ['git://localhost:1234/child.git#' + refs[1].substr(0, 8)]], + [npm.commands.install, ['git://localhost:' + common.gitPort + '/child.git#' + refs[1].substr(0, 8)]], // Restore node_modules with the first commit [rimraf, parentNodeModulesPath], [fs.rename, outdatedNodeModulesPath, parentNodeModulesPath], @@ -68,15 +68,15 @@ test('shrinkwrapped git dependency got updated', function (t) { t.similar(pkglock, { dependencies: { child: { - version: `git://localhost:1234/child.git#${refs[1]}`, - from: `git://localhost:1234/child.git#${refs[1].substr(0, 8)}` + version: `git://localhost:${common.gitPort}/child.git#${refs[1]}`, + from: `git://localhost:${common.gitPort}/child.git#${refs[1].substr(0, 8)}` } } }, 'version and from fields are correct in git-based pkglock dep') var childPackageJSON = require(path.join(parentNodeModulesPath, 'child', 'package.json')) t.equal( childPackageJSON._resolved, - 'git://localhost:1234/child.git#' + refs[1], + 'git://localhost:' + common.gitPort + '/child.git#' + refs[1], "Child package wasn't updated" ) t.end() @@ -153,7 +153,7 @@ function startGitDaemon (cb) { '--export-all', '--base-path=' + mockPath, // Path to the dir that contains child.git '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: parentPath, diff --git a/deps/npm/test/tap/install-test-cli-without-package-lock.js b/deps/npm/test/tap/install-test-cli-without-package-lock.js index ea3d75feb6af88..468277d74d209f 100644 --- a/deps/npm/test/tap/install-test-cli-without-package-lock.js +++ b/deps/npm/test/tap/install-test-cli-without-package-lock.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-windows-newlines.js b/deps/npm/test/tap/install-windows-newlines.js index 1c69b204ad02be..b56c7645ebf421 100644 --- a/deps/npm/test/tap/install-windows-newlines.js +++ b/deps/npm/test/tap/install-windows-newlines.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-windows-newlines') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/deps/npm/test/tap/install-with-dev-dep-duplicate.js b/deps/npm/test/tap/install-with-dev-dep-duplicate.js index 2d31b8fad7abd8..b3a58987631b4d 100644 --- a/deps/npm/test/tap/install-with-dev-dep-duplicate.js +++ b/deps/npm/test/tap/install-with-dev-dep-duplicate.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'dev-dep-duplicate') +var pkg = common.pkg var json = { author: 'Anders Janmyr', diff --git a/deps/npm/test/tap/invalid-dep-version-filtering.js b/deps/npm/test/tap/invalid-dep-version-filtering.js index 19ab5d209dd5c4..502610f231ce4e 100644 --- a/deps/npm/test/tap/invalid-dep-version-filtering.js +++ b/deps/npm/test/tap/invalid-dep-version-filtering.js @@ -7,7 +7,7 @@ var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = path.join(testdir, 'cache') var fixture = new Tacks(Dir({ diff --git a/deps/npm/test/tap/it.js b/deps/npm/test/tap/it.js index b0dddb8f919deb..9b716139a3814a 100644 --- a/deps/npm/test/tap/it.js +++ b/deps/npm/test/tap/it.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = join(__dirname, 'run-script') +var pkg = common.pkg var installed = join(pkg, 'node_modules', 'underscore', 'package.json') var json = { diff --git a/deps/npm/test/tap/legacy-ignore-nested-nm.js b/deps/npm/test/tap/legacy-ignore-nested-nm.js index 095c41efa146ba..6a57b72b604881 100644 --- a/deps/npm/test/tap/legacy-ignore-nested-nm.js +++ b/deps/npm/test/tap/legacy-ignore-nested-nm.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-ignore-nested-nm') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-ignore-nested-nm') diff --git a/deps/npm/test/tap/legacy-missing-bindir.js b/deps/npm/test/tap/legacy-missing-bindir.js index 2285f8d2a7556d..398ef0e7acc517 100644 --- a/deps/npm/test/tap/legacy-missing-bindir.js +++ b/deps/npm/test/tap/legacy-missing-bindir.js @@ -5,7 +5,7 @@ var test = require('tap').test var common = require('../common-tap.js') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-missing-bindir') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-missing-bindir') diff --git a/deps/npm/test/tap/legacy-no-auth-leak.js b/deps/npm/test/tap/legacy-no-auth-leak.js index f837239250222b..ce1adaeca756a5 100644 --- a/deps/npm/test/tap/legacy-no-auth-leak.js +++ b/deps/npm/test/tap/legacy-no-auth-leak.js @@ -1,8 +1,7 @@ 'use strict' var test = require('tap').test var common = require('../common-tap.js') -var path = require('path') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir diff --git a/deps/npm/test/tap/legacy-platform-all.js b/deps/npm/test/tap/legacy-platform-all.js index 2bfb19a45782bd..01c7be7ec1c861 100644 --- a/deps/npm/test/tap/legacy-platform-all.js +++ b/deps/npm/test/tap/legacy-platform-all.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-platform-all') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') @@ -33,6 +33,7 @@ var fixture = new Tacks( ], cpu: [ 'arm', + 'arm64', 'mips', 'ia32', 'x64', diff --git a/deps/npm/test/tap/legacy-platform.js b/deps/npm/test/tap/legacy-platform.js index 4e94148b213097..619d2e4330c59b 100644 --- a/deps/npm/test/tap/legacy-platform.js +++ b/deps/npm/test/tap/legacy-platform.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-platform') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/deps/npm/test/tap/legacy-private.js b/deps/npm/test/tap/legacy-private.js index 5e7817bf6a13a7..44a1094cd0cc6b 100644 --- a/deps/npm/test/tap/legacy-private.js +++ b/deps/npm/test/tap/legacy-private.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-private') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/deps/npm/test/tap/legacy-test-package.js b/deps/npm/test/tap/legacy-test-package.js index d94666b43e2e4e..3c807e50491c72 100644 --- a/deps/npm/test/tap/legacy-test-package.js +++ b/deps/npm/test/tap/legacy-test-package.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-test-package') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-test-package') diff --git a/deps/npm/test/tap/lifecycle-INIT_CWD.js b/deps/npm/test/tap/lifecycle-INIT_CWD.js index eec5c266eec98d..e035cf86d40337 100644 --- a/deps/npm/test/tap/lifecycle-INIT_CWD.js +++ b/deps/npm/test/tap/lifecycle-INIT_CWD.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'lifecycle-initcwd') +var pkg = common.pkg var subdir = path.resolve(pkg, 'subdir') var json = { diff --git a/deps/npm/test/tap/lifecycle-order.js b/deps/npm/test/tap/lifecycle-order.js index 903e1945d1e915..8f2b2ba4a70b8e 100644 --- a/deps/npm/test/tap/lifecycle-order.js +++ b/deps/npm/test/tap/lifecycle-order.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var json = { name: 'lifecycle-order', diff --git a/deps/npm/test/tap/link.js b/deps/npm/test/tap/link.js index 88f3caed791fc0..f0339194a26265 100644 --- a/deps/npm/test/tap/link.js +++ b/deps/npm/test/tap/link.js @@ -8,11 +8,11 @@ var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var link = path.join(__dirname, 'link') -var linkScoped = path.join(__dirname, 'link-scoped') -var linkInstall = path.join(__dirname, 'link-install') +var link = path.join(common.pkg, 'link') +var linkScoped = path.join(common.pkg, 'link-scoped') +var linkInstall = path.join(common.pkg, 'link-install') var linkInside = path.join(linkInstall, 'node_modules', 'inside') -var linkRoot = path.join(__dirname, 'link-root') +var linkRoot = path.join(common.pkg, 'link-root') var config = 'prefix = ' + linkRoot var configPath = path.join(link, '_npmrc') diff --git a/deps/npm/test/tap/local-args-relative-to-cwd.js b/deps/npm/test/tap/local-args-relative-to-cwd.js index 6c424bf67f123c..de95516e2893ed 100644 --- a/deps/npm/test/tap/local-args-relative-to-cwd.js +++ b/deps/npm/test/tap/local-args-relative-to-cwd.js @@ -6,7 +6,7 @@ var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/deps/npm/test/tap/locker.js b/deps/npm/test/tap/locker.js index 8c548095f7f54a..5ee64196fe9804 100644 --- a/deps/npm/test/tap/locker.js +++ b/deps/npm/test/tap/locker.js @@ -10,7 +10,8 @@ var locker = require('../../lib/utils/locker.js') var lock = locker.lock var unlock = locker.unlock -var pkg = path.join(__dirname, '/locker') +const common = require('../common-tap.js') +var pkg = common.pkg var cache = path.join(pkg, '/cache') var tmp = path.join(pkg, '/tmp') var nm = path.join(pkg, '/node_modules') diff --git a/deps/npm/test/tap/lockfile-http-deps.js b/deps/npm/test/tap/lockfile-http-deps.js index a614daf139d22b..aaa47f5de6d3e3 100644 --- a/deps/npm/test/tap/lockfile-http-deps.js +++ b/deps/npm/test/tap/lockfile-http-deps.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/logout-scoped.js b/deps/npm/test/tap/logout-scoped.js index db993204789f3b..114cc09da73822 100644 --- a/deps/npm/test/tap/logout-scoped.js +++ b/deps/npm/test/tap/logout-scoped.js @@ -8,15 +8,14 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'logout') +var pkg = common.pkg var outfile = path.join(pkg, '_npmrc') var opts = { cwd: pkg } -var contents = function () { /* -foo=boo -@bar:registry=http://localhost:1337 -//localhost:1337/:_authToken=glarb -*/ }.toString().split('\n').slice(1, -1).join('\n') +var contents = `foo=boo +@bar:registry=http://localhost:${common.port} +//localhost:${common.port}/:_authToken=glarb +` function mocks (server) { server.delete('/-/user/token/glarb') diff --git a/deps/npm/test/tap/logout.js b/deps/npm/test/tap/logout.js index d62cb4fffc28be..9218b4bf6f1ca8 100644 --- a/deps/npm/test/tap/logout.js +++ b/deps/npm/test/tap/logout.js @@ -8,14 +8,13 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'logout') +var pkg = common.pkg var outfile = path.join(pkg, '_npmrc') var opts = { cwd: pkg } -var contents = function () { /* -foo=boo -//localhost:1337/:_authToken=glarb -*/ }.toString().split('\n').slice(1, -1).join('\n') +var contents = `foo=boo +//localhost:${common.port}/:_authToken=glarb +` function mocks (server) { server.delete('/-/user/token/glarb') diff --git a/deps/npm/test/tap/ls-depth-cli.js b/deps/npm/test/tap/ls-depth-cli.js index 7fd4a467d612f1..6bb2f3cd124f7f 100644 --- a/deps/npm/test/tap/ls-depth-cli.js +++ b/deps/npm/test/tap/ls-depth-cli.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth-cli') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, @@ -117,7 +117,7 @@ test('npm ls --depth=0 --json', function (t) { 'dependencies': { 'test-package-with-one-dep': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz' + 'resolved': 'http://localhost:' + common.port + '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz' } } }) @@ -141,11 +141,11 @@ test('npm ls --depth=Infinity --json', function (t) { 'dependencies': { 'test-package-with-one-dep': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz', + 'resolved': 'http://localhost:' + common.port + '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz', 'dependencies': { 'test-package': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package/-/test-package-0.0.0.tgz' + 'resolved': 'http://localhost:' + common.port + '/test-package/-/test-package-0.0.0.tgz' } } } diff --git a/deps/npm/test/tap/ls-depth-unmet.js b/deps/npm/test/tap/ls-depth-unmet.js index 4fd6740d6a58cd..7a2ed4dacc2a2e 100644 --- a/deps/npm/test/tap/ls-depth-unmet.js +++ b/deps/npm/test/tap/ls-depth-unmet.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth-unmet') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/ls-env.js b/deps/npm/test/tap/ls-env.js index 29058d9245836f..e3fbece3b04a1b 100644 --- a/deps/npm/test/tap/ls-env.js +++ b/deps/npm/test/tap/ls-env.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/ls-l-depth-0.js b/deps/npm/test/tap/ls-l-depth-0.js index e9c2374aad1d72..8459bd52032cbf 100644 --- a/deps/npm/test/tap/ls-l-depth-0.js +++ b/deps/npm/test/tap/ls-l-depth-0.js @@ -10,7 +10,7 @@ var tmpdir = require('osenv').tmpdir var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'ls-l-depth-0') +var pkg = common.pkg var dep = resolve(pkg, 'deps', 'glock') var modules = resolve(pkg, 'node_modules') diff --git a/deps/npm/test/tap/ls-peer.js b/deps/npm/test/tap/ls-peer.js index 826380932a1470..fd53d37be62ec8 100644 --- a/deps/npm/test/tap/ls-peer.js +++ b/deps/npm/test/tap/ls-peer.js @@ -6,7 +6,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/ls-production-and-dev.js b/deps/npm/test/tap/ls-production-and-dev.js index 5fc0b776e33374..a39e643786f09e 100644 --- a/deps/npm/test/tap/ls-production-and-dev.js +++ b/deps/npm/test/tap/ls-production-and-dev.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/ls-top-errors.js b/deps/npm/test/tap/ls-top-errors.js index 69b8b299c81710..79a466fb127a49 100644 --- a/deps/npm/test/tap/ls-top-errors.js +++ b/deps/npm/test/tap/ls-top-errors.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var pathModA = path.join(pkg, 'node_modules', 'moduleA') var pathModB = path.join(pkg, 'node_modules', 'moduleB') diff --git a/deps/npm/test/tap/ls.js b/deps/npm/test/tap/ls.js index acec723afbae0e..b3bdbc613cbc8d 100644 --- a/deps/npm/test/tap/ls.js +++ b/deps/npm/test/tap/ls.js @@ -3,7 +3,7 @@ var test = require('tap').test var path = require('path') var rimraf = require('rimraf') var common = require('../common-tap.js') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-files') var pkgpath = path.resolve(fixturepath, 'npm-test-ls') var Tacks = require('tacks') diff --git a/deps/npm/test/tap/nested-extraneous.js b/deps/npm/test/tap/nested-extraneous.js index 99d4bea5b9b1c5..1764a41c752790 100644 --- a/deps/npm/test/tap/nested-extraneous.js +++ b/deps/npm/test/tap/nested-extraneous.js @@ -5,7 +5,7 @@ var fs = require('fs') var rimraf = require('rimraf') var path = require('path') -var pkg = path.resolve(__dirname, 'nested-extraneous') +var pkg = common.pkg var pj = { name: 'nested-extraneous', version: '1.2.3' diff --git a/deps/npm/test/tap/no-global-warns.js b/deps/npm/test/tap/no-global-warns.js index 304cf5bf543882..538ab8b359daf9 100644 --- a/deps/npm/test/tap/no-global-warns.js +++ b/deps/npm/test/tap/no-global-warns.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var mockGlobal = path.join(base, 'global') var toInstall = path.join(base, 'to-install') diff --git a/deps/npm/test/tap/no-scan-full-global-dir.js b/deps/npm/test/tap/no-scan-full-global-dir.js index 6a9349d54d9629..7856ff33f41f2d 100644 --- a/deps/npm/test/tap/no-scan-full-global-dir.js +++ b/deps/npm/test/tap/no-scan-full-global-dir.js @@ -6,12 +6,17 @@ var requireInject = require('require-inject') var osenv = require('osenv') var npm = require('../../lib/npm.js') +// XXX update this when rpt's realpath.js is extracted out +var rptRealpath = require.resolve('read-package-tree/realpath.js') + +const common = require('../common-tap.js') +const pkg = common.pkg var packages = { - test: {package: {name: 'test'}, path: __dirname, children: ['abc', 'def', 'ghi', 'jkl']}, - abc: {package: {name: 'abc'}, path: path.join(__dirname, 'node_modules', 'abc')}, - def: {package: {name: 'def'}, path: path.join(__dirname, 'node_modules', 'def')}, - ghi: {package: {name: 'ghi'}, path: path.join(__dirname, 'node_modules', 'ghi')}, - jkl: {package: {name: 'jkl'}, path: path.join(__dirname, 'node_modules', 'jkl')} + test: {package: {name: 'test'}, path: pkg, children: ['abc', 'def', 'ghi', 'jkl']}, + abc: {package: {name: 'abc'}, path: path.join(pkg, 'node_modules', 'abc')}, + def: {package: {name: 'def'}, path: path.join(pkg, 'node_modules', 'def')}, + ghi: {package: {name: 'ghi'}, path: path.join(pkg, 'node_modules', 'ghi')}, + jkl: {package: {name: 'jkl'}, path: path.join(pkg, 'node_modules', 'jkl')} } var dirs = {} var files = {} @@ -39,6 +44,8 @@ mockFs.realpath = function (dir, cb) { return cb(null, dir) } +const mockRptRealpath = path => Promise.resolve(path) + test('setup', function (t) { npm.load(function () { t.pass('npm loaded') @@ -52,7 +59,8 @@ test('installer', function (t) { 'fs': mockFs, 'readdir-scoped-modules': mockReaddir, 'read-package-json': mockReadPackageJson, - 'mkdirp': function (path, cb) { cb() } + 'mkdirp': function (path, cb) { cb() }, + [rptRealpath]: mockRptRealpath }) var Installer = installer.Installer @@ -67,7 +75,7 @@ test('installer', function (t) { } } - var inst = new TestInstaller(__dirname, false, ['def', 'abc']) + var inst = new TestInstaller(pkg, false, ['def', 'abc']) inst.loadCurrentTree(function () { var kids = inst.currentTree.children.map(function (child) { return child.package.name }) t.isDeeply(kids, ['abc', 'def']) @@ -81,7 +89,8 @@ test('uninstaller', function (t) { 'fs': mockFs, 'readdir-scoped-modules': mockReaddir, 'read-package-json': mockReadPackageJson, - 'mkdirp': function (path, cb) { cb() } + 'mkdirp': function (path, cb) { cb() }, + [rptRealpath]: mockRptRealpath }) var Uninstaller = uninstaller.Uninstaller @@ -92,7 +101,7 @@ test('uninstaller', function (t) { } } - var uninst = new TestUninstaller(__dirname, false, ['ghi', 'jkl']) + var uninst = new TestUninstaller(pkg, false, ['ghi', 'jkl']) uninst.loadCurrentTree(function () { var kids = uninst.currentTree.children.map(function (child) { return child.package.name }) t.isDeeply(kids, ['ghi', 'jkl']) diff --git a/deps/npm/test/tap/noargs-install-config-save.js b/deps/npm/test/tap/noargs-install-config-save.js index 12ccf86804b377..cb1af408abb5c6 100644 --- a/deps/npm/test/tap/noargs-install-config-save.js +++ b/deps/npm/test/tap/noargs-install-config-save.js @@ -1,14 +1,12 @@ var common = require('../common-tap.js') var test = require('tap').test -var path = require('path') var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var mr = require('npm-registry-mock') -var pkg = path.resolve(process.env.npm_config_tmp || '/tmp', - 'noargs-install-config-save') +var pkg = common.pkg function writePackageJson () { rimraf.sync(pkg) @@ -73,6 +71,6 @@ test('updates the package.json (adds dependencies) with an argument', function ( }) test('cleanup', function (t) { - rimraf.sync(pkg + '/cache') + rimraf.sync(pkg) t.end() }) diff --git a/deps/npm/test/tap/node-modules-path-munge.js b/deps/npm/test/tap/node-modules-path-munge.js index fdca0393cc1d10..fb116806c8cbc9 100644 --- a/deps/npm/test/tap/node-modules-path-munge.js +++ b/deps/npm/test/tap/node-modules-path-munge.js @@ -4,7 +4,7 @@ var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var path = require('path') -var dir = path.join(__dirname, 'my_node_modules') +var dir = path.join(common.pkg, 'my_node_modules') var script = process.platform === 'win32' ? 'echo %PATH%' : 'echo $PATH' t.test('setup', function (t) { diff --git a/deps/npm/test/tap/npm-api-not-loaded-error.js b/deps/npm/test/tap/npm-api-not-loaded-error.js index 48b71e5213a7c8..8bf263503874e8 100644 --- a/deps/npm/test/tap/npm-api-not-loaded-error.js +++ b/deps/npm/test/tap/npm-api-not-loaded-error.js @@ -1,8 +1,9 @@ var test = require('tap').test +const common = require('../common-tap.js') var npm = require('../..') var path = require('path') var rimraf = require('rimraf') -var npmrc = path.join(__dirname, 'npmrc') +var npmrc = path.join(common.pkg, 'npmrc') var fs = require('fs') test('setup', function (t) { diff --git a/deps/npm/test/tap/onload.js b/deps/npm/test/tap/onload.js index 8d2b6c743bab8e..4750fa6f88c2a8 100644 --- a/deps/npm/test/tap/onload.js +++ b/deps/npm/test/tap/onload.js @@ -2,13 +2,13 @@ var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var common = require('../common-tap.js') -var opts = { cwd: __dirname } +var opts = { cwd: common.pkg } var binDir = '../../node_modules/.bin' var fixture = path.resolve(__dirname, binDir) var onload = path.resolve(__dirname, '../fixtures/onload.js') test('setup', function (t) { - rimraf.sync(path.join(__dirname, 'node_modules')) + rimraf.sync(path.join(common.pkg, 'node_modules')) t.end() }) diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision.js b/deps/npm/test/tap/optional-metadep-rollback-collision.js index 1c05d1ba5860e6..51cc6367dded7c 100644 --- a/deps/npm/test/tap/optional-metadep-rollback-collision.js +++ b/deps/npm/test/tap/optional-metadep-rollback-collision.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'optional-metadep-rollback-collision') +var pkg = common.pkg var deps = path.resolve(pkg, 'deps') var opdep = path.resolve(pkg, 'node_modules', 'opdep') var cache = path.resolve(pkg, 'cache') diff --git a/deps/npm/test/tap/outdated-color.js b/deps/npm/test/tap/outdated-color.js index 3a81d05a821b4f..11c967650f3b04 100644 --- a/deps/npm/test/tap/outdated-color.js +++ b/deps/npm/test/tap/outdated-color.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'outdated-color') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/outdated-depth.js b/deps/npm/test/tap/outdated-depth.js index 91523405e89adb..5cf7c7edac9c4b 100644 --- a/deps/npm/test/tap/outdated-depth.js +++ b/deps/npm/test/tap/outdated-depth.js @@ -10,7 +10,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'outdated-depth') +var pkg = common.pkg var json = { name: 'outdated-depth', diff --git a/deps/npm/test/tap/outdated-git.js b/deps/npm/test/tap/outdated-git.js index 2a595e5288934c..3932330c99f34d 100644 --- a/deps/npm/test/tap/outdated-git.js +++ b/deps/npm/test/tap/outdated-git.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var npm = require('../../') // config -var pkg = path.resolve(__dirname, 'outdated-git') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { name: 'outdated-git', diff --git a/deps/npm/test/tap/outdated-json.js b/deps/npm/test/tap/outdated-json.js index 39d54fb196c5bd..77db52cc725211 100644 --- a/deps/npm/test/tap/outdated-json.js +++ b/deps/npm/test/tap/outdated-json.js @@ -1,16 +1,13 @@ var fs = require('graceful-fs') var path = require('path') -var mkdirp = require('mkdirp') var mr = require('npm-registry-mock') -var osenv = require('osenv') -var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'outdated-json') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } @@ -42,8 +39,6 @@ var expected = { } test('setup', function (t) { - cleanup() - mkdirp.sync(pkg) fs.writeFileSync( path.join(pkg, 'package.json'), JSON.stringify(json, null, 2) @@ -92,14 +87,37 @@ test('it should log json data', function (t) { ) }) +test('it should log json data even when the list is empty', function (t) { + common.npm( + [ + 'rm', + 'request', + 'underscore' + ], + EXEC_OPTS, + function (er, code, stdout) { + t.ifError(er, 'run without error') + t.is(code, 0, 'successful exit status') + common.npm( + [ + '--registry', common.registry, + '--silent', + '--json', + 'outdated' + ], + EXEC_OPTS, + function (er, code, stdout) { + t.ifError(er, 'run without error') + t.is(code, 0, 'successful exit status') + t.same(JSON.parse(stdout), {}, 'got an empty object printed') + t.end() + } + ) + } + ) +}) + test('cleanup', function (t) { server.close() - cleanup() t.end() }) - -function cleanup () { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/outdated-latest.js b/deps/npm/test/tap/outdated-latest.js index d72fd87176f16a..e0b432a2105cd7 100644 --- a/deps/npm/test/tap/outdated-latest.js +++ b/deps/npm/test/tap/outdated-latest.js @@ -7,7 +7,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/outdated-long.js b/deps/npm/test/tap/outdated-long.js index 976d416a13bb51..474df8031a50a8 100644 --- a/deps/npm/test/tap/outdated-long.js +++ b/deps/npm/test/tap/outdated-long.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var npm = require('../../') // config -var pkg = path.resolve(__dirname, 'outdated-long') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/deps/npm/test/tap/outdated-remote.js b/deps/npm/test/tap/outdated-remote.js new file mode 100644 index 00000000000000..b3990a382caa2e --- /dev/null +++ b/deps/npm/test/tap/outdated-remote.js @@ -0,0 +1,95 @@ +'use strict' +const path = require('path') +const test = require('tap').test +const Tacks = require('tacks') +const File = Tacks.File +const Dir = Tacks.Dir +const common = require('../common-tap.js') + +const basedir = common.pkg +const testdir = path.join(basedir, 'testdir') +const cachedir = path.join(basedir, 'cache') +const globaldir = path.join(basedir, 'global') +const tmpdir = path.join(basedir, 'tmp') + +const conf = { + cwd: testdir, + env: common.newEnv().extend({ + npm_config_cache: cachedir, + npm_config_tmp: tmpdir, + npm_config_prefix: globaldir, + npm_config_registry: common.registry, + npm_config_loglevel: 'warn' + }) +} + +const fixture = new Tacks(Dir({ + cache: Dir(), + global: Dir(), + tmp: Dir(), + testdir: Dir({ + node_modules: Dir({ + 'foo-http': Dir({ + 'package.json': File({ + name: 'foo-http', + version: '1.0.0' + }) + }), + 'foo-https': Dir({ + 'package.json': File({ + name: 'foo-https', + version: '1.0.0' + }) + }) + }), + 'package.json': File({ + name: 'outdated-remote', + version: '1.0.0', + dependencies: { + 'foo-http': 'http://example.com/foo.tar.gz', + 'foo-https': 'https://example.com/foo.tar.gz' + } + }) + }) +})) + +function setup () { + cleanup() + fixture.create(basedir) +} + +function cleanup () { + fixture.remove(basedir) +} + +test('setup', t => { + setup() + return common.fakeRegistry.listen() +}) + +test('discovers new versions in outdated', t => { + return common.npm(['outdated', '--json'], conf).then(([code, stdout, stderr]) => { + t.is(code, 1, 'npm outdated completed successfully') + t.comment(stdout.trim()) + t.comment(stderr.trim()) + const data = JSON.parse(stdout) + t.same(data['foo-http'], { + current: '1.0.0', + wanted: 'remote', + latest: 'remote', + location: '' + }) + t.same(data['foo-https'], { + current: '1.0.0', + wanted: 'remote', + latest: 'remote', + location: '' + }) + }) +}) + +test('cleanup', t => { + common.fakeRegistry.close() + cleanup() + t.done() +}) diff --git a/deps/npm/test/tap/outdated-symlink.js b/deps/npm/test/tap/outdated-symlink.js index 96d6f660e21008..86128338a7be7e 100644 --- a/deps/npm/test/tap/outdated-symlink.js +++ b/deps/npm/test/tap/outdated-symlink.js @@ -8,7 +8,7 @@ const Symlink = Tacks.Symlink const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/outdated.js b/deps/npm/test/tap/outdated.js index 8b1907d95f942a..1acb0ed687b5ae 100644 --- a/deps/npm/test/tap/outdated.js +++ b/deps/npm/test/tap/outdated.js @@ -10,7 +10,7 @@ var npm = require('../../') var common = require('../common-tap.js') // config -var pkg = path.resolve(__dirname, 'outdated') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var originalLog diff --git a/deps/npm/test/tap/override-bundled.js b/deps/npm/test/tap/override-bundled.js index 493ebf4a5d7e55..7f87c0999fe063 100644 --- a/deps/npm/test/tap/override-bundled.js +++ b/deps/npm/test/tap/override-bundled.js @@ -8,7 +8,7 @@ var path = require('path') var common = require('../common-tap.js') var testname = path.basename(__filename, '.js') -var testdir = path.resolve(__dirname, testname) +var testdir = common.pkg var testmod = path.resolve(testdir, 'top-test') var testtgz = testmod + '-1.0.0.tgz' diff --git a/deps/npm/test/tap/owner.js b/deps/npm/test/tap/owner.js index 0be88284d97504..b4da383ee10231 100644 --- a/deps/npm/test/tap/owner.js +++ b/deps/npm/test/tap/owner.js @@ -5,7 +5,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var cachedir = path.join(basedir, 'cache') var server diff --git a/deps/npm/test/tap/pack-files-and-ignores.js b/deps/npm/test/tap/pack-files-and-ignores.js index 3bcb22c7fcbc9d..4d9b97a32ad253 100644 --- a/deps/npm/test/tap/pack-files-and-ignores.js +++ b/deps/npm/test/tap/pack-files-and-ignores.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var fs = require('graceful-fs') var tar = require('tar') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-files') var targetpath = path.resolve(basepath, 'target') var Tacks = require('tacks') @@ -484,7 +484,7 @@ test('default-ignored files can be explicitly included', function (t) { }) ) withFixture(t, fixture, function (done) { - t.ok(fileExists('.git'), '.git included') + t.notOk(fileExists('.git'), '.git should never be included') t.ok(fileExists('.svn'), '.svn included') t.ok(fileExists('CVS'), 'CVS included') t.ok(fileExists('.hg'), '.hg included') diff --git a/deps/npm/test/tap/pack-scoped.js b/deps/npm/test/tap/pack-scoped.js index 05b9d12a833192..29d9aab478b8f7 100644 --- a/deps/npm/test/tap/pack-scoped.js +++ b/deps/npm/test/tap/pack-scoped.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'scoped_package') +var pkg = common.pkg var manifest = join(pkg, 'package.json') var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/deps/npm/test/tap/pack.js b/deps/npm/test/tap/pack.js index 1813f47bf46a57..7aa42d48370a99 100644 --- a/deps/npm/test/tap/pack.js +++ b/deps/npm/test/tap/pack.js @@ -12,7 +12,7 @@ const Tacks = require('tacks') const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, 'pkg') +const testDir = common.pkg const tmp = path.join(testDir, 'tmp') const cache = path.join(testDir, 'cache') diff --git a/deps/npm/test/tap/peer-deps.js b/deps/npm/test/tap/peer-deps.js index b516818da1f398..20cbf5d1ded042 100644 --- a/deps/npm/test/tap/peer-deps.js +++ b/deps/npm/test/tap/peer-deps.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'peer-deps') +var pkg = common.pkg var expected = [ 'peer dep missing: request@0.9.x, required by npm-test-peer-deps@0.0.0' ] diff --git a/deps/npm/test/tap/ping.js b/deps/npm/test/tap/ping.js index 3562f25a3be97a..3687b05bd4518c 100644 --- a/deps/npm/test/tap/ping.js +++ b/deps/npm/test/tap/ping.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'ping') +var pkg = common.pkg var opts = { cwd: pkg } var outfile = path.join(pkg, '_npmrc') diff --git a/deps/npm/test/tap/prepare.js b/deps/npm/test/tap/prepare.js index f179c5267275af..54edf7cb19bc81 100644 --- a/deps/npm/test/tap/prepare.js +++ b/deps/npm/test/tap/prepare.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'prepare_package') +var pkg = common.pkg var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/deps/npm/test/tap/prepublish-only.js b/deps/npm/test/tap/prepublish-only.js index 0d2d31589d7b51..9996479da442a0 100644 --- a/deps/npm/test/tap/prepublish-only.js +++ b/deps/npm/test/tap/prepublish-only.js @@ -10,7 +10,7 @@ var path = require('path') var common = require('../common-tap') -var pkg = join(__dirname, 'prepublish_package') +var pkg = common.pkg var cachedir = join(pkg, 'cache') var tmpdir = join(pkg, 'tmp') diff --git a/deps/npm/test/tap/prepublish.js b/deps/npm/test/tap/prepublish.js index c71455a2480cca..5628f94db38842 100644 --- a/deps/npm/test/tap/prepublish.js +++ b/deps/npm/test/tap/prepublish.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'prepublish_package') +var pkg = common.pkg var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/deps/npm/test/tap/progress-config.js b/deps/npm/test/tap/progress-config.js index 94d9b15f1b3896..1f1e1a0c225ed5 100644 --- a/deps/npm/test/tap/progress-config.js +++ b/deps/npm/test/tap/progress-config.js @@ -1,9 +1,9 @@ 'use strict' -var path = require('path') var test = require('tap').test var log = require('npmlog') var fs = require('graceful-fs') -var configName = path.join(__dirname, path.basename(__filename, '.js')) + '-npmrc' +const common = require('../common-tap.js') +var configName = common.pkg + '-npmrc' // We use requireInject to get a fresh copy of // the npm singleton each time we require it. diff --git a/deps/npm/test/tap/prune-dev-dep-cycle.js b/deps/npm/test/tap/prune-dev-dep-cycle.js index 5ccabdc1c95f0a..e226ac6d32f682 100644 --- a/deps/npm/test/tap/prune-dev-dep-cycle.js +++ b/deps/npm/test/tap/prune-dev-dep-cycle.js @@ -1,12 +1,11 @@ 'use strict' var fs = require('fs') -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/deps/npm/test/tap/prune-dev-dep-with-bins.js b/deps/npm/test/tap/prune-dev-dep-with-bins.js index 686b5d8d6da4cd..a75652f9a177c6 100644 --- a/deps/npm/test/tap/prune-dev-dep-with-bins.js +++ b/deps/npm/test/tap/prune-dev-dep-with-bins.js @@ -1,12 +1,11 @@ 'use strict' var fs = require('fs') -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/deps/npm/test/tap/prune-with-dev-dep-duplicate.js b/deps/npm/test/tap/prune-with-dev-dep-duplicate.js index bfe902b1d3c5b2..7efea5c01e6190 100644 --- a/deps/npm/test/tap/prune-with-dev-dep-duplicate.js +++ b/deps/npm/test/tap/prune-with-dev-dep-duplicate.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'prune') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/deps/npm/test/tap/prune-with-only-dev-deps.js b/deps/npm/test/tap/prune-with-only-dev-deps.js index dce9497e517ff8..c8e87a53569a9d 100644 --- a/deps/npm/test/tap/prune-with-only-dev-deps.js +++ b/deps/npm/test/tap/prune-with-only-dev-deps.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'prune') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/deps/npm/test/tap/prune.js b/deps/npm/test/tap/prune.js index 4fe586359e054d..6e033ceae00f24 100644 --- a/deps/npm/test/tap/prune.js +++ b/deps/npm/test/tap/prune.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/deps/npm/test/tap/publish-access-scoped.js b/deps/npm/test/tap/publish-access-scoped.js index 17339cedfda338..31b1bed26c8300 100644 --- a/deps/npm/test/tap/publish-access-scoped.js +++ b/deps/npm/test/tap/publish-access-scoped.js @@ -8,7 +8,7 @@ var mr = require('npm-registry-mock') var common = require('../common-tap') var server -var pkg = path.join(__dirname, 'publish-access') +var pkg = common.pkg test('setup', function (t) { mr({port: common.port, throwOnUnmatched: true}, function (err, s) { diff --git a/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js b/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js index 660d0f48d7d5a5..f615fa60f2450c 100644 --- a/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js +++ b/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js @@ -6,7 +6,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'publish-access-unscoped') +var pkg = common.pkg test('setup', function (t) { mkdirp.sync(pkg) diff --git a/deps/npm/test/tap/publish-access-unscoped.js b/deps/npm/test/tap/publish-access-unscoped.js index 1766f61f4f93d5..a2489e2bcaf4b2 100644 --- a/deps/npm/test/tap/publish-access-unscoped.js +++ b/deps/npm/test/tap/publish-access-unscoped.js @@ -8,7 +8,7 @@ var mr = require('npm-registry-mock') var common = require('../common-tap') var server -var pkg = path.join(__dirname, 'publish-access-unscoped') +var pkg = common.pkg test('setup', function (t) { mr({port: common.port, throwOnUnmatched: true}, function (err, s) { diff --git a/deps/npm/test/tap/publish-config.js b/deps/npm/test/tap/publish-config.js index 14fd40311a7c03..705ef7ae7a2ca1 100644 --- a/deps/npm/test/tap/publish-config.js +++ b/deps/npm/test/tap/publish-config.js @@ -17,9 +17,9 @@ fs.writeFileSync(pkg + '/package.json', JSON.stringify({ }), 'utf8') fs.writeFileSync(pkg + '/fixture_npmrc', - '//localhost:1337/:email = fancy@feast.net\n' + - '//localhost:1337/:username = fancy\n' + - '//localhost:1337/:_password = ' + Buffer.from('feast').toString('base64')) + '//localhost:' + common.port + '/:email = fancy@feast.net\n' + + '//localhost:' + common.port + '/:username = fancy\n' + + '//localhost:' + common.port + '/:_password = ' + Buffer.from('feast').toString('base64')) test(function (t) { let child diff --git a/deps/npm/test/tap/publish-invalid-semver-tag.js b/deps/npm/test/tap/publish-invalid-semver-tag.js index 21543869a5ca66..400030908b21cf 100644 --- a/deps/npm/test/tap/publish-invalid-semver-tag.js +++ b/deps/npm/test/tap/publish-invalid-semver-tag.js @@ -9,7 +9,7 @@ var mr = require('npm-registry-mock') var osenv = require('osenv') -var PKG_DIR = path.resolve(__dirname, 'publish-invalid-semver-tag') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var DEFAULT_PKG = { diff --git a/deps/npm/test/tap/publish-scoped.js b/deps/npm/test/tap/publish-scoped.js index b8fe0ae2f69027..efa86c85391d07 100644 --- a/deps/npm/test/tap/publish-scoped.js +++ b/deps/npm/test/tap/publish-scoped.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') var mr = require('npm-registry-mock') -var pkg = path.join(__dirname, 'prepublish_package') +var pkg = common.pkg var server @@ -42,9 +42,9 @@ test('npm publish should honor scoping', function (t) { 'progress=false', 'cache=' + path.join(pkg, 'cache'), 'registry=http://nonexistent.lvh.me', - '//localhost:1337/:username=username', - '//localhost:1337/:_password=' + Buffer.from('password').toString('base64'), - '//localhost:1337/:email=' + 'ogd@aoaioxxysz.net', + '//localhost:' + common.port + '/:username=username', + '//localhost:' + common.port + '/:_password=' + Buffer.from('password').toString('base64'), + '//localhost:' + common.port + '/:email=' + 'ogd@aoaioxxysz.net', '@bigco:registry=' + common.registry ] var configFile = path.join(pkg, '.npmrc') diff --git a/deps/npm/test/tap/publish.js b/deps/npm/test/tap/publish.js index 765cfb07c6c82e..c5070444336903 100644 --- a/deps/npm/test/tap/publish.js +++ b/deps/npm/test/tap/publish.js @@ -10,7 +10,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const testDir = path.join(__dirname, 'publish_test_package') +const testDir = common.pkg function setup () { cleanup() @@ -125,8 +125,8 @@ test('npm publish --json', (t) => { name: 'publish-organized', version: '1.2.5', files: [ - {path: 'package.json'}, - {path: 'index.js'} + {path: 'index.js'}, + {path: 'package.json'} ], entryCount: 2 }, 'JSON output reflects package contents') @@ -154,8 +154,8 @@ test('npm publish --dry-run --json', (t) => { name: 'publish-organized', version: '1.2.5', files: [ - {path: 'package.json'}, - {path: 'index.js'} + {path: 'index.js'}, + {path: 'package.json'} ], entryCount: 2 }, 'JSON output reflects package contents') diff --git a/deps/npm/test/tap/repo.js b/deps/npm/test/tap/repo.js index 54907f620c77e8..0ee50af192cb19 100644 --- a/deps/npm/test/tap/repo.js +++ b/deps/npm/test/tap/repo.js @@ -5,16 +5,17 @@ var test = require('tap').test var rimraf = require('rimraf') var fs = require('fs') var path = require('path') -var fakeBrowser = path.join(__dirname, '_script.sh') -var outFile = path.join(__dirname, '/_output') - -var opts = { cwd: __dirname } +var fakeBrowser = path.join(common.pkg, '_script.sh') +var outFile = path.join(common.pkg, '_output') +var opts = { cwd: common.pkg } +var mkdirp = require('mkdirp') common.pendIfWindows('This is trickier to convert without opening new shells') test('setup', function (t) { + mkdirp.sync(common.pkg) var s = '#!/usr/bin/env bash\n' + - 'echo "$@" > ' + JSON.stringify(__dirname) + '/_output\n' + 'echo "$@" > ' + JSON.stringify(common.pkg) + '/_output\n' fs.writeFileSync(fakeBrowser, s, 'ascii') fs.chmodSync(fakeBrowser, '0755') t.pass('made script') diff --git a/deps/npm/test/tap/retry-on-stale-cache.js b/deps/npm/test/tap/retry-on-stale-cache.js index 8aec35ed4f44da..129c52c160d0e2 100644 --- a/deps/npm/test/tap/retry-on-stale-cache.js +++ b/deps/npm/test/tap/retry-on-stale-cache.js @@ -7,7 +7,7 @@ var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File -var workdir = path.join(__dirname, path.basename(__filename, '.js')) +var workdir = common.pkg var cachedir = path.join(workdir, 'cache') var modulesdir = path.join(workdir, 'modules') var oldModule = path.join(modulesdir, 'good-night-0.1.0.tgz') diff --git a/deps/npm/test/tap/run-script-filter-private.js b/deps/npm/test/tap/run-script-filter-private.js index 631759c13a7336..31f1912fd103a0 100644 --- a/deps/npm/test/tap/run-script-filter-private.js +++ b/deps/npm/test/tap/run-script-filter-private.js @@ -7,7 +7,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'run-script-filter-private') +var pkg = common.pkg var opts = { cwd: pkg } diff --git a/deps/npm/test/tap/run-script.js b/deps/npm/test/tap/run-script.js index f50a9632851a07..a937abadf2c1aa 100644 --- a/deps/npm/test/tap/run-script.js +++ b/deps/npm/test/tap/run-script.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'run-script') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var tmp = path.resolve(pkg, 'tmp') diff --git a/deps/npm/test/tap/save-optional.js b/deps/npm/test/tap/save-optional.js index 66e430dc78b719..c293401f527cb6 100644 --- a/deps/npm/test/tap/save-optional.js +++ b/deps/npm/test/tap/save-optional.js @@ -8,7 +8,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/scope-header.js b/deps/npm/test/tap/scope-header.js index 3eb70f132e669b..f291b3a5009647 100644 --- a/deps/npm/test/tap/scope-header.js +++ b/deps/npm/test/tap/scope-header.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var withScope = path.join(testdir, 'with-scope') var withoutScope = path.join(testdir, 'without-scope') diff --git a/deps/npm/test/tap/scripts-whitespace-windows.js b/deps/npm/test/tap/scripts-whitespace-windows.js index 4d1e53a8f5a5dd..9378564bb52bca 100644 --- a/deps/npm/test/tap/scripts-whitespace-windows.js +++ b/deps/npm/test/tap/scripts-whitespace-windows.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'scripts-whitespace-windows') +var pkg = common.pkg var tmp = path.resolve(pkg, 'tmp') var cache = path.resolve(pkg, 'cache') var dep = path.resolve(pkg, 'dep') diff --git a/deps/npm/test/tap/search.all-package-search.js b/deps/npm/test/tap/search.all-package-search.js index 51c1ffcf90157b..419e4fdeed691a 100644 --- a/deps/npm/test/tap/search.all-package-search.js +++ b/deps/npm/test/tap/search.all-package-search.js @@ -14,7 +14,7 @@ const {File} = Tacks const common = require('../common-tap.js') -const PKG_DIR = path.resolve(__dirname, 'search') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') const cachePath = path.join(cacheBase, '.cache.json') diff --git a/deps/npm/test/tap/search.js b/deps/npm/test/tap/search.js index bbd293c3a1a3fc..70d17e5469d47b 100644 --- a/deps/npm/test/tap/search.js +++ b/deps/npm/test/tap/search.js @@ -14,7 +14,7 @@ const File = Tacks.File const common = require('../common-tap.js') -const PKG_DIR = path.resolve(__dirname, 'search') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') const cachePath = path.join(cacheBase, '.cache.json') diff --git a/deps/npm/test/tap/shared-linked.js b/deps/npm/test/tap/shared-linked.js index 3ee00e063d4c86..bb2d9bd459aa3e 100644 --- a/deps/npm/test/tap/shared-linked.js +++ b/deps/npm/test/tap/shared-linked.js @@ -8,7 +8,7 @@ var Dir = Tacks.Dir var common = require('../common-tap.js') var mr = require('npm-registry-mock') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var bugdir = path.join(testdir, 'modules', 'bug') // This is an absolutely minimal version of the optimist included with diff --git a/deps/npm/test/tap/shrinkwrap-_auth.js b/deps/npm/test/tap/shrinkwrap-_auth.js index 5aff86fb08f80f..156bd9667cb83f 100644 --- a/deps/npm/test/tap/shrinkwrap-_auth.js +++ b/deps/npm/test/tap/shrinkwrap-_auth.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') diff --git a/deps/npm/test/tap/shrinkwrap-default-dev.js b/deps/npm/test/tap/shrinkwrap-default-dev.js index 48f9f2a90af90f..9ff998fa4846f0 100644 --- a/deps/npm/test/tap/shrinkwrap-default-dev.js +++ b/deps/npm/test/tap/shrinkwrap-default-dev.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/shrinkwrap-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-dev-dependency.js index 79d3b7cd0fe460..8006aa9ea8a81d 100644 --- a/deps/npm/test/tap/shrinkwrap-dev-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-dev-dependency.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-dev-dependency') +var pkg = common.pkg var opts = [ '--cache', path.resolve(pkg, 'cache'), diff --git a/deps/npm/test/tap/shrinkwrap-empty-deps.js b/deps/npm/test/tap/shrinkwrap-empty-deps.js index eeb5e656ef20c3..af9b4810afaf61 100644 --- a/deps/npm/test/tap/shrinkwrap-empty-deps.js +++ b/deps/npm/test/tap/shrinkwrap-empty-deps.js @@ -9,7 +9,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const pkg = path.resolve(__dirname, 'shrinkwrap-empty-deps') +const pkg = common.pkg const EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/shrinkwrap-extra-metadata.js b/deps/npm/test/tap/shrinkwrap-extra-metadata.js index dd7f85ee827ed6..a5ff721a7a8160 100644 --- a/deps/npm/test/tap/shrinkwrap-extra-metadata.js +++ b/deps/npm/test/tap/shrinkwrap-extra-metadata.js @@ -10,7 +10,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const pkg = path.join(__dirname, path.basename(__filename, '.js')) +const pkg = common.pkg const json = { author: 'Rockbert', diff --git a/deps/npm/test/tap/shrinkwrap-global-auth.js b/deps/npm/test/tap/shrinkwrap-global-auth.js index 76fa0a4662bf5e..e860abd2fe1a85 100644 --- a/deps/npm/test/tap/shrinkwrap-global-auth.js +++ b/deps/npm/test/tap/shrinkwrap-global-auth.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') diff --git a/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js b/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js index bc9ab9cf11d5b8..203c2165ebe600 100644 --- a/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js +++ b/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/shrinkwrap-lifecycle.js b/deps/npm/test/tap/shrinkwrap-lifecycle.js index 8c0f36e3bb84f8..5ed35e186843b2 100644 --- a/deps/npm/test/tap/shrinkwrap-lifecycle.js +++ b/deps/npm/test/tap/shrinkwrap-lifecycle.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-lifecycle') +var pkg = common.pkg test('npm shrinkwrap execution order', function (t) { setup() diff --git a/deps/npm/test/tap/shrinkwrap-local-dependency.js b/deps/npm/test/tap/shrinkwrap-local-dependency.js index d1c33b99a5a0b1..d737b10bb6b978 100644 --- a/deps/npm/test/tap/shrinkwrap-local-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-local-dependency.js @@ -8,7 +8,7 @@ var unixFormatPath = require('../../lib/utils/unix-format-path.js') var File = Tacks.File var Dir = Tacks.Dir -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = path.resolve(testdir, 'cache') var config = ['--cache=' + cachedir, '--loglevel=error'] diff --git a/deps/npm/test/tap/shrinkwrap-nested.js b/deps/npm/test/tap/shrinkwrap-nested.js index 44d0cb0b2fb34c..bace44d01aa422 100644 --- a/deps/npm/test/tap/shrinkwrap-nested.js +++ b/deps/npm/test/tap/shrinkwrap-nested.js @@ -8,7 +8,7 @@ var fs = require('fs') var path = require('path') var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var modAtgz = path.resolve(testdir, 'modA') + '-1.0.0.tgz' var modB1tgz = path.resolve(testdir, 'modB') + '-1.0.0.tgz' var modB2tgz = path.resolve(testdir, 'modB') + '-2.0.0.tgz' diff --git a/deps/npm/test/tap/shrinkwrap-optional-dependency.js b/deps/npm/test/tap/shrinkwrap-optional-dependency.js index 5085dd0cbb49c8..f2c853ac4b9a70 100644 --- a/deps/npm/test/tap/shrinkwrap-optional-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-optional-dependency.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'shrinkwrap-optional-dependency') +var pkg = common.pkg test('shrinkwrap does not fail on missing optional dependency', function (t) { t.plan(1) diff --git a/deps/npm/test/tap/shrinkwrap-optional-platform.js b/deps/npm/test/tap/shrinkwrap-optional-platform.js index b109d89578150d..d6a3c41b516f15 100644 --- a/deps/npm/test/tap/shrinkwrap-optional-platform.js +++ b/deps/npm/test/tap/shrinkwrap-optional-platform.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/shrinkwrap-optional-property.js b/deps/npm/test/tap/shrinkwrap-optional-property.js index ccff5a93e2e386..84bc5cb258281f 100644 --- a/deps/npm/test/tap/shrinkwrap-optional-property.js +++ b/deps/npm/test/tap/shrinkwrap-optional-property.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'shrinkwrap-optional-dependency') +var pkg = common.pkg test('shrinkwrap adds optional property when optional dependency', function (t) { t.plan(1) @@ -58,7 +58,7 @@ var desired = { }, 'underscore': { version: '1.3.3', - resolved: 'http://localhost:1337/underscore/-/underscore-1.3.3.tgz', + resolved: 'http://localhost:' + common.port + '/underscore/-/underscore-1.3.3.tgz', optional: true, integrity: 'sha1-R6xTaD2vgyv6lS4XdEF9pHgXrkI=' } diff --git a/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js b/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js index 6cc388946e4062..94f3c4ac9012a3 100644 --- a/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js +++ b/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var opts = [ '--cache=' + path.resolve(pkg, 'cache'), '--registry=' + common.registry diff --git a/deps/npm/test/tap/shrinkwrap-prod-dependency.js b/deps/npm/test/tap/shrinkwrap-prod-dependency.js index 34e30d7c7a987f..eb04db9ca138c5 100644 --- a/deps/npm/test/tap/shrinkwrap-prod-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-prod-dependency.js @@ -10,7 +10,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-prod-dependency') +var pkg = common.pkg test("shrinkwrap --dev doesn't strip out prod dependencies", function (t) { t.plan(1) diff --git a/deps/npm/test/tap/shrinkwrap-resolve-conflict.js b/deps/npm/test/tap/shrinkwrap-resolve-conflict.js index 146d1191bf5aef..d1f63f7e62661f 100644 --- a/deps/npm/test/tap/shrinkwrap-resolve-conflict.js +++ b/deps/npm/test/tap/shrinkwrap-resolve-conflict.js @@ -12,7 +12,7 @@ const Tacks = require('tacks') const File = Tacks.File const Dir = Tacks.Dir -const testDir = path.resolve(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const modAdir = path.resolve(testDir, 'modA') const modBdir = path.resolve(testDir, 'modB') const modCdir = path.resolve(testDir, 'modC') diff --git a/deps/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js b/deps/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js index 5934a758da27a7..a71408e54f5ab1 100644 --- a/deps/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js +++ b/deps/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installme = path.join(base, 'installme') var installme_pkg = path.join(installme, 'package.json') var example = path.join(base, 'example') diff --git a/deps/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js b/deps/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js index 5f0eb079622765..fcbbeeffddf4d3 100644 --- a/deps/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js +++ b/deps/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installme = path.join(base, 'installme') var installme_pkg = path.join(installme, 'package.json') var example = path.join(base, 'example') diff --git a/deps/npm/test/tap/shrinkwrap-scoped-auth.js b/deps/npm/test/tap/shrinkwrap-scoped-auth.js index 72c3b5119853a8..3098b8aa12e93e 100644 --- a/deps/npm/test/tap/shrinkwrap-scoped-auth.js +++ b/deps/npm/test/tap/shrinkwrap-scoped-auth.js @@ -14,7 +14,7 @@ var test = require('tap').test var common = require('../common-tap.js') var toNerfDart = require('../../lib/config/nerf-dart.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') var tarballPath = '/scoped-underscore/-/scoped-underscore-1.3.1.tgz' diff --git a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js index 8960c0926154ca..6a4ceb1970ece3 100644 --- a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var opts = { env: common.newEnv().extend({ diff --git a/deps/npm/test/tap/shrinkwrap-version-match.js b/deps/npm/test/tap/shrinkwrap-version-match.js index 57906528f7be7f..e579f84d4b3bd4 100644 --- a/deps/npm/test/tap/shrinkwrap-version-match.js +++ b/deps/npm/test/tap/shrinkwrap-version-match.js @@ -7,7 +7,7 @@ var fs = require('fs') var path = require('path') var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var modAdir = path.resolve(testdir, 'modA') var modB1dir = path.resolve(testdir, 'modB@1') var modB2dir = path.resolve(testdir, 'modB@2') diff --git a/deps/npm/test/tap/sorted-package-json.js b/deps/npm/test/tap/sorted-package-json.js index 557f3dc53d272b..d67b729f683e93 100644 --- a/deps/npm/test/tap/sorted-package-json.js +++ b/deps/npm/test/tap/sorted-package-json.js @@ -2,11 +2,11 @@ var test = require('tap').test var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, 'sorted-package-json') +var common = require('../common-tap.js') +var pkg = common.pkg var tmp = path.join(pkg, 'tmp') var cache = path.join(pkg, 'cache') var fs = require('fs') -var common = require('../common-tap.js') var mr = require('npm-registry-mock') var osenv = require('osenv') var packageJson = path.resolve(pkg, 'package.json') diff --git a/deps/npm/test/tap/spawn-enoent-help.js b/deps/npm/test/tap/spawn-enoent-help.js index d4a6fcdd832ad5..cb7c942be8e7b1 100644 --- a/deps/npm/test/tap/spawn-enoent-help.js +++ b/deps/npm/test/tap/spawn-enoent-help.js @@ -1,10 +1,9 @@ -var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'spawn-enoent-help') +var pkg = common.pkg common.pendIfWindows('man pages are not built on Windows') diff --git a/deps/npm/test/tap/spawn-enoent.js b/deps/npm/test/tap/spawn-enoent.js index c81460fdcff82b..78153572eeb708 100644 --- a/deps/npm/test/tap/spawn-enoent.js +++ b/deps/npm/test/tap/spawn-enoent.js @@ -1,11 +1,10 @@ -var path = require('path') var test = require('tap').test var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'spawn-enoent') +var pkg = common.pkg var pj = JSON.stringify({ name: 'x', version: '1.2.3', diff --git a/deps/npm/test/tap/spec-local-specifiers.js b/deps/npm/test/tap/spec-local-specifiers.js index 3601eee5f3c5fc..7b6cacf12cb695 100644 --- a/deps/npm/test/tap/spec-local-specifiers.js +++ b/deps/npm/test/tap/spec-local-specifiers.js @@ -11,7 +11,7 @@ var Dir = Tacks.Dir var common = require('../common-tap.js') var isWindows = require('../../lib/utils/is-windows.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js b/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js index cf5aac110bd94a..5720a2cdcedf44 100644 --- a/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js +++ b/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js @@ -8,7 +8,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const testdir = path.join(__dirname, path.basename(__filename, '.js')) +const testdir = common.pkg const moduleName = 'xyzzy-wibble' const testModule = { diff --git a/deps/npm/test/tap/startstop.js b/deps/npm/test/tap/startstop.js index 0e9d2d94020b2d..3491441821d921 100644 --- a/deps/npm/test/tap/startstop.js +++ b/deps/npm/test/tap/startstop.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'startstop') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/symlink-cycle.js b/deps/npm/test/tap/symlink-cycle.js index 5bee2c5569ab61..d59a2763bd19c8 100644 --- a/deps/npm/test/tap/symlink-cycle.js +++ b/deps/npm/test/tap/symlink-cycle.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var cycle = path.join(base, 'cycle') var cycleJSON = { diff --git a/deps/npm/test/tap/tag-version-prefix.js b/deps/npm/test/tap/tag-version-prefix.js index 555de1af165184..b72255a2261527 100644 --- a/deps/npm/test/tap/tag-version-prefix.js +++ b/deps/npm/test/tap/tag-version-prefix.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-message-config') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') diff --git a/deps/npm/test/tap/tagged-version-matching.js b/deps/npm/test/tap/tagged-version-matching.js index 55dfb7b7c4b1c4..64522745c80e2b 100644 --- a/deps/npm/test/tap/tagged-version-matching.js +++ b/deps/npm/test/tap/tagged-version-matching.js @@ -7,7 +7,7 @@ var Dir = Tacks.Dir var Symlink = Tacks.Symlink var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/tree-style.js b/deps/npm/test/tap/tree-style.js index 12fdb0bbd9ac42..5d8abef3698b29 100644 --- a/deps/npm/test/tap/tree-style.js +++ b/deps/npm/test/tap/tree-style.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var fs = require('graceful-fs') var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var modA = path.resolve(base, 'modA') var modB = path.resolve(base, 'modB') var modC = path.resolve(base, 'modC') diff --git a/deps/npm/test/tap/umask-lifecycle.js b/deps/npm/test/tap/umask-lifecycle.js index c4c323363775e2..8b365d62335d79 100644 --- a/deps/npm/test/tap/umask-lifecycle.js +++ b/deps/npm/test/tap/umask-lifecycle.js @@ -1,5 +1,4 @@ var fs = require('fs') -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') @@ -9,7 +8,7 @@ var sprintf = require('sprintf-js').sprintf var escapeExecPath = require('../../lib/utils/escape-exec-path.js') var escapeArg = require('../../lib/utils/escape-arg.js') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'umask-lifecycle') +var pkg = common.pkg var nodeCmd = escapeExecPath(common.nodeBin) var npmCmd = nodeCmd + ' ' + escapeArg(common.bin) @@ -24,7 +23,7 @@ var pj = JSON.stringify({ var umask = process.umask() var expected = [ '', - '> x@1.2.3 umask ' + path.join(__dirname, 'umask-lifecycle'), + '> x@1.2.3 umask ' + pkg, '> ' + umaskScript, '', sprintf('%04o', umask), diff --git a/deps/npm/test/tap/uninstall-link-clean.js b/deps/npm/test/tap/uninstall-link-clean.js index 2b1d244d00fdeb..e21c370f603b70 100644 --- a/deps/npm/test/tap/uninstall-link-clean.js +++ b/deps/npm/test/tap/uninstall-link-clean.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var pkg = path.join(testdir, 'pkg') var dep = path.join(testdir, 'dep') var work = path.join(testdir, 'uninstall-link-clean-TEST') diff --git a/deps/npm/test/tap/uninstall-package.js b/deps/npm/test/tap/uninstall-package.js index 7cc7b1da1f8a83..87fdee22816975 100644 --- a/deps/npm/test/tap/uninstall-package.js +++ b/deps/npm/test/tap/uninstall-package.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'uninstall-package') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 'pipe', 2] } @@ -18,7 +18,8 @@ var json = { version: '0.0.0', dependencies: { underscore: '~1.3.1', - request: '~0.9.0' + request: '~0.9.0', + '@isaacs/namespace-test': '1.x' } } @@ -69,6 +70,27 @@ test('returns a list of removed items', function (t) { }) }) +test('does not fail if installed package lacks a name somehow', function (t) { + const scope = path.resolve(pkg, 'node_modules/@isaacs') + const scopePkg = path.resolve(scope, 'namespace-test') + const pj = path.resolve(scopePkg, 'package.json') + fs.writeFileSync(pj, JSON.stringify({ + lol: 'yolo', + name: 99 + })) + common.npm( + ['uninstall', '@isaacs/namespace-test'], + EXEC_OPTS, + function (err, code, stdout, stderr) { + if (err) throw err + t.equal(code, 0, 'should exit successfully') + t.has(stdout, /removed 1 package in/) + t.notOk(fs.existsSync(scope), 'scoped package removed') + t.end() + } + ) +}) + test('cleanup', function (t) { cleanup() t.end() diff --git a/deps/npm/test/tap/uninstall-save.js b/deps/npm/test/tap/uninstall-save.js index 9bf342d7cf9556..0605616e07f03e 100644 --- a/deps/npm/test/tap/uninstall-save.js +++ b/deps/npm/test/tap/uninstall-save.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 'ignore', 2] } diff --git a/deps/npm/test/tap/unpack-foreign-tarball.js b/deps/npm/test/tap/unpack-foreign-tarball.js index d128e94d8c37df..a1649c24bd23fe 100644 --- a/deps/npm/test/tap/unpack-foreign-tarball.js +++ b/deps/npm/test/tap/unpack-foreign-tarball.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var fixtures = path.resolve(__dirname, '..', 'fixtures') -var pkg = path.resolve(__dirname, 'unpack-foreign-tarball') +var pkg = common.pkg var nm = path.resolve(pkg, 'node_modules') var target = path.resolve(nm, 'npm-test-gitignore') var cache = path.resolve(pkg, 'cache') diff --git a/deps/npm/test/tap/unpublish-config.js b/deps/npm/test/tap/unpublish-config.js index f5d391d8c29b8e..f358835561eee8 100644 --- a/deps/npm/test/tap/unpublish-config.js +++ b/deps/npm/test/tap/unpublish-config.js @@ -7,10 +7,9 @@ var osenv = require('osenv') var rimraf = require('rimraf') var test = require('tap').test -var pkg = path.join(__dirname, 'npm-test-unpublish-config') -var fixturePath = path.join(pkg, 'fixture_npmrc') - var common = require('../common-tap.js') +var pkg = common.pkg +var fixturePath = path.join(pkg, 'fixture_npmrc') var json = { name: 'npm-test-unpublish-config', @@ -27,7 +26,7 @@ test('setup', function (t) { ) fs.writeFileSync( fixturePath, - '//localhost:1337/:_authToken = beeeeeeeeeeeeef\n' + + '//localhost:' + common.port + '/:_authToken = beeeeeeeeeeeeef\n' + 'registry = http://lvh.me:4321/registry/path\n' ) diff --git a/deps/npm/test/tap/unsupported.js b/deps/npm/test/tap/unsupported.js index 7abc8da7414410..deae8d3c034c19 100644 --- a/deps/npm/test/tap/unsupported.js +++ b/deps/npm/test/tap/unsupported.js @@ -21,8 +21,8 @@ var versions = [ ['v2.3.1', true, true], ['v3.0.0', true, true], ['v4.5.0', true, true], - ['v4.8.4', false, true], - ['v5.7.1', false, true], + ['v4.8.4', true, true], + ['v5.7.1', true, true], ['v6.8.1', false, false], ['v7.0.0-beta23', false, true], ['v7.2.3', false, true], diff --git a/deps/npm/test/tap/update-examples.js b/deps/npm/test/tap/update-examples.js index 8369d002fab297..f0a7a6271dae99 100644 --- a/deps/npm/test/tap/update-examples.js +++ b/deps/npm/test/tap/update-examples.js @@ -9,7 +9,7 @@ var osenv = require('osenv') var requireInject = require('require-inject') -var PKG_DIR = path.resolve(__dirname, 'update-examples') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') // ** constant templates for mocks ** diff --git a/deps/npm/test/tap/update-symlink.js b/deps/npm/test/tap/update-symlink.js index 79139d306f5fd0..a21a68267b542b 100644 --- a/deps/npm/test/tap/update-symlink.js +++ b/deps/npm/test/tap/update-symlink.js @@ -8,7 +8,7 @@ const Symlink = Tacks.Symlink const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/upgrade-lifecycles.js b/deps/npm/test/tap/upgrade-lifecycles.js index 0d0b8da616f676..3adea06d71375e 100644 --- a/deps/npm/test/tap/upgrade-lifecycles.js +++ b/deps/npm/test/tap/upgrade-lifecycles.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/url-dependencies.js b/deps/npm/test/tap/url-dependencies.js index 66b3e1a63b47cd..2017151568e094 100644 --- a/deps/npm/test/tap/url-dependencies.js +++ b/deps/npm/test/tap/url-dependencies.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'url-dependencies') +var pkg = common.pkg var json = { author: 'Steve Mason', diff --git a/deps/npm/test/tap/verify-no-lifecycle-on-repo.js b/deps/npm/test/tap/verify-no-lifecycle-on-repo.js index babdfb7dace238..c9232715a7079c 100644 --- a/deps/npm/test/tap/verify-no-lifecycle-on-repo.js +++ b/deps/npm/test/tap/verify-no-lifecycle-on-repo.js @@ -5,9 +5,9 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var test = require('tap').test var requireInject = require('require-inject') -require('../common-tap.js') +const common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var baseJSON = { name: 'base', diff --git a/deps/npm/test/tap/version-allow-same-version.js b/deps/npm/test/tap/version-allow-same-version.js index 66f568dec97212..fdd68032bc6b92 100644 --- a/deps/npm/test/tap/version-allow-same-version.js +++ b/deps/npm/test/tap/version-allow-same-version.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'version-allow-same-version') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-tag=false\n' diff --git a/deps/npm/test/tap/version-commit-hooks.js b/deps/npm/test/tap/version-commit-hooks.js index 4791fc3f3c4d24..568c82b46b0392 100644 --- a/deps/npm/test/tap/version-commit-hooks.js +++ b/deps/npm/test/tap/version-commit-hooks.js @@ -3,7 +3,8 @@ var path = require('path') var osenv = require('osenv') var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = path.resolve(__dirname, 'version-commit-hooks') +const common = require('../common-tap.js') +var pkg = common.pkg var test = require('tap').test var npm = require('../../') diff --git a/deps/npm/test/tap/version-consistent-newlines.js b/deps/npm/test/tap/version-consistent-newlines.js index 11020b2a7004e5..56b16afcf4b48a 100644 --- a/deps/npm/test/tap/version-consistent-newlines.js +++ b/deps/npm/test/tap/version-consistent-newlines.js @@ -10,7 +10,7 @@ const mkdirp = require('mkdirp') const rimraf = require('rimraf') const requireInject = require('require-inject') -const pkg = path.resolve(__dirname, 'version-no-git') +const pkg = common.pkg const cache = path.resolve(pkg, 'cache') const gitDir = path.resolve(pkg, '.git') diff --git a/deps/npm/test/tap/version-from-git.js b/deps/npm/test/tap/version-from-git.js index 1dc649beb42125..759396a782191a 100644 --- a/deps/npm/test/tap/version-from-git.js +++ b/deps/npm/test/tap/version-from-git.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-from-git') +var pkg = common.pkg var packagePath = path.resolve(pkg, 'package.json') var cache = path.resolve(pkg, 'cache') diff --git a/deps/npm/test/tap/version-git-not-clean.js b/deps/npm/test/tap/version-git-not-clean.js index 43e2549ceb2808..b387c00e64de3a 100644 --- a/deps/npm/test/tap/version-git-not-clean.js +++ b/deps/npm/test/tap/version-git-not-clean.js @@ -9,7 +9,7 @@ var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn -var pkg = path.resolve(__dirname, 'version-git-not-clean') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version with working directory not clean', function (t) { diff --git a/deps/npm/test/tap/version-lifecycle.js b/deps/npm/test/tap/version-lifecycle.js index e7a7793b445071..98c96b6826d4d8 100644 --- a/deps/npm/test/tap/version-lifecycle.js +++ b/deps/npm/test/tap/version-lifecycle.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'version-lifecycle') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-commit=false\nsign-git-tag=false\n' diff --git a/deps/npm/test/tap/version-message-config.js b/deps/npm/test/tap/version-message-config.js index 12cb6eb59912dc..db45809879733c 100644 --- a/deps/npm/test/tap/version-message-config.js +++ b/deps/npm/test/tap/version-message-config.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-message-config') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') diff --git a/deps/npm/test/tap/version-no-git.js b/deps/npm/test/tap/version-no-git.js index 0a859c7af2170a..dc1ee05662ff6f 100644 --- a/deps/npm/test/tap/version-no-git.js +++ b/deps/npm/test/tap/version-no-git.js @@ -8,7 +8,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var requireInject = require('require-inject') -var pkg = path.resolve(__dirname, 'version-no-git') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var gitDir = path.resolve(pkg, '.git') diff --git a/deps/npm/test/tap/version-no-package.js b/deps/npm/test/tap/version-no-package.js index e4eeda0eebda0f..1b16c9f758c8d8 100644 --- a/deps/npm/test/tap/version-no-package.js +++ b/deps/npm/test/tap/version-no-package.js @@ -1,11 +1,10 @@ var common = require('../common-tap.js') var test = require('tap').test var osenv = require('osenv') -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = path.resolve(__dirname, 'version-no-package') +var pkg = common.pkg test('setup', function (t) { setup() diff --git a/deps/npm/test/tap/version-no-tags.js b/deps/npm/test/tap/version-no-tags.js index 755e640c0b31ea..9e7b08c61fa126 100644 --- a/deps/npm/test/tap/version-no-tags.js +++ b/deps/npm/test/tap/version-no-tags.js @@ -9,7 +9,7 @@ var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn -var pkg = path.resolve(__dirname, 'version-no-tags') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version without git tag', function (t) { diff --git a/deps/npm/test/tap/version-prerelease-id.js b/deps/npm/test/tap/version-prerelease-id.js index 1a206aa116649a..5e342667cdba2f 100644 --- a/deps/npm/test/tap/version-prerelease-id.js +++ b/deps/npm/test/tap/version-prerelease-id.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'version-shrinkwrap') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/version-sub-directory-shrinkwrap.js b/deps/npm/test/tap/version-sub-directory-shrinkwrap.js index 0455b62ab7536a..c6e607d7c57675 100644 --- a/deps/npm/test/tap/version-sub-directory-shrinkwrap.js +++ b/deps/npm/test/tap/version-sub-directory-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-sub-directory') +var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') var shrinkwrapPath = path.resolve(pkg, 'npm-shrinkwrap.json') diff --git a/deps/npm/test/tap/version-sub-directory.js b/deps/npm/test/tap/version-sub-directory.js index 71c96121ca7d7d..a7eb8f10420893 100644 --- a/deps/npm/test/tap/version-sub-directory.js +++ b/deps/npm/test/tap/version-sub-directory.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-sub-directory') +var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') var cache = path.resolve(pkg, 'cache') diff --git a/deps/npm/test/tap/version-update-shrinkwrap.js b/deps/npm/test/tap/version-update-shrinkwrap.js index 58264e9926c03d..47822f646ec7f9 100644 --- a/deps/npm/test/tap/version-update-shrinkwrap.js +++ b/deps/npm/test/tap/version-update-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'version-shrinkwrap') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version updates shrinkwrap - no git', function (t) { From ed8504388e72152330b38af40cb2700f852e33f4 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Mon, 15 Jul 2019 22:25:26 +0200 Subject: [PATCH 132/162] http: avoid extra listener PR-URL: https://github.com/nodejs/node/pull/28705 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Fedor Indutny --- lib/_http_client.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/_http_client.js b/lib/_http_client.js index 11e946c893b7c3..a37df35f295e2d 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -320,10 +320,6 @@ ClientRequest.prototype.abort = function abort() { // If we're aborting, we don't care about any more response data. if (this.res) { this.res._dump(); - } else { - this.once('response', (res) => { - res._dump(); - }); } // In the event that we don't have a socket, we will pop out of @@ -572,12 +568,11 @@ function parserOnIncomingClient(res, shouldKeepAlive) { // Add our listener first, so that we guarantee socket cleanup res.on('end', responseOnEnd); req.on('prefinish', requestOnPrefinish); - const handled = req.emit('response', res); // If the user did not listen for the 'response' event, then they // can't possibly read the data, so we ._dump() it into the void // so that the socket doesn't hang there in a paused state. - if (!handled) + if (req.aborted || !req.emit('response', res)) res._dump(); if (method === 'HEAD') From a0e8a257211012b9d18dd8e9f32bb9ce740bf27d Mon Sep 17 00:00:00 2001 From: Karen He <32376376+baekrxnn@users.noreply.github.com> Date: Thu, 27 Jun 2019 16:34:53 -0700 Subject: [PATCH 133/162] vm: remove usage of public util module PR-URL: https://github.com/nodejs/node/pull/28460 Reviewed-By: Anatoli Papirovski Reviewed-By: Masashi Hirano Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Yongsheng Zhang Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- lib/vm.js | 5 ++++- test/parallel/test-bootstrap-modules.js | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vm.js b/lib/vm.js index 8e29762a2950f7..a666a05c8a7c10 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -33,7 +33,10 @@ const { ERR_INVALID_ARG_TYPE, ERR_VM_MODULE_NOT_MODULE, } = require('internal/errors').codes; -const { isModuleNamespaceObject, isArrayBufferView } = require('util').types; +const { + isModuleNamespaceObject, + isArrayBufferView, +} = require('internal/util/types'); const { validateInt32, validateUint32, diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index f96aba36863b7c..24ba7d34f57981 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -64,7 +64,6 @@ const expectedModules = new Set([ 'NativeModule path', 'NativeModule timers', 'NativeModule url', - 'NativeModule util', 'NativeModule vm', ]); From b8079f5c23c7550196e1d0797a4294c684c53509 Mon Sep 17 00:00:00 2001 From: Karen He <32376376+baekrxnn@users.noreply.github.com> Date: Thu, 27 Jun 2019 10:29:27 -0700 Subject: [PATCH 134/162] zlib: remove usage of public util module PR-URL: https://github.com/nodejs/node/pull/28454 Reviewed-By: Anatoli Papirovski Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell --- lib/zlib.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/zlib.js b/lib/zlib.js index 72144cdc01db16..445a538035a773 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -35,12 +35,12 @@ const { } = require('internal/errors'); const Transform = require('_stream_transform'); const { - deprecate, - types: { - isAnyArrayBuffer, - isArrayBufferView - } -} = require('util'); + deprecate +} = require('internal/util'); +const { + isArrayBufferView, + isAnyArrayBuffer +} = require('internal/util/types'); const binding = internalBinding('zlib'); const assert = require('internal/assert'); const { From be32becb671e1bef51e5d162cbe55293be9748e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 17 Jul 2019 17:55:12 +0200 Subject: [PATCH 135/162] build: fix building with d8 PR-URL: https://github.com/nodejs/node/pull/28733 Reviewed-By: Gus Caplan Reviewed-By: Joyee Cheung Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- node.gypi | 2 +- tools/v8_gypfiles/d8.gyp | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/node.gypi b/node.gypi index 938455bbae1bde..5fd1d8e1d48d36 100644 --- a/node.gypi +++ b/node.gypi @@ -66,7 +66,7 @@ 'defines': [ '__POSIX__' ], }], [ 'node_enable_d8=="true"', { - 'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ], + 'dependencies': [ 'tools/v8_gypfiles/d8.gyp:d8' ], }], [ 'node_use_bundled_v8=="true"', { 'dependencies': [ diff --git a/tools/v8_gypfiles/d8.gyp b/tools/v8_gypfiles/d8.gyp index 240df03380cdcf..e995c3cf560d2f 100644 --- a/tools/v8_gypfiles/d8.gyp +++ b/tools/v8_gypfiles/d8.gyp @@ -4,6 +4,7 @@ { 'variables': { + 'V8_ROOT': '../../deps/v8', 'v8_code': 1, 'v8_enable_i18n_support%': 1, }, @@ -16,23 +17,24 @@ 'v8.gyp:v8', 'v8.gyp:v8_libbase', 'v8.gyp:v8_libplatform', + 'v8.gyp:generate_bytecode_builtins_list', ], # Generated source files need this explicitly: 'include_dirs+': [ - '..', + '<(V8_ROOT)', '<(DEPTH)', '<(SHARED_INTERMEDIATE_DIR)', ], 'sources': [ - '../src/async-hooks-wrapper.cc', - '../src/async-hooks-wrapper.h', - '../src/d8-console.cc', - '../src/d8-console.h', - '../src/d8-js.cc', - '../src/d8-platforms.cc', - '../src/d8-platforms.h', - '../src/d8.cc', - '../src/d8.h', + '<(V8_ROOT)/src/async-hooks-wrapper.cc', + '<(V8_ROOT)/src/async-hooks-wrapper.h', + '<(V8_ROOT)/src/d8-console.cc', + '<(V8_ROOT)/src/d8-console.h', + '<(V8_ROOT)/src/d8-js.cc', + '<(V8_ROOT)/src/d8-platforms.cc', + '<(V8_ROOT)/src/d8-platforms.h', + '<(V8_ROOT)/src/d8.cc', + '<(V8_ROOT)/src/d8.h', ], 'conditions': [ [ 'want_separate_host_toolset==1', { @@ -44,10 +46,10 @@ ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \ or OS=="openbsd" or OS=="solaris" or OS=="android" \ or OS=="qnx" or OS=="aix")', { - 'sources': [ '../src/d8-posix.cc', ] + 'sources': [ '<(V8_ROOT)/src/d8-posix.cc', ] }], [ 'OS=="win"', { - 'sources': [ '../src/d8-windows.cc', ] + 'sources': [ '<(V8_ROOT)/src/d8-windows.cc', ] }], [ 'component!="shared_library"', { 'conditions': [ From 7989d5c600b7b872548f810b362f59c37f9d283f Mon Sep 17 00:00:00 2001 From: Harshitha KP Date: Wed, 17 Jul 2019 01:15:15 -0400 Subject: [PATCH 136/162] test: changed function to arrow function Convert callback functions that are anonymous to arrow functions for better readability. Also adjusted the `this` object in places where that was required. PR-URL: https://github.com/nodejs/node/pull/28726 Reviewed-By: James M Snell Reviewed-By: Masashi Hirano Reviewed-By: Beth Griggs Reviewed-By: Gireesh Punathil Reviewed-By: Rich Trott --- test/parallel/test-http-wget.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-http-wget.js b/test/parallel/test-http-wget.js index f576f6ad603b02..2ce6f6f698f538 100644 --- a/test/parallel/test-http-wget.js +++ b/test/parallel/test-http-wget.js @@ -40,7 +40,7 @@ const http = require('http'); // content-length is not provided, that the connection is in fact // closed. -const server = http.createServer(function(req, res) { +const server = http.createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.write('hello '); res.write('world\n'); @@ -48,30 +48,30 @@ const server = http.createServer(function(req, res) { }); server.listen(0); -server.on('listening', common.mustCall(function() { - const c = net.createConnection(this.address().port); +server.on('listening', common.mustCall(() => { + const c = net.createConnection(server.address().port); let server_response = ''; c.setEncoding('utf8'); - c.on('connect', function() { + c.on('connect', () => { c.write('GET / HTTP/1.0\r\n' + 'Connection: Keep-Alive\r\n\r\n'); }); - c.on('data', function(chunk) { + c.on('data', (chunk) => { console.log(chunk); server_response += chunk; }); - c.on('end', common.mustCall(function() { + c.on('end', common.mustCall(() => { const m = server_response.split('\r\n\r\n'); assert.strictEqual(m[1], 'hello world\n'); console.log('got end'); c.end(); })); - c.on('close', common.mustCall(function() { + c.on('close', common.mustCall(() => { console.log('got close'); server.close(); })); From 5d09c15c5b1df19338606908f528ce5024151e83 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 17 Jul 2019 09:11:46 +0000 Subject: [PATCH 137/162] build: update of the large page option error Now large pages is also supported by FreeBSD. PR-URL: https://github.com/nodejs/node/pull/28729 Reviewed-By: James M Snell Reviewed-By: Rich Trott --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index 44d2eb253909ca..a791efebbca128 100755 --- a/configure.py +++ b/configure.py @@ -400,7 +400,7 @@ action='store_true', dest='node_use_large_pages', help='build with Large Pages support. This feature is supported only on Linux kernel' + - '>= 2.6.38 with Transparent Huge pages enabled') + '>= 2.6.38 with Transparent Huge pages enabled and FreeBSD') intl_optgroup.add_option('--with-intl', action='store', From 632d7d58399579fac830d3b33e8a31c4dfb5df16 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 18 Jul 2019 20:00:19 +1000 Subject: [PATCH 138/162] build: skip test-ci doc targets if no crypto PR-URL: https://github.com/nodejs/node/pull/28747 Reviewed-By: Richard Lau Reviewed-By: Rich Trott --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e14edb2a034173..58387ab6dd4d41 100644 --- a/Makefile +++ b/Makefile @@ -488,7 +488,11 @@ test-all-suites: | clear-stalled test-build bench-addons-build doc-only ## Run a CI_NATIVE_SUITES ?= addons js-native-api node-api CI_JS_SUITES ?= default -CI_DOC := doctool +ifeq ($(node_use_openssl), false) + CI_DOC := doctool +else + CI_DOC = +endif .PHONY: test-ci-native # Build and test addons without building anything else @@ -700,7 +704,11 @@ tools/doc/node_modules: tools/doc/package.json .PHONY: doc-only doc-only: tools/doc/node_modules \ $(apidoc_dirs) $(apiassets) ## Builds the docs with the local or the global Node.js binary. - @$(MAKE) out/doc/api/all.html out/doc/api/all.json + @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ + echo "Skipping doc-only (no crypto)"; \ + else \ + $(MAKE) out/doc/api/all.html out/doc/api/all.json; \ + fi .PHONY: doc doc: $(NODE_EXE) doc-only From 5c100075f09493be7cdf3e0fb15416a9e676c8d5 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 23 Jun 2019 11:54:43 -0400 Subject: [PATCH 139/162] lib: rename lib/internal/readline.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit moves lib/internal/readline.js to lib/internal/readline/utils.js. This is in preparation of adding a readline.promises implementation. PR-URL: https://github.com/nodejs/node/pull/28753 Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Anto Aravinth Reviewed-By: Trivikram Kamat Reviewed-By: Shingo Inoue --- lib/internal/{readline.js => readline/utils.js} | 0 lib/readline.js | 2 +- node.gyp | 2 +- test/parallel/test-icu-stringwidth.js | 2 +- test/parallel/test-readline-csi.js | 2 +- test/parallel/test-readline-interface.js | 2 +- test/parallel/test-repl-top-level-await.js | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename lib/internal/{readline.js => readline/utils.js} (100%) diff --git a/lib/internal/readline.js b/lib/internal/readline/utils.js similarity index 100% rename from lib/internal/readline.js rename to lib/internal/readline/utils.js diff --git a/lib/readline.js b/lib/readline.js index 77b9dbc6c8f213..81d9ce16472a6e 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -44,7 +44,7 @@ const { isFullWidthCodePoint, kUTF16SurrogateThreshold, stripVTControlCharacters -} = require('internal/readline'); +} = require('internal/readline/utils'); const { clearTimeout, setTimeout } = require('timers'); const { diff --git a/node.gyp b/node.gyp index ed9de85f99f386..55b7da02ccaf18 100644 --- a/node.gyp +++ b/node.gyp @@ -169,7 +169,7 @@ 'lib/internal/process/report.js', 'lib/internal/process/task_queues.js', 'lib/internal/querystring.js', - 'lib/internal/readline.js', + 'lib/internal/readline/utils.js', 'lib/internal/repl.js', 'lib/internal/repl/await.js', 'lib/internal/repl/history.js', diff --git a/test/parallel/test-icu-stringwidth.js b/test/parallel/test-icu-stringwidth.js index a66ab0ce8b1e8c..0620d3af3934ca 100644 --- a/test/parallel/test-icu-stringwidth.js +++ b/test/parallel/test-icu-stringwidth.js @@ -6,7 +6,7 @@ if (!common.hasIntl) common.skip('missing Intl'); const assert = require('assert'); -const readline = require('internal/readline'); +const readline = require('internal/readline/utils'); // Test column width diff --git a/test/parallel/test-readline-csi.js b/test/parallel/test-readline-csi.js index 1556892cff1a12..c1f34f5a303c97 100644 --- a/test/parallel/test-readline-csi.js +++ b/test/parallel/test-readline-csi.js @@ -5,7 +5,7 @@ const common = require('../common'); const assert = require('assert'); const readline = require('readline'); const { Writable } = require('stream'); -const { CSI } = require('internal/readline'); +const { CSI } = require('internal/readline/utils'); { assert(CSI); diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index 3f80fd44428549..8c7fb1a0f28090 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -25,7 +25,7 @@ const common = require('../common'); const assert = require('assert'); const readline = require('readline'); -const internalReadline = require('internal/readline'); +const internalReadline = require('internal/readline/utils'); const EventEmitter = require('events').EventEmitter; const { Writable, Readable } = require('stream'); diff --git a/test/parallel/test-repl-top-level-await.js b/test/parallel/test-repl-top-level-await.js index 73023df038b2c9..f72a5daa01581f 100644 --- a/test/parallel/test-repl-top-level-await.js +++ b/test/parallel/test-repl-top-level-await.js @@ -3,7 +3,7 @@ require('../common'); const ArrayStream = require('../common/arraystream'); const assert = require('assert'); -const { stripVTControlCharacters } = require('internal/readline'); +const { stripVTControlCharacters } = require('internal/readline/utils'); const repl = require('repl'); // Flags: --expose-internals --experimental-repl-await From 8fe9ca416dabd6939103e240b2b97c9ff9bac2c6 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Wed, 17 Jul 2019 14:39:56 -0400 Subject: [PATCH 140/162] doc: amplify warning for execute callback Add specific recommendation not to use the to the napi-env parameter in napi_async_execute_callback PR-URL: https://github.com/nodejs/node/pull/28738 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- doc/api/n-api.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 8a669b56336dbb..0a897819707325 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -463,6 +463,8 @@ Implementations of this type of function should avoid making any N-API calls that could result in the execution of JavaScript or interaction with JavaScript objects. Most often, any code that needs to make N-API calls should be made in `napi_async_complete_callback` instead. +Avoid using the `napi_env` parameter in the execute callback as +it will likely execute JavaScript. #### napi_async_complete_callback +Enables a signal handler that causes the Node.js process to write a heap dump +when the specified signal is received. + +```console +$ node --heapsnapshot-signal=SIGUSR2 index.js & +$ ps aux +USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND +node 1 5.5 6.1 787252 247004 ? Ssl 16:43 0:02 node --heapsnapshot-signal=SIGUSR2 index.js +$ kill -USR2 1 +$ ls +Heap.20190718.133405.15554.0.001.heapsnapshot +``` + ### `--heap-prof` + +> Stability: 1 - Experimental + +Instructs Node.js to error prior to running any code if the policy does not have +the specified integrity. It expects a [Subresource Integrity][] string as a +parameter. + ### `--preserve-symlinks` + +Blocks until a client (existing or connected later) has sent +`Runtime.runIfWaitingForDebugger` command. + +An exception will be thrown if there is no active inspector. + ## Class: inspector.Session The `inspector.Session` is used for dispatching messages to the V8 inspector diff --git a/lib/inspector.js b/lib/inspector.js index 4bec628b7d789e..198d87ae44ccb0 100644 --- a/lib/inspector.js +++ b/lib/inspector.js @@ -8,6 +8,7 @@ const { ERR_INSPECTOR_COMMAND, ERR_INSPECTOR_NOT_AVAILABLE, ERR_INSPECTOR_NOT_CONNECTED, + ERR_INSPECTOR_NOT_ACTIVE, ERR_INVALID_ARG_TYPE, ERR_INVALID_CALLBACK } = require('internal/errors').codes; @@ -19,7 +20,12 @@ if (!hasInspector) const EventEmitter = require('events'); const { validateString } = require('internal/validators'); const util = require('util'); -const { Connection, open, url } = internalBinding('inspector'); +const { + Connection, + open, + url, + waitForDebugger +} = internalBinding('inspector'); const connectionSymbol = Symbol('connectionProperty'); const messageCallbacksSymbol = Symbol('messageCallbacks'); @@ -105,10 +111,22 @@ class Session extends EventEmitter { } } +function inspectorOpen(port, host, wait) { + open(port, host); + if (wait) + waitForDebugger(); +} + +function inspectorWaitForDebugger() { + if (!waitForDebugger()) + throw new ERR_INSPECTOR_NOT_ACTIVE(); +} + module.exports = { - open: (port, host, wait) => open(port, host, !!wait), + open: inspectorOpen, close: process._debugEnd, url: url, + waitForDebugger: inspectorWaitForDebugger, // This is dynamically added during bootstrap, // where the console from the VM is still available console: require('internal/util/inspector').consoleFromVM, diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 8fa56e315e6a1a..23dbb79196c752 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -882,6 +882,7 @@ E('ERR_INPUT_TYPE_NOT_ALLOWED', '--input-type can only be used with string ' + E('ERR_INSPECTOR_ALREADY_CONNECTED', '%s is already connected', Error); E('ERR_INSPECTOR_CLOSED', 'Session was closed', Error); E('ERR_INSPECTOR_COMMAND', 'Inspector error %d: %s', Error); +E('ERR_INSPECTOR_NOT_ACTIVE', 'Inspector is not active', Error); E('ERR_INSPECTOR_NOT_AVAILABLE', 'Inspector is not available', Error); E('ERR_INSPECTOR_NOT_CONNECTED', 'Session is not connected', Error); E('ERR_INTERNAL_ASSERTION', (message) => { diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc index 3131c6ad373d11..8b891a2d611ece 100644 --- a/src/inspector_js_api.cc +++ b/src/inspector_js_api.cc @@ -237,7 +237,6 @@ void IsEnabled(const FunctionCallbackInfo& args) { void Open(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); Agent* agent = env->inspector_agent(); - bool wait_for_connect = false; if (args.Length() > 0 && args[0]->IsUint32()) { uint32_t port = args[0].As()->Value(); @@ -249,12 +248,15 @@ void Open(const FunctionCallbackInfo& args) { agent->host_port()->set_host(*host); } - if (args.Length() > 2 && args[2]->IsBoolean()) { - wait_for_connect = args[2]->BooleanValue(args.GetIsolate()); - } agent->StartIoThread(); - if (wait_for_connect) +} + +void WaitForDebugger(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + Agent* agent = env->inspector_agent(); + if (agent->IsActive()) agent->WaitForConnect(); + args.GetReturnValue().Set(agent->IsActive()); } void Url(const FunctionCallbackInfo& args) { @@ -285,6 +287,7 @@ void Initialize(Local target, Local unused, env->SetMethod(target, "callAndPauseOnStart", CallAndPauseOnStart); env->SetMethod(target, "open", Open); env->SetMethodNoSideEffect(target, "url", Url); + env->SetMethod(target, "waitForDebugger", WaitForDebugger); env->SetMethod(target, "asyncTaskScheduled", AsyncTaskScheduledWrapper); env->SetMethod(target, "asyncTaskCanceled", diff --git a/test/parallel/test-inspector-wait-for-connection.js b/test/parallel/test-inspector-wait-for-connection.js new file mode 100644 index 00000000000000..e6cfd81deba24b --- /dev/null +++ b/test/parallel/test-inspector-wait-for-connection.js @@ -0,0 +1,63 @@ +// Flags: --expose-internals + +'use strict'; +const common = require('../common'); + +common.skipIfInspectorDisabled(); + +const assert = require('assert'); +const { NodeInstance } = require('../common/inspector-helper.js'); + +async function runTests() { + const child = new NodeInstance(['-e', `(${main.toString()})()`], '', ''); + const session = await child.connectInspectorSession(); + await session.send({ method: 'Runtime.enable' }); + // Check that there is only one console message received. + await session.waitForConsoleOutput('log', 'before wait for debugger'); + assert.ok(!session.unprocessedNotifications() + .some((n) => n.method === 'Runtime.consoleAPICalled')); + // Check that inspector.url() is available between inspector.open() and + // inspector.waitForDebugger() + const { result: { value } } = await session.send({ + method: 'Runtime.evaluate', + params: { + expression: 'process._ws', + includeCommandLineAPI: true + } + }); + assert.ok(value.startsWith('ws://')); + session.send({ method: 'Runtime.runIfWaitingForDebugger' }); + // Check that messages after first and before second waitForDebugger are + // received + await session.waitForConsoleOutput('log', 'after wait for debugger'); + await session.waitForConsoleOutput('log', 'before second wait for debugger'); + assert.ok(!session.unprocessedNotifications() + .some((n) => n.method === 'Runtime.consoleAPICalled')); + const secondSession = await child.connectInspectorSession(); + // Check that inspector.waitForDebugger can be resumed from another session + secondSession.send({ method: 'Runtime.runIfWaitingForDebugger' }); + await session.waitForConsoleOutput('log', 'after second wait for debugger'); + assert.ok(!session.unprocessedNotifications() + .some((n) => n.method === 'Runtime.consoleAPICalled')); + secondSession.disconnect(); + session.disconnect(); + + function main(prefix) { + const inspector = require('inspector'); + inspector.open(0, undefined, false); + process._ws = inspector.url(); + console.log('before wait for debugger'); + inspector.waitForDebugger(); + console.log('after wait for debugger'); + console.log('before second wait for debugger'); + inspector.waitForDebugger(); + console.log('after second wait for debugger'); + } + + // Check that inspector.waitForDebugger throws if there is no active + // inspector + const re = /^Error \[ERR_INSPECTOR_NOT_ACTIVE\]: Inspector is not active$/; + assert.throws(() => require('inspector').waitForDebugger(), re); +} + +runTests(); From 0793398b4f203994cf039fa84bd9e2514796d8a6 Mon Sep 17 00:00:00 2001 From: David Mark Clements Date: Fri, 5 Jul 2019 20:02:08 +0200 Subject: [PATCH 148/162] stream: add null push transform in async_iterator when the readable side of a transform ends any for await loop on that transform stream should also complete. This fix prevents for await loop on a transform stream from hanging indefinitely. PR-URL: https://github.com/nodejs/node/pull/28566 Reviewed-By: Anna Henningsen Reviewed-By: Jeremiah Senkpiel Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell Reviewed-By: Rich Trott --- lib/internal/streams/async_iterator.js | 2 +- .../test-stream-readable-async-iterators.js | 26 ++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lib/internal/streams/async_iterator.js b/lib/internal/streams/async_iterator.js index defba235adbd56..89a1dae7fdfb02 100644 --- a/lib/internal/streams/async_iterator.js +++ b/lib/internal/streams/async_iterator.js @@ -155,7 +155,7 @@ const createReadableStreamAsyncIterator = (stream) => { }); iterator[kLastPromise] = null; - finished(stream, (err) => { + finished(stream, { writable: false }, (err) => { if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { const reject = iterator[kLastReject]; // Reject if we are waiting for data in the Promise returned by next() and diff --git a/test/parallel/test-stream-readable-async-iterators.js b/test/parallel/test-stream-readable-async-iterators.js index b50a6b1734b32b..12971cb2363a80 100644 --- a/test/parallel/test-stream-readable-async-iterators.js +++ b/test/parallel/test-stream-readable-async-iterators.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); -const { Readable, PassThrough, pipeline } = require('stream'); +const { Readable, Transform, PassThrough, pipeline } = require('stream'); const assert = require('assert'); async function tests() { @@ -396,6 +396,30 @@ async function tests() { } } + { + console.log('readable side of a transform stream pushes null'); + const transform = new Transform({ + objectMode: true, + transform: (chunk, enc, cb) => { cb(null, chunk); } + }); + transform.push(0); + transform.push(1); + process.nextTick(() => { + transform.push(null); + }); + + const mustReach = [ common.mustCall(), common.mustCall() ]; + + const iter = transform[Symbol.asyncIterator](); + assert.strictEqual((await iter.next()).value, 0); + + for await (const d of iter) { + assert.strictEqual(d, 1); + mustReach[0](); + } + mustReach[1](); + } + { console.log('all next promises must be resolved on end'); const r = new Readable({ From af6fe5f4c59abe507acf5d2ce6db1d5436a8a672 Mon Sep 17 00:00:00 2001 From: Alex Ramirez Date: Fri, 28 Jun 2019 16:53:17 -0500 Subject: [PATCH 149/162] test: fix assertion argument order in test-esm-namespace PR-URL: https://github.com/nodejs/node/pull/28474 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Rich Trott --- test/es-module/test-esm-namespace.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/es-module/test-esm-namespace.mjs b/test/es-module/test-esm-namespace.mjs index 07c58cd2dc99c8..094a9e972cbbad 100644 --- a/test/es-module/test-esm-namespace.mjs +++ b/test/es-module/test-esm-namespace.mjs @@ -11,4 +11,4 @@ const keys = Object.entries( .concat('default') .sort(); -assert.deepStrictEqual(Object.keys(fs).sort(), keys); +assert.deepStrictEqual(keys, Object.keys(fs).sort()); From 2839298a1e38e87479650e58591eb38bbfedac29 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 16 Jul 2019 14:45:29 -0700 Subject: [PATCH 150/162] src: expose TraceEventHelper with NODE_EXTERN As node requires a tracing controller to be initialized embedders need access to the TraceEventHelper so that we can actually set the tracing controller. Refs: https://github.com/electron/electron/commit/0e5b6f93000e4718c9e35332ddbd0f6b76cdd585/#diff-89b287b2edd0a02dddae60cb26157f47 PR-URL: https://github.com/nodejs/node/pull/28724 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- src/tracing/trace_event.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tracing/trace_event.h b/src/tracing/trace_event.h index 590cb592fc054f..27408eafd832ae 100644 --- a/src/tracing/trace_event.h +++ b/src/tracing/trace_event.h @@ -310,7 +310,9 @@ const int kZeroNumArgs = 0; const decltype(nullptr) kGlobalScope = nullptr; const uint64_t kNoId = 0; -class TraceEventHelper { +// Extern (for now) because embedders need access to TraceEventHelper. +// Refs: https://github.com/nodejs/node/pull/28724 +class NODE_EXTERN TraceEventHelper { public: static TracingController* GetTracingController(); static Agent* GetAgent(); From 9f47242e19a062e6c64f50e0ae0e63ad9490b23a Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Thu, 27 Jun 2019 21:42:36 +0800 Subject: [PATCH 151/162] deps: update nghttp2 to 1.39.1 PR-URL: https://github.com/nodejs/node/pull/28448 Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h | 4 ++-- deps/nghttp2/lib/nghttp2_http.c | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h b/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h index 7ddf43e7030ee6..210cfaa16ae816 100644 --- a/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h +++ b/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h @@ -29,7 +29,7 @@ * @macro * Version number of the nghttp2 library release */ -#define NGHTTP2_VERSION "1.38.0" +#define NGHTTP2_VERSION "1.39.1" /** * @macro @@ -37,6 +37,6 @@ * release. This is a 24 bit number with 8 bits for major number, 8 bits * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203. */ -#define NGHTTP2_VERSION_NUM 0x012600 +#define NGHTTP2_VERSION_NUM 0x012701 #endif /* NGHTTP2VER_H */ diff --git a/deps/nghttp2/lib/nghttp2_http.c b/deps/nghttp2/lib/nghttp2_http.c index 6e8acfdcc141af..8d990299838193 100644 --- a/deps/nghttp2/lib/nghttp2_http.c +++ b/deps/nghttp2/lib/nghttp2_http.c @@ -263,11 +263,14 @@ static int http_response_on_header(nghttp2_stream *stream, nghttp2_hd_nv *nv, stream->content_length = 0; return NGHTTP2_ERR_REMOVE_HTTP_HEADER; } - if (stream->status_code / 100 == 1 || - (stream->status_code / 100 == 2 && - (stream->http_flags & NGHTTP2_HTTP_FLAG_METH_CONNECT))) { + if (stream->status_code / 100 == 1) { return NGHTTP2_ERR_HTTP_HEADER; } + /* https://tools.ietf.org/html/rfc7230#section-3.3.3 */ + if (stream->status_code / 100 == 2 && + (stream->http_flags & NGHTTP2_HTTP_FLAG_METH_CONNECT)) { + return NGHTTP2_ERR_REMOVE_HTTP_HEADER; + } if (stream->content_length != -1) { return NGHTTP2_ERR_HTTP_HEADER; } From 7df54988e132d1ceb26b4122870993b730ac8b08 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 19 Jul 2019 08:59:35 -0400 Subject: [PATCH 152/162] src: silence compiler warning This commit fixes the following warning: warning: missing field 'exports' initializer PR-URL: https://github.com/nodejs/node/pull/28764 Reviewed-By: Anna Henningsen Reviewed-By: Yongsheng Zhang Reviewed-By: Rich Trott Reviewed-By: Jiawen Geng --- src/module_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module_wrap.cc b/src/module_wrap.cc index f1c819874a3839..bccfc2d2affb79 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -646,7 +646,7 @@ Maybe GetPackageScopeConfig(Environment* env, if (pjson_url.path() == last_pjson_url.path()) { auto entry = env->package_json_cache.emplace(pjson_url.ToFilePath(), PackageConfig { Exists::No, IsValid::Yes, HasMain::No, "", - PackageType::None }); + PackageType::None, Global() }); const PackageConfig* pcfg = &entry.first->second; return Just(pcfg); } From 2a82d54d9d18413bb56f7623321d42e361610c76 Mon Sep 17 00:00:00 2001 From: h3knix Date: Fri, 19 Jul 2019 20:06:10 -0600 Subject: [PATCH 153/162] doc: update env default on child_process functions PR-URL: https://github.com/nodejs/node/pull/28776 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- doc/api/child_process.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index f001ee3c7605f7..2c829fa1576f58 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -142,7 +142,7 @@ changes: * `options` {Object} * `cwd` {string} Current working directory of the child process. **Default:** `null`. - * `env` {Object} Environment key-value pairs. **Default:** `null`. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `encoding` {string} **Default:** `'utf8'` * `shell` {string} Shell to execute the command with. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** @@ -245,7 +245,7 @@ changes: * `args` {string[]} List of string arguments. * `options` {Object} * `cwd` {string} Current working directory of the child process. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `encoding` {string} **Default:** `'utf8'` * `timeout` {number} **Default:** `0` * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or @@ -335,7 +335,7 @@ changes: * `detached` {boolean} Prepare child to run independently of its parent process. Specific behavior depends on the platform, see [`options.detached`][]). - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `execPath` {string} Executable used to create the child process. * `execArgv` {string[]} List of string arguments passed to the executable. **Default:** `process.execArgv`. @@ -400,7 +400,7 @@ changes: * `args` {string[]} List of string arguments. * `options` {Object} * `cwd` {string} Current working directory of the child process. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `argv0` {string} Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` if not specified. * `stdio` {Array|string} Child's stdio configuration (see @@ -714,7 +714,7 @@ changes: * `stdio` {string|Array} Child's stdio configuration. `stderr` by default will be output to the parent process' stderr unless `stdio` is specified. **Default:** `'pipe'`. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). * `timeout` {number} In milliseconds the maximum amount of time the process @@ -777,7 +777,7 @@ changes: * `stdio` {string|Array} Child's stdio configuration. `stderr` by default will be output to the parent process' stderr unless `stdio` is specified. **Default:** `'pipe'`. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `shell` {string} Shell to execute the command with. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `'/bin/sh'` on Unix, `process.env.ComSpec` on Windows. @@ -844,7 +844,7 @@ changes: * `argv0` {string} Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` if not specified. * `stdio` {string|Array} Child's stdio configuration. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). * `timeout` {number} In milliseconds the maximum amount of time the process From 5eb37cccc602f3332b664679bededc2351c137b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 20 Jul 2019 19:55:46 +0200 Subject: [PATCH 154/162] tools: remove unused pkgsrc directory The pkgsrc Makefile target was removed in 2015 Refs: https://github.com/nodejs/node/pull/1938 PR-URL: https://github.com/nodejs/node/pull/28783 Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Ben Noordhuis Reviewed-By: Rich Trott --- Makefile | 1 - tools/pkgsrc/comment | 1 - tools/pkgsrc/description | 7 ------- 3 files changed, 9 deletions(-) delete mode 100644 tools/pkgsrc/comment delete mode 100644 tools/pkgsrc/description diff --git a/Makefile b/Makefile index 58387ab6dd4d41..d7427e578f8820 100644 --- a/Makefile +++ b/Makefile @@ -1035,7 +1035,6 @@ $(TARBALL): release-only $(NODE_EXE) doc $(RM) -r $(TARNAME)/tools/node_modules $(RM) -r $(TARNAME)/tools/osx-* $(RM) -r $(TARNAME)/tools/osx-pkg.pmdoc - $(RM) -r $(TARNAME)/tools/pkgsrc find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs $(RM) find $(TARNAME)/ -type l | xargs $(RM) # annoying on windows tar -cf $(TARNAME).tar $(TARNAME) diff --git a/tools/pkgsrc/comment b/tools/pkgsrc/comment deleted file mode 100644 index 819497523d0646..00000000000000 --- a/tools/pkgsrc/comment +++ /dev/null @@ -1 +0,0 @@ -V8 JavaScript for clients and servers (nodejs.org package) diff --git a/tools/pkgsrc/description b/tools/pkgsrc/description deleted file mode 100644 index b070f52fb6b092..00000000000000 --- a/tools/pkgsrc/description +++ /dev/null @@ -1,7 +0,0 @@ -Node.js is an evented I/O framework for the V8 JavaScript engine. It is -intended for writing scalable network programs such as web servers. - -Packaged by nodejs.org - -Homepage: -https://nodejs.org/ From 85862946706349b8e3af889c104a5184f0ccdaea Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 19 Jul 2019 15:43:33 -0700 Subject: [PATCH 155/162] doc: claim NODE_MODULE_VERSION=75 for Electron 7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/28774 Reviewed-By: Michaël Zasso Reviewed-By: Yongsheng Zhang Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Jiawen Geng --- doc/abi_version_registry.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/abi_version_registry.json b/doc/abi_version_registry.json index 4a0ee7b4a1f873..16dbd008261a8f 100644 --- a/doc/abi_version_registry.json +++ b/doc/abi_version_registry.json @@ -1,5 +1,7 @@ { "NODE_MODULE_VERSION": [ + { "modules": 75, "runtime": "electron", "variant": "electron", "versions": "7" }, + { "modules": 74, "runtime": "node", "variant": "v8_7.5", "versions": "13.0.0-pre" }, { "modules": 73, "runtime": "electron", "variant": "electron", "versions": "6" }, { "modules": 72, "runtime": "node", "variant": "v8_7.4", "versions": "12.0.0-pre" }, { "modules": 71, "runtime": "node", "variant": "v8_7.3", "versions": "12.0.0-pre" }, From 674d33cb8c288b0e91d6e9e742e9739b2383e847 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 19 Jul 2019 09:22:56 -0500 Subject: [PATCH 156/162] deps: V8: backport b33af60 Original commit message: [api] Get ScriptOrModule from CompileFunctionInContext Adds a new out param which allows accessing the ScriptOrModule of a function, which allows an embedder such as Node.js to use the function's i::Script lifetime. Refs: https://github.com/nodejs/node-v8/issues/111 Change-Id: I34346d94d76e8f9b8377c97d948673f4b95eb9d5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1699698 Reviewed-by: Yang Guo Commit-Queue: Yang Guo Cr-Commit-Position: refs/heads/master@{#62830} Refs: https://github.com/v8/v8/commit/b33af60dd9e7e5b2557b9fbf3fdb80209f6db844 Backport-PR-URL: https://github.com/nodejs/node/pull/28779 PR-URL: https://github.com/nodejs/node/pull/28671 Reviewed-By: Anna Henningsen Reviewed-By: Guy Bedford --- common.gypi | 2 +- deps/v8/include/v8.h | 7 ++ deps/v8/src/api.cc | 133 ++++++++++++++++----------- deps/v8/test/cctest/test-compiler.cc | 9 +- 4 files changed, 93 insertions(+), 58 deletions(-) diff --git a/common.gypi b/common.gypi index 36e9745009ee44..1eadd779a34427 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.15', + 'v8_embedder_string': '-node.16', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 3682c888cc8563..79c17ad57f8923 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -1703,6 +1703,13 @@ class V8_EXPORT ScriptCompiler { CompileOptions options = kNoCompileOptions, NoCacheReason no_cache_reason = kNoCacheNoReason); + static V8_WARN_UNUSED_RESULT MaybeLocal CompileFunctionInContext( + Local context, Source* source, size_t arguments_count, + Local arguments[], size_t context_extension_count, + Local context_extensions[], CompileOptions options, + NoCacheReason no_cache_reason, + Local* script_or_module_out); + /** * Creates and returns code cache for the specified unbound_script. * This will return nullptr if the script cannot be serialized. The diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index f4f3fa309eb556..4127d6735adb28 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -2500,69 +2500,92 @@ MaybeLocal ScriptCompiler::CompileFunctionInContext( Local arguments[], size_t context_extension_count, Local context_extensions[], CompileOptions options, NoCacheReason no_cache_reason) { - PREPARE_FOR_EXECUTION(v8_context, ScriptCompiler, CompileFunctionInContext, - Function); - TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler"); + return ScriptCompiler::CompileFunctionInContext( + v8_context, source, arguments_count, arguments, context_extension_count, + context_extensions, options, no_cache_reason, nullptr); +} - DCHECK(options == CompileOptions::kConsumeCodeCache || - options == CompileOptions::kEagerCompile || - options == CompileOptions::kNoCompileOptions); +MaybeLocal ScriptCompiler::CompileFunctionInContext( + Local v8_context, Source* source, size_t arguments_count, + Local arguments[], size_t context_extension_count, + Local context_extensions[], CompileOptions options, + NoCacheReason no_cache_reason, + Local* script_or_module_out) { + Local result; - i::Handle context = Utils::OpenHandle(*v8_context); + { + PREPARE_FOR_EXECUTION(v8_context, ScriptCompiler, CompileFunctionInContext, + Function); + TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler"); - DCHECK(context->IsNativeContext()); - i::Handle outer_info( - context->empty_function()->shared(), isolate); - - i::Handle fun; - i::Handle arguments_list = - isolate->factory()->NewFixedArray(static_cast(arguments_count)); - for (int i = 0; i < static_cast(arguments_count); i++) { - i::Handle argument = Utils::OpenHandle(*arguments[i]); - if (!IsIdentifier(isolate, argument)) return Local(); - arguments_list->set(i, *argument); - } - - for (size_t i = 0; i < context_extension_count; ++i) { - i::Handle extension = - Utils::OpenHandle(*context_extensions[i]); - if (!extension->IsJSObject()) return Local(); - context = isolate->factory()->NewWithContext( - context, - i::ScopeInfo::CreateForWithScope( - isolate, - context->IsNativeContext() - ? i::Handle::null() - : i::Handle(context->scope_info(), isolate)), - extension); - } + DCHECK(options == CompileOptions::kConsumeCodeCache || + options == CompileOptions::kEagerCompile || + options == CompileOptions::kNoCompileOptions); - i::Compiler::ScriptDetails script_details = GetScriptDetails( - isolate, source->resource_name, source->resource_line_offset, - source->resource_column_offset, source->source_map_url, - source->host_defined_options); + i::Handle context = Utils::OpenHandle(*v8_context); - i::ScriptData* script_data = nullptr; - if (options == kConsumeCodeCache) { - DCHECK(source->cached_data); - // ScriptData takes care of pointer-aligning the data. - script_data = new i::ScriptData(source->cached_data->data, - source->cached_data->length); + DCHECK(context->IsNativeContext()); + + i::Handle arguments_list = + isolate->factory()->NewFixedArray(static_cast(arguments_count)); + for (int i = 0; i < static_cast(arguments_count); i++) { + i::Handle argument = Utils::OpenHandle(*arguments[i]); + if (!IsIdentifier(isolate, argument)) return Local(); + arguments_list->set(i, *argument); + } + + for (size_t i = 0; i < context_extension_count; ++i) { + i::Handle extension = + Utils::OpenHandle(*context_extensions[i]); + if (!extension->IsJSObject()) return Local(); + context = isolate->factory()->NewWithContext( + context, + i::ScopeInfo::CreateForWithScope( + isolate, + context->IsNativeContext() + ? i::Handle::null() + : i::Handle(context->scope_info(), isolate)), + extension); + } + + i::Compiler::ScriptDetails script_details = GetScriptDetails( + isolate, source->resource_name, source->resource_line_offset, + source->resource_column_offset, source->source_map_url, + source->host_defined_options); + + i::ScriptData* script_data = nullptr; + if (options == kConsumeCodeCache) { + DCHECK(source->cached_data); + // ScriptData takes care of pointer-aligning the data. + script_data = new i::ScriptData(source->cached_data->data, + source->cached_data->length); + } + + i::Handle scoped_result; + has_pending_exception = + !i::Compiler::GetWrappedFunction( + Utils::OpenHandle(*source->source_string), arguments_list, context, + script_details, source->resource_options, script_data, options, + no_cache_reason) + .ToHandle(&scoped_result); + if (options == kConsumeCodeCache) { + source->cached_data->rejected = script_data->rejected(); + } + delete script_data; + RETURN_ON_FAILED_EXECUTION(Function); + result = handle_scope.Escape(Utils::CallableToLocal(scoped_result)); } - i::Handle result; - has_pending_exception = - !i::Compiler::GetWrappedFunction( - Utils::OpenHandle(*source->source_string), arguments_list, context, - script_details, source->resource_options, script_data, options, - no_cache_reason) - .ToHandle(&result); - if (options == kConsumeCodeCache) { - source->cached_data->rejected = script_data->rejected(); + if (script_or_module_out != nullptr) { + i::Handle function = + i::Handle::cast(Utils::OpenHandle(*result)); + i::Isolate* isolate = function->GetIsolate(); + i::Handle shared(function->shared(), isolate); + i::Handle script(i::Script::cast(shared->script()), isolate); + *script_or_module_out = v8::Utils::ScriptOrModuleToLocal(script); } - delete script_data; - RETURN_ON_FAILED_EXECUTION(Function); - RETURN_ESCAPED(Utils::CallableToLocal(result)); + + return result; } void ScriptCompiler::ScriptStreamingTask::Run() { data_->task->Run(); } diff --git a/deps/v8/test/cctest/test-compiler.cc b/deps/v8/test/cctest/test-compiler.cc index 17f7a7d851cd76..cb559d8fe21f74 100644 --- a/deps/v8/test/cctest/test-compiler.cc +++ b/deps/v8/test/cctest/test-compiler.cc @@ -647,11 +647,16 @@ TEST(CompileFunctionInContextScriptOrigin) { v8::Integer::New(CcTest::isolate(), 22), v8::Integer::New(CcTest::isolate(), 41)); v8::ScriptCompiler::Source script_source(v8_str("throw new Error()"), origin); + Local script; v8::Local fun = - v8::ScriptCompiler::CompileFunctionInContext(env.local(), &script_source, - 0, nullptr, 0, nullptr) + v8::ScriptCompiler::CompileFunctionInContext( + env.local(), &script_source, 0, nullptr, 0, nullptr, + v8::ScriptCompiler::CompileOptions::kNoCompileOptions, + v8::ScriptCompiler::NoCacheReason::kNoCacheNoReason, &script) .ToLocalChecked(); CHECK(!fun.IsEmpty()); + CHECK(!script.IsEmpty()); + CHECK(script->GetResourceName()->StrictEquals(v8_str("test"))); v8::TryCatch try_catch(CcTest::isolate()); CcTest::isolate()->SetCaptureStackTraceForUncaughtExceptions(true); CHECK(fun->Call(env.local(), env->Global(), 0, nullptr).IsEmpty()); From 7b4638cee03771d9666ad0ba0c494046fe84dd8d Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 19 Jul 2019 09:30:09 -0500 Subject: [PATCH 157/162] vm: fix gc bug with modules and compiled functions Backport-PR-URL: https://github.com/nodejs/node/pull/28779 PR-URL: https://github.com/nodejs/node/pull/28671 Reviewed-By: Anna Henningsen Reviewed-By: Guy Bedford --- lib/internal/modules/cjs/loader.js | 5 +-- lib/vm.js | 12 ++++++- src/env.cc | 27 ++++++++++----- src/env.h | 12 ++++--- src/module_wrap.cc | 2 +- src/node_contextify.cc | 54 ++++++++++++++++-------------- src/node_contextify.h | 2 -- 7 files changed, 69 insertions(+), 45 deletions(-) diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index 00bc575b1f7d4b..a70fad83f9a8a7 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -717,7 +717,7 @@ Module.prototype._compile = function(content, filename) { } : undefined, }); } else { - compiledWrapper = compileFunction( + const compiled = compileFunction( content, filename, 0, @@ -736,13 +736,14 @@ Module.prototype._compile = function(content, filename) { ); if (experimentalModules) { const { callbackMap } = internalBinding('module_wrap'); - callbackMap.set(compiledWrapper, { + callbackMap.set(compiled.cacheKey, { importModuleDynamically: async (specifier) => { const loader = await asyncESM.loaderPromise; return loader.import(specifier, normalizeReferrerURL(filename)); } }); } + compiledWrapper = compiled.function; } var inspectorWrapper = null; diff --git a/lib/vm.js b/lib/vm.js index a666a05c8a7c10..ec6614e66146a7 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -383,7 +383,7 @@ function compileFunction(code, params, options = {}) { } }); - return _compileFunction( + const result = _compileFunction( code, filename, lineOffset, @@ -394,6 +394,16 @@ function compileFunction(code, params, options = {}) { contextExtensions, params ); + + if (produceCachedData) { + result.function.cachedDataProduced = result.cachedDataProduced; + } + + if (result.cachedData) { + result.function.cachedData = result.cachedData; + } + + return result.function; } diff --git a/src/env.cc b/src/env.cc index df59eaaa94928f..38d5796f54d6e5 100644 --- a/src/env.cc +++ b/src/env.cc @@ -39,6 +39,7 @@ using v8::NewStringType; using v8::Number; using v8::Object; using v8::Private; +using v8::ScriptOrModule; using v8::SnapshotCreator; using v8::StackTrace; using v8::String; @@ -46,6 +47,7 @@ using v8::Symbol; using v8::TracingController; using v8::Undefined; using v8::Value; +using v8::WeakCallbackInfo; using worker::Worker; int const Environment::kNodeContextTag = 0x6e6f64; @@ -385,9 +387,22 @@ Environment::Environment(IsolateData* isolate_data, CreateProperties(); } -CompileFnEntry::CompileFnEntry(Environment* env, uint32_t id) - : env(env), id(id) { - env->compile_fn_entries.insert(this); +static void WeakCallbackCompiledFn( + const WeakCallbackInfo& data) { + CompiledFnEntry* entry = data.GetParameter(); + entry->env->id_to_function_map.erase(entry->id); + delete entry; +} + +CompiledFnEntry::CompiledFnEntry(Environment* env, + uint32_t id, + Local script) + : env(env), + id(id), + cache_key(env->isolate(), Object::New(env->isolate())), + script(env->isolate(), script) { + this->script.SetWeak( + this, WeakCallbackCompiledFn, v8::WeakCallbackType::kParameter); } Environment::~Environment() { @@ -398,12 +413,6 @@ Environment::~Environment() { // CleanupHandles() should have removed all of them. CHECK(file_handle_read_wrap_freelist_.empty()); - // dispose the Persistent references to the compileFunction - // wrappers used in the dynamic import callback - for (auto& entry : compile_fn_entries) { - delete entry; - } - HandleScope handle_scope(isolate()); #if HAVE_INSPECTOR diff --git a/src/env.h b/src/env.h index df389f3beab35b..3665c100d9b965 100644 --- a/src/env.h +++ b/src/env.h @@ -157,6 +157,7 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2; V(cached_data_produced_string, "cachedDataProduced") \ V(cached_data_rejected_string, "cachedDataRejected") \ V(cached_data_string, "cachedData") \ + V(cache_key_string, "cacheKey") \ V(change_string, "change") \ V(channel_string, "channel") \ V(chunks_sent_since_last_write_string, "chunksSentSinceLastWrite") \ @@ -500,10 +501,14 @@ struct ContextInfo { bool is_default = false; }; -struct CompileFnEntry { +struct CompiledFnEntry { Environment* env; uint32_t id; - CompileFnEntry(Environment* env, uint32_t id); + v8::Global cache_key; + v8::Global script; + CompiledFnEntry(Environment* env, + uint32_t id, + v8::Local script); }; // Listing the AsyncWrap provider types first enables us to cast directly @@ -990,8 +995,7 @@ class Environment : public MemoryRetainer { std::unordered_map id_to_module_map; std::unordered_map id_to_script_map; - std::unordered_set compile_fn_entries; - std::unordered_map> id_to_function_map; + std::unordered_map id_to_function_map; inline uint32_t get_next_module_id(); inline uint32_t get_next_script_id(); diff --git a/src/module_wrap.cc b/src/module_wrap.cc index bccfc2d2affb79..7df91bb8704282 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -1041,7 +1041,7 @@ static MaybeLocal ImportModuleDynamically( ModuleWrap* wrap = ModuleWrap::GetFromID(env, id); object = wrap->object(); } else if (type == ScriptType::kFunction) { - object = env->id_to_function_map.find(id)->second.Get(iso); + object = env->id_to_function_map.find(id)->second->cache_key.Get(iso); } else { UNREACHABLE(); } diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 5be774fb91af0c..6559e813c9ae8b 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -66,6 +66,7 @@ using v8::PropertyHandlerFlags; using v8::Script; using v8::ScriptCompiler; using v8::ScriptOrigin; +using v8::ScriptOrModule; using v8::String; using v8::Symbol; using v8::Uint32; @@ -305,15 +306,6 @@ void ContextifyContext::WeakCallback( delete context; } -void ContextifyContext::WeakCallbackCompileFn( - const WeakCallbackInfo& data) { - CompileFnEntry* entry = data.GetParameter(); - if (entry->env->compile_fn_entries.erase(entry) != 0) { - entry->env->id_to_function_map.erase(entry->id); - delete entry; - } -} - // static ContextifyContext* ContextifyContext::ContextFromContextifiedSandbox( Environment* env, @@ -1117,9 +1109,11 @@ void ContextifyContext::CompileFunction( } } + Local script; MaybeLocal maybe_fn = ScriptCompiler::CompileFunctionInContext( parsing_context, &source, params.size(), params.data(), - context_extensions.size(), context_extensions.data(), options); + context_extensions.size(), context_extensions.data(), options, + v8::ScriptCompiler::NoCacheReason::kNoCacheNoReason, &script); if (maybe_fn.IsEmpty()) { if (try_catch.HasCaught() && !try_catch.HasTerminated()) { @@ -1129,13 +1123,17 @@ void ContextifyContext::CompileFunction( return; } Local fn = maybe_fn.ToLocalChecked(); - env->id_to_function_map.emplace(std::piecewise_construct, - std::make_tuple(id), - std::make_tuple(isolate, fn)); - CompileFnEntry* gc_entry = new CompileFnEntry(env, id); - env->id_to_function_map[id].SetWeak(gc_entry, - WeakCallbackCompileFn, - v8::WeakCallbackType::kParameter); + + CompiledFnEntry* entry = new CompiledFnEntry(env, id, script); + env->id_to_function_map.emplace(id, entry); + Local cache_key = entry->cache_key.Get(isolate); + + Local result = Object::New(isolate); + if (result->Set(parsing_context, env->function_string(), fn).IsNothing()) + return; + if (result->Set(parsing_context, env->cache_key_string(), cache_key) + .IsNothing()) + return; if (produce_cached_data) { const std::unique_ptr cached_data( @@ -1146,18 +1144,22 @@ void ContextifyContext::CompileFunction( env, reinterpret_cast(cached_data->data), cached_data->length); - if (fn->Set( - parsing_context, - env->cached_data_string(), - buf.ToLocalChecked()).IsNothing()) return; + if (result + ->Set(parsing_context, + env->cached_data_string(), + buf.ToLocalChecked()) + .IsNothing()) + return; } - if (fn->Set( - parsing_context, - env->cached_data_produced_string(), - Boolean::New(isolate, cached_data_produced)).IsNothing()) return; + if (result + ->Set(parsing_context, + env->cached_data_produced_string(), + Boolean::New(isolate, cached_data_produced)) + .IsNothing()) + return; } - args.GetReturnValue().Set(fn); + args.GetReturnValue().Set(result); } static void StartSigintWatchdog(const FunctionCallbackInfo& args) { diff --git a/src/node_contextify.h b/src/node_contextify.h index 288b51ef56ac11..73461dc623578e 100644 --- a/src/node_contextify.h +++ b/src/node_contextify.h @@ -63,8 +63,6 @@ class ContextifyContext { const v8::FunctionCallbackInfo& args); static void WeakCallback( const v8::WeakCallbackInfo& data); - static void WeakCallbackCompileFn( - const v8::WeakCallbackInfo& data); static void PropertyGetterCallback( v8::Local property, const v8::PropertyCallbackInfo& args); From c0f24be185a995ae05e55c44fde0ff83e81e63d9 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 20 Jul 2019 19:35:24 +0200 Subject: [PATCH 158/162] src: make `CompiledFnEntry` a `BaseObject` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In particular: - Move the class definition to the relevant header file, i.e. `node_contextify.h`. - Make sure that class instances are destroyed on `Environment` teardown. - Make instances of the key object traceable in heap dumps. This is particularly relevant here because our C++ script → map key mapping could introduce memory leaks when the import function metadata refers back to the script in some way. Refs: https://github.com/nodejs/node/pull/28671 PR-URL: https://github.com/nodejs/node/pull/28782 Reviewed-By: Gus Caplan Reviewed-By: Rich Trott --- src/env.cc | 20 -------------------- src/env.h | 14 +++----------- src/module_wrap.cc | 4 +++- src/node_contextify.cc | 37 +++++++++++++++++++++++++++++++++++-- src/node_contextify.h | 19 +++++++++++++++++++ 5 files changed, 60 insertions(+), 34 deletions(-) diff --git a/src/env.cc b/src/env.cc index 38d5796f54d6e5..bb78a0c1f3d740 100644 --- a/src/env.cc +++ b/src/env.cc @@ -39,7 +39,6 @@ using v8::NewStringType; using v8::Number; using v8::Object; using v8::Private; -using v8::ScriptOrModule; using v8::SnapshotCreator; using v8::StackTrace; using v8::String; @@ -47,7 +46,6 @@ using v8::Symbol; using v8::TracingController; using v8::Undefined; using v8::Value; -using v8::WeakCallbackInfo; using worker::Worker; int const Environment::kNodeContextTag = 0x6e6f64; @@ -387,24 +385,6 @@ Environment::Environment(IsolateData* isolate_data, CreateProperties(); } -static void WeakCallbackCompiledFn( - const WeakCallbackInfo& data) { - CompiledFnEntry* entry = data.GetParameter(); - entry->env->id_to_function_map.erase(entry->id); - delete entry; -} - -CompiledFnEntry::CompiledFnEntry(Environment* env, - uint32_t id, - Local script) - : env(env), - id(id), - cache_key(env->isolate(), Object::New(env->isolate())), - script(env->isolate(), script) { - this->script.SetWeak( - this, WeakCallbackCompiledFn, v8::WeakCallbackType::kParameter); -} - Environment::~Environment() { isolate()->GetHeapProfiler()->RemoveBuildEmbedderGraphCallback( BuildEmbedderGraph, this); diff --git a/src/env.h b/src/env.h index 3665c100d9b965..b6aa8e9996ed5c 100644 --- a/src/env.h +++ b/src/env.h @@ -55,6 +55,7 @@ namespace node { namespace contextify { class ContextifyScript; +class CompiledFnEntry; } namespace fs { @@ -355,6 +356,7 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2; V(as_callback_data_template, v8::FunctionTemplate) \ V(async_wrap_ctor_template, v8::FunctionTemplate) \ V(async_wrap_object_ctor_template, v8::FunctionTemplate) \ + V(compiled_fn_entry_template, v8::ObjectTemplate) \ V(fd_constructor_template, v8::ObjectTemplate) \ V(fdclose_constructor_template, v8::ObjectTemplate) \ V(filehandlereadwrap_template, v8::ObjectTemplate) \ @@ -501,16 +503,6 @@ struct ContextInfo { bool is_default = false; }; -struct CompiledFnEntry { - Environment* env; - uint32_t id; - v8::Global cache_key; - v8::Global script; - CompiledFnEntry(Environment* env, - uint32_t id, - v8::Local script); -}; - // Listing the AsyncWrap provider types first enables us to cast directly // from a provider type to a debug category. #define DEBUG_CATEGORY_NAMES(V) \ @@ -995,7 +987,7 @@ class Environment : public MemoryRetainer { std::unordered_map id_to_module_map; std::unordered_map id_to_script_map; - std::unordered_map id_to_function_map; + std::unordered_map id_to_function_map; inline uint32_t get_next_module_id(); inline uint32_t get_next_script_id(); diff --git a/src/module_wrap.cc b/src/module_wrap.cc index 7df91bb8704282..c13ab3b5ed21ae 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -1041,7 +1041,9 @@ static MaybeLocal ImportModuleDynamically( ModuleWrap* wrap = ModuleWrap::GetFromID(env, id); object = wrap->object(); } else if (type == ScriptType::kFunction) { - object = env->id_to_function_map.find(id)->second->cache_key.Get(iso); + auto it = env->id_to_function_map.find(id); + CHECK_NE(it, env->id_to_function_map.end()); + object = it->second->object(); } else { UNREACHABLE(); } diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 6559e813c9ae8b..69c110d6be2d22 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1124,9 +1124,13 @@ void ContextifyContext::CompileFunction( } Local fn = maybe_fn.ToLocalChecked(); - CompiledFnEntry* entry = new CompiledFnEntry(env, id, script); + Local cache_key; + if (!env->compiled_fn_entry_template()->NewInstance( + context).ToLocal(&cache_key)) { + return; + } + CompiledFnEntry* entry = new CompiledFnEntry(env, cache_key, id, script); env->id_to_function_map.emplace(id, entry); - Local cache_key = entry->cache_key.Get(isolate); Local result = Object::New(isolate); if (result->Set(parsing_context, env->function_string(), fn).IsNothing()) @@ -1162,6 +1166,27 @@ void ContextifyContext::CompileFunction( args.GetReturnValue().Set(result); } +void CompiledFnEntry::WeakCallback( + const WeakCallbackInfo& data) { + CompiledFnEntry* entry = data.GetParameter(); + delete entry; +} + +CompiledFnEntry::CompiledFnEntry(Environment* env, + Local object, + uint32_t id, + Local script) + : BaseObject(env, object), + id_(id), + script_(env->isolate(), script) { + script_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter); +} + +CompiledFnEntry::~CompiledFnEntry() { + env()->id_to_function_map.erase(id_); + script_.ClearWeak(); +} + static void StartSigintWatchdog(const FunctionCallbackInfo& args) { int ret = SigintWatchdogHelper::GetInstance()->Start(); args.GetReturnValue().Set(ret == 0); @@ -1190,6 +1215,14 @@ void Initialize(Local target, // Used in tests. env->SetMethodNoSideEffect( target, "watchdogHasPendingSigint", WatchdogHasPendingSigint); + + { + Local tpl = FunctionTemplate::New(env->isolate()); + tpl->SetClassName(FIXED_ONE_BYTE_STRING(env->isolate(), "CompiledFnEntry")); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + env->set_compiled_fn_entry_template(tpl->InstanceTemplate()); + } } } // namespace contextify diff --git a/src/node_contextify.h b/src/node_contextify.h index 73461dc623578e..cf1e8475075fcb 100644 --- a/src/node_contextify.h +++ b/src/node_contextify.h @@ -133,6 +133,25 @@ class ContextifyScript : public BaseObject { uint32_t id_; }; +class CompiledFnEntry final : public BaseObject { + public: + SET_NO_MEMORY_INFO() + SET_MEMORY_INFO_NAME(CompiledFnEntry) + SET_SELF_SIZE(CompiledFnEntry) + + CompiledFnEntry(Environment* env, + v8::Local object, + uint32_t id, + v8::Local script); + ~CompiledFnEntry(); + + private: + uint32_t id_; + v8::Global script_; + + static void WeakCallback(const v8::WeakCallbackInfo& data); +}; + } // namespace contextify } // namespace node From 302865e8b9756812b45d9ff60403c2a231c01152 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 20 Jul 2019 23:12:41 +0200 Subject: [PATCH 159/162] src: do not include partial AsyncWrap instances in heap dump Heap dumps can be taken either through the inspector or the public API for it during an async_hooks init() hook, but at that point the AsyncWrap in question is not done initializing yet and virtual methods cannot be called on it. Address this issue (somewhat hackily) by excluding `AsyncWrap` instances which have not yet executed their `init()` hook fully from heap dumps. Fixes: https://github.com/nodejs/node/issues/28786 PR-URL: https://github.com/nodejs/node/pull/28789 Reviewed-By: Ben Noordhuis Reviewed-By: Rich Trott --- src/async_wrap.cc | 36 ++++++++++++--- src/async_wrap.h | 5 +- src/base_object.h | 3 ++ src/env.cc | 6 ++- .../test-heapdump-async-hooks-init-promise.js | 46 +++++++++++++++++++ 5 files changed, 86 insertions(+), 10 deletions(-) create mode 100644 test/parallel/test-heapdump-async-hooks-init-promise.js diff --git a/src/async_wrap.cc b/src/async_wrap.cc index b7da5565a3a8b1..83b661a12db0a8 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -577,22 +577,44 @@ AsyncWrap::AsyncWrap(Environment* env, ProviderType provider, double execution_async_id, bool silent) - : BaseObject(env, object), - provider_type_(provider) { + : AsyncWrap(env, object) { CHECK_NE(provider, PROVIDER_NONE); - CHECK_GE(object->InternalFieldCount(), 1); + provider_type_ = provider; // Use AsyncReset() call to execute the init() callbacks. AsyncReset(execution_async_id, silent); + init_hook_ran_ = true; } AsyncWrap::AsyncWrap(Environment* env, Local object) - : BaseObject(env, object), - provider_type_(PROVIDER_NONE) { - CHECK_GE(object->InternalFieldCount(), 1); + : BaseObject(env, object) { +} + +// This method is necessary to work around one specific problem: +// Before the init() hook runs, if there is one, the BaseObject() constructor +// registers this object with the Environment for finilization and debugging +// purposes. +// If the Environment decides to inspect this object for debugging, it tries to +// call virtual methods on this object that are only (meaningfully) implemented +// by the subclasses of AsyncWrap. +// This could, with bad luck, happen during the AsyncWrap() constructor, +// because we run JS code as part of it and that in turn can lead to a heapdump +// being taken, either through the inspector or our programmatic API for it. +// The object being initialized is not fully constructed at that point, and +// in particular its virtual function table points to the AsyncWrap one +// (as the subclass constructor has not yet begun execution at that point). +// This means that the functions that are used for heap dump memory tracking +// are not yet available, and trying to call them would crash the process. +// We use this particular `IsDoneInitializing()` method to tell the Environment +// that such debugging methods are not yet available. +// This may be somewhat unreliable when it comes to future changes, because +// at this point it *only* protects AsyncWrap subclasses, and *only* for cases +// where heap dumps are being taken while the init() hook is on the call stack. +// For now, it seems like the best solution, though. +bool AsyncWrap::IsDoneInitializing() const { + return init_hook_ran_; } - AsyncWrap::~AsyncWrap() { EmitTraceEventDestroy(); EmitDestroy(); diff --git a/src/async_wrap.h b/src/async_wrap.h index 0fe41352234d06..546f5130e01fc6 100644 --- a/src/async_wrap.h +++ b/src/async_wrap.h @@ -210,6 +210,8 @@ class AsyncWrap : public BaseObject { AsyncWrap* wrap_ = nullptr; }; + bool IsDoneInitializing() const override; + private: friend class PromiseWrap; @@ -218,7 +220,8 @@ class AsyncWrap : public BaseObject { ProviderType provider, double execution_async_id, bool silent); - ProviderType provider_type_; + ProviderType provider_type_ = PROVIDER_NONE; + bool init_hook_ran_ = false; // Because the values may be Reset(), cannot be made const. double async_id_ = kInvalidAsyncId; double trigger_async_id_; diff --git a/src/base_object.h b/src/base_object.h index 53bd4b00d6044a..0b202cd3a51324 100644 --- a/src/base_object.h +++ b/src/base_object.h @@ -83,6 +83,9 @@ class BaseObject : public MemoryRetainer { v8::Local value, const v8::PropertyCallbackInfo& info); + // This is a bit of a hack. See the override in async_wrap.cc for details. + virtual bool IsDoneInitializing() const; + protected: // Can be used to avoid the automatic object deletion when the Environment // exits, for example when this object is owned and deleted by another diff --git a/src/env.cc b/src/env.cc index bb78a0c1f3d740..936b9a1854cf93 100644 --- a/src/env.cc +++ b/src/env.cc @@ -954,8 +954,8 @@ void MemoryTracker::TrackField(const char* edge_name, // identified and tracked here (based on their deleters), // but we may convert and track other known types here. BaseObject* obj = value.GetBaseObject(); - if (obj != nullptr) { - this->TrackField("arg", obj); + if (obj != nullptr && obj->IsDoneInitializing()) { + TrackField("arg", obj); } CHECK_EQ(CurrentNode(), n); CHECK_NE(n->size_, 0); @@ -1077,6 +1077,8 @@ void BaseObject::DeleteMe(void* data) { delete self; } +bool BaseObject::IsDoneInitializing() const { return true; } + Local BaseObject::WrappedObject() const { return object(); } diff --git a/test/parallel/test-heapdump-async-hooks-init-promise.js b/test/parallel/test-heapdump-async-hooks-init-promise.js new file mode 100644 index 00000000000000..c59cb89baa3d18 --- /dev/null +++ b/test/parallel/test-heapdump-async-hooks-init-promise.js @@ -0,0 +1,46 @@ +// Flags: --expose-gc +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const async_hooks = require('async_hooks'); +const v8 = require('v8'); + +// Regression test for https://github.com/nodejs/node/issues/28786 +// Make sure that creating a heap snapshot inside an async_hooks hook +// works for Promises. + +const createSnapshot = common.mustCall(() => { + v8.getHeapSnapshot().resume(); +}, 8); // 2 × init + 2 × resolve + 1 × (after + before) + 2 × destroy = 8 calls + +const promiseIds = []; + +async_hooks.createHook({ + init(id, type) { + if (type === 'PROMISE') { + createSnapshot(); + promiseIds.push(id); + } + }, + + before(id) { + if (promiseIds.includes(id)) createSnapshot(); + }, + + after(id) { + if (promiseIds.includes(id)) createSnapshot(); + }, + + promiseResolve(id) { + assert(promiseIds.includes(id)); + createSnapshot(); + }, + + destroy(id) { + if (promiseIds.includes(id)) createSnapshot(); + } +}).enable(); + + +Promise.resolve().then(() => {}); +setImmediate(global.gc); From ed43880d6ba1ab6e499ef027c1e9e11a2376ba50 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 21 Jul 2019 00:15:32 -0400 Subject: [PATCH 160/162] tools: update ESLint to 6.1.0 Update ESLint to 6.1.0 PR-URL: https://github.com/nodejs/node/pull/28793 Reviewed-By: Yongsheng Zhang Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Jiawen Geng --- tools/node_modules/eslint/README.md | 6 +- tools/node_modules/eslint/bin/eslint.js | 3 + .../eslint/lib/cli-engine/cli-engine.js | 7 +- .../lib/cli-engine/config-array-factory.js | 2 +- .../eslint/lib/cli-engine/file-enumerator.js | 18 +- .../eslint/lib/init/config-initializer.js | 28 +- .../node_modules/eslint/lib/linter/linter.js | 2 +- .../eslint/lib/rule-tester/rule-tester.js | 2 +- .../eslint/lib/rules/arrow-body-style.js | 4 +- .../eslint/lib/rules/dot-location.js | 38 +- .../eslint/lib/rules/no-extra-parens.js | 258 +- .../eslint/lib/rules/no-param-reassign.js | 13 +- .../eslint/lib/rules/prefer-const.js | 12 +- .../eslint/lib/rules/utils/ast-utils.js | 27 +- .../lib/{cli-engine => shared}/naming.js | 0 .../node_modules/@babel/code-frame/LICENSE | 2 +- .../@babel/code-frame/lib/index.js | 6 +- .../@babel/code-frame/package.json | 6 +- .../node_modules/@babel/highlight/LICENSE | 2 +- .../@babel/highlight/package.json | 6 +- .../eslint/node_modules/acorn/README.md | 5 +- .../eslint/node_modules/acorn/dist/acorn.js | 9386 ++++++++--------- .../eslint/node_modules/acorn/dist/acorn.mjs | 832 +- .../eslint/node_modules/acorn/dist/bin.js | 12 +- .../eslint/node_modules/acorn/package.json | 2 +- .../eslint/node_modules/ajv/README.md | 23 +- .../node_modules/ajv/dist/ajv.bundle.js | 177 +- .../eslint/node_modules/ajv/dist/ajv.min.js | 4 +- .../node_modules/ajv/lib/definition_schema.js | 37 + .../node_modules/ajv/lib/dot/definitions.def | 4 +- .../node_modules/ajv/lib/dotjs/allOf.js | 2 +- .../node_modules/ajv/lib/dotjs/anyOf.js | 2 +- .../node_modules/ajv/lib/dotjs/contains.js | 2 +- .../ajv/lib/dotjs/dependencies.js | 2 +- .../eslint/node_modules/ajv/lib/dotjs/if.js | 4 +- .../node_modules/ajv/lib/dotjs/items.js | 6 +- .../eslint/node_modules/ajv/lib/dotjs/not.js | 2 +- .../node_modules/ajv/lib/dotjs/oneOf.js | 2 +- .../node_modules/ajv/lib/dotjs/properties.js | 4 +- .../ajv/lib/dotjs/propertyNames.js | 2 +- .../node_modules/ajv/lib/dotjs/required.js | 2 +- .../eslint/node_modules/ajv/lib/keyword.js | 34 +- .../eslint/node_modules/ajv/package.json | 12 +- .../cross-spawn/node_modules/semver/LICENSE | 15 + .../cross-spawn/node_modules/semver/README.md | 411 + .../node_modules}/semver/bin/semver | 0 .../node_modules/semver/package.json | 37 + .../cross-spawn/node_modules/semver/range.bnf | 16 + .../cross-spawn/node_modules/semver/semver.js | 1483 +++ .../node_modules/eslint-scope/lib/index.js | 4 +- .../eslint-scope/lib/referencer.js | 60 +- .../node_modules/eslint-scope/lib/scope.js | 89 +- .../node_modules/eslint-scope/package.json | 21 +- .../eslint/node_modules/eslint-utils/index.js | 305 +- .../node_modules/eslint-utils/index.mjs | 295 +- .../node_modules/eslint-utils/package.json | 24 +- .../node_modules/external-editor/README.md | 21 +- .../main/errors/CreateFileError.js | 2 +- .../main/errors/LaunchEditorError.js | 2 +- .../main/errors/ReadFileError.js | 2 +- .../main/errors/RemoveFileError.js | 2 +- .../external-editor/main/index.js | 24 +- .../node_modules/external-editor/package.json | 11 +- .../eslint/node_modules/glob-parent/LICENSE | 2 +- .../eslint/node_modules/glob-parent/README.md | 63 +- .../eslint/node_modules/glob-parent/index.js | 38 +- .../node_modules/is-glob/README.md | 142 - .../glob-parent/node_modules/is-glob/index.js | 25 - .../node_modules/is-glob/package.json | 96 - .../node_modules/glob-parent/package.json | 48 +- .../node_modules/import-fresh/package.json | 8 +- .../node_modules/import-fresh/readme.md | 14 +- .../eslint/node_modules/inquirer/README.md | 5 + .../inquirer/lib/prompts/input.js | 2 + .../inquirer/lib/prompts/password.js | 5 + .../inquirer/node_modules/strip-ansi/index.js | 7 - .../eslint/node_modules/inquirer/package.json | 6 +- .../eslint/node_modules/lodash/LICENSE | 2 +- .../eslint/node_modules/lodash/README.md | 6 +- .../eslint/node_modules/lodash/_baseClone.js | 8 +- .../eslint/node_modules/lodash/_baseMerge.js | 2 +- .../node_modules/lodash/_createRound.js | 8 +- .../eslint/node_modules/lodash/_safeGet.js | 6 +- .../eslint/node_modules/lodash/core.js | 4 +- .../eslint/node_modules/lodash/core.min.js | 2 +- .../eslint/node_modules/lodash/debounce.js | 1 + .../eslint/node_modules/lodash/lodash.js | 43 +- .../eslint/node_modules/lodash/lodash.min.js | 236 +- .../eslint/node_modules/lodash/package.json | 11 +- .../eslint/node_modules/lodash/template.js | 19 +- .../eslint/node_modules/path-dirname/index.js | 143 - .../eslint/node_modules/path-dirname/license | 22 - .../node_modules/path-dirname/package.json | 40 - .../node_modules/path-dirname/readme.md | 53 - .../eslint/node_modules/semver/README.md | 62 +- .../node_modules/semver/bin/.semver.js.swp | Bin 0 -> 16384 bytes .../eslint/node_modules/semver/bin/semver.js | 174 + .../eslint/node_modules/semver/package.json | 8 +- .../eslint/node_modules/semver/semver.js | 152 +- .../node_modules/strip-ansi/index.js | 4 + .../node_modules/strip-ansi}/license | 0 .../node_modules/strip-ansi/package.json | 18 +- .../node_modules/strip-ansi/readme.md | 24 +- .../eslint/node_modules/strip-ansi/index.js | 5 +- .../node_modules/ansi-regex/index.js | 0 .../node_modules/ansi-regex}/license | 0 .../node_modules/ansi-regex/package.json | 0 .../node_modules/ansi-regex/readme.md | 0 .../node_modules/strip-ansi/package.json | 18 +- .../eslint/node_modules/strip-ansi/readme.md | 24 +- .../node_modules/strip-json-comments/index.js | 69 +- .../node_modules/strip-json-comments/license | 20 +- .../strip-json-comments/package.json | 19 +- .../strip-json-comments/readme.md | 28 +- .../node_modules/table/dist/alignString.js | 2 +- .../table/dist/alignString.js.flow | 2 +- .../table/node_modules/ansi-regex/index.js | 14 - .../table/node_modules/ansi-regex/license | 9 - .../node_modules/ansi-regex/package.json | 62 - .../table/node_modules/ansi-regex/readme.md | 87 - .../table/node_modules/strip-ansi/index.js | 7 - .../table/node_modules/strip-ansi/license | 9 - .../node_modules/strip-ansi/package.json | 63 - .../table/node_modules/strip-ansi/readme.md | 61 - .../eslint/node_modules/table/package.json | 40 +- .../eslint/node_modules/tslib/README.md | 12 +- .../eslint/node_modules/tslib/tslib.es6.js | 24 +- .../eslint/node_modules/tslib/tslib.js | 48 +- .../is-glob => v8-compile-cache}/LICENSE | 10 +- .../node_modules/v8-compile-cache/README.md | 53 + .../v8-compile-cache/package.json | 42 + .../v8-compile-cache/v8-compile-cache.js | 365 + .../node_modules/xtend/{LICENCE => LICENSE} | 1 + .../eslint/node_modules/xtend/Makefile | 4 - .../eslint/node_modules/xtend/README.md | 4 +- .../eslint/node_modules/xtend/package.json | 2 +- tools/node_modules/eslint/package.json | 35 +- 137 files changed, 9639 insertions(+), 6833 deletions(-) rename tools/node_modules/eslint/lib/{cli-engine => shared}/naming.js (100%) create mode 100644 tools/node_modules/eslint/node_modules/ajv/lib/definition_schema.js create mode 100644 tools/node_modules/eslint/node_modules/cross-spawn/node_modules/semver/LICENSE create mode 100644 tools/node_modules/eslint/node_modules/cross-spawn/node_modules/semver/README.md rename tools/node_modules/eslint/node_modules/{ => cross-spawn/node_modules}/semver/bin/semver (100%) create mode 100644 tools/node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json create mode 100644 tools/node_modules/eslint/node_modules/cross-spawn/node_modules/semver/range.bnf create mode 100644 tools/node_modules/eslint/node_modules/cross-spawn/node_modules/semver/semver.js delete mode 100644 tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md delete mode 100644 tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js delete mode 100644 tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json delete mode 100644 tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/index.js delete mode 100644 tools/node_modules/eslint/node_modules/path-dirname/index.js delete mode 100644 tools/node_modules/eslint/node_modules/path-dirname/license delete mode 100644 tools/node_modules/eslint/node_modules/path-dirname/package.json delete mode 100644 tools/node_modules/eslint/node_modules/path-dirname/readme.md create mode 100644 tools/node_modules/eslint/node_modules/semver/bin/.semver.js.swp create mode 100755 tools/node_modules/eslint/node_modules/semver/bin/semver.js create mode 100644 tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js rename tools/node_modules/eslint/node_modules/{inquirer/node_modules/ansi-regex => string-width/node_modules/strip-ansi}/license (100%) rename tools/node_modules/eslint/node_modules/{inquirer => string-width}/node_modules/strip-ansi/package.json (76%) rename tools/node_modules/eslint/node_modules/{inquirer => string-width}/node_modules/strip-ansi/readme.md (50%) rename tools/node_modules/eslint/node_modules/{inquirer => strip-ansi}/node_modules/ansi-regex/index.js (100%) rename tools/node_modules/eslint/node_modules/{inquirer/node_modules/strip-ansi => strip-ansi/node_modules/ansi-regex}/license (100%) rename tools/node_modules/eslint/node_modules/{inquirer => strip-ansi}/node_modules/ansi-regex/package.json (100%) rename tools/node_modules/eslint/node_modules/{inquirer => strip-ansi}/node_modules/ansi-regex/readme.md (100%) delete mode 100644 tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/index.js delete mode 100644 tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/license delete mode 100644 tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/package.json delete mode 100644 tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/readme.md delete mode 100644 tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/index.js delete mode 100644 tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/license delete mode 100644 tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/package.json delete mode 100644 tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/readme.md rename tools/node_modules/eslint/node_modules/{glob-parent/node_modules/is-glob => v8-compile-cache}/LICENSE (88%) create mode 100644 tools/node_modules/eslint/node_modules/v8-compile-cache/README.md create mode 100644 tools/node_modules/eslint/node_modules/v8-compile-cache/package.json create mode 100644 tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js rename tools/node_modules/eslint/node_modules/xtend/{LICENCE => LICENSE} (97%) delete mode 100644 tools/node_modules/eslint/node_modules/xtend/Makefile diff --git a/tools/node_modules/eslint/README.md b/tools/node_modules/eslint/README.md index efc9d7a48d9f22..18d15249fe478c 100644 --- a/tools/node_modules/eslint/README.md +++ b/tools/node_modules/eslint/README.md @@ -258,9 +258,9 @@ The following companies, organizations, and individuals support ESLint's ongoing

    Gold Sponsors

    -

    Shopify Salesforce Badoo Airbnb Facebook Open Source

    Silver Sponsors

    -

    AMP Project

    Bronze Sponsors

    -

    clay Discord ThemeIsle TekHattan Marfeel Fire Stick Tricks JSHeroes Faithlife

    +

    Shopify Salesforce Badoo Airbnb Facebook Open Source

    Silver Sponsors

    +

    AMP Project

    Bronze Sponsors

    +

    clay Discord ThemeIsle TekHattan Marfeel Fire Stick Tricks JSHeroes Faithlife

    ## Technology Sponsors diff --git a/tools/node_modules/eslint/bin/eslint.js b/tools/node_modules/eslint/bin/eslint.js index b6b14d3a2ba79b..061e94767f0b92 100755 --- a/tools/node_modules/eslint/bin/eslint.js +++ b/tools/node_modules/eslint/bin/eslint.js @@ -9,6 +9,9 @@ "use strict"; +// to use V8's code cache to speed up instantiation time +require("v8-compile-cache"); + //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ diff --git a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js index 81e1b07c83e9fa..7f80887f086464 100644 --- a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js +++ b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js @@ -20,6 +20,7 @@ const path = require("path"); const defaultOptions = require("../../conf/default-cli-options"); const pkg = require("../../package.json"); const ConfigOps = require("../shared/config-ops"); +const naming = require("../shared/naming"); const ModuleResolver = require("../shared/relative-module-resolver"); const { Linter } = require("../linter"); const builtInRules = require("../rules"); @@ -29,7 +30,6 @@ const { FileEnumerator } = require("./file-enumerator"); const hash = require("./hash"); const { IgnoredPaths } = require("./ignored-paths"); const LintResultCache = require("./lint-result-cache"); -const naming = require("./naming"); const debug = require("debug")("eslint:cli-engine"); const validFixTypes = new Set(["problem", "suggestion", "layout"]); @@ -734,7 +734,10 @@ class CLIEngine { try { fs.unlinkSync(cacheFilePath); } catch (error) { - if (!error || error.code !== "ENOENT") { + const errorCode = error && error.code; + + // Ignore errors when no such file exists or file system is read only (and cache file does not exist) + if (errorCode !== "ENOENT" && !(errorCode === "EROFS" && !fs.existsSync(cacheFilePath))) { throw error; } } diff --git a/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js b/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js index 782bb1d148f4bb..95430c358df754 100644 --- a/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js +++ b/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js @@ -38,9 +38,9 @@ const path = require("path"); const importFresh = require("import-fresh"); const stripComments = require("strip-json-comments"); const { validateConfigSchema } = require("../shared/config-validator"); +const naming = require("../shared/naming"); const ModuleResolver = require("../shared/relative-module-resolver"); const { ConfigArray, ConfigDependency, OverrideTester } = require("./config-array"); -const naming = require("./naming"); const debug = require("debug")("eslint:config-array-factory"); //------------------------------------------------------------------------------ diff --git a/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js b/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js index 2840d9fe2da75a..a027359ae511b1 100644 --- a/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js +++ b/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js @@ -292,26 +292,18 @@ class FileEnumerator { _iterateFiles(pattern) { const { cwd, globInputPaths } = internalSlotsMap.get(this); const absolutePath = path.resolve(cwd, pattern); - - if (globInputPaths && isGlobPattern(pattern)) { - return this._iterateFilesWithGlob( - absolutePath, - dotfilesPattern.test(pattern) - ); - } - + const isDot = dotfilesPattern.test(pattern); const stat = statSafeSync(absolutePath); if (stat && stat.isDirectory()) { - return this._iterateFilesWithDirectory( - absolutePath, - dotfilesPattern.test(pattern) - ); + return this._iterateFilesWithDirectory(absolutePath, isDot); } - if (stat && stat.isFile()) { return this._iterateFilesWithFile(absolutePath); } + if (globInputPaths && isGlobPattern(pattern)) { + return this._iterateFilesWithGlob(absolutePath, isDot); + } return []; } diff --git a/tools/node_modules/eslint/lib/init/config-initializer.js b/tools/node_modules/eslint/lib/init/config-initializer.js index 4d52377d26789a..17aa96505a3fe4 100644 --- a/tools/node_modules/eslint/lib/init/config-initializer.js +++ b/tools/node_modules/eslint/lib/init/config-initializer.js @@ -18,6 +18,7 @@ const util = require("util"), recConfig = require("../../conf/eslint-recommended"), ConfigOps = require("../shared/config-ops"), log = require("../shared/logging"), + naming = require("../shared/naming"), ModuleResolver = require("../shared/relative-module-resolver"), autoconfig = require("./autoconfig.js"), ConfigFile = require("./config-file"), @@ -97,17 +98,26 @@ function getModulesList(config, installESLint) { // Create a list of modules which should be installed based on config if (config.plugins) { for (const plugin of config.plugins) { - modules[`eslint-plugin-${plugin}`] = "latest"; + const moduleName = naming.normalizePackageName(plugin, "eslint-plugin"); + + modules[moduleName] = "latest"; } } - if (config.extends && config.extends.indexOf("eslint:") === -1) { - const moduleName = `eslint-config-${config.extends}`; - - modules[moduleName] = "latest"; - Object.assign( - modules, - getPeerDependencies(`${moduleName}@latest`) - ); + if (config.extends) { + const extendList = Array.isArray(config.extends) ? config.extends : [config.extends]; + + for (const extend of extendList) { + if (extend.startsWith("eslint:") || extend.startsWith("plugin:")) { + continue; + } + const moduleName = naming.normalizePackageName(extend, "eslint-config"); + + modules[moduleName] = "latest"; + Object.assign( + modules, + getPeerDependencies(`${moduleName}@latest`) + ); + } } if (installESLint === false) { diff --git a/tools/node_modules/eslint/lib/linter/linter.js b/tools/node_modules/eslint/lib/linter/linter.js index 6324706974674b..a49d850859b392 100644 --- a/tools/node_modules/eslint/lib/linter/linter.js +++ b/tools/node_modules/eslint/lib/linter/linter.js @@ -262,7 +262,7 @@ function createDisableDirectives(options) { */ function getDirectiveComments(filename, ast, ruleMapper) { const configuredRules = {}; - const enabledGlobals = {}; + const enabledGlobals = Object.create(null); const exportedVariables = {}; const problems = []; const disableDirectives = []; diff --git a/tools/node_modules/eslint/lib/rule-tester/rule-tester.js b/tools/node_modules/eslint/lib/rule-tester/rule-tester.js index 81f3a2fc4e7c24..0d1319c11a2fdc 100644 --- a/tools/node_modules/eslint/lib/rule-tester/rule-tester.js +++ b/tools/node_modules/eslint/lib/rule-tester/rule-tester.js @@ -549,8 +549,8 @@ class RuleTester { assert(false, `Invalid messageId '${error.messageId}'. Expected one of ${friendlyIDList}.`); } assert.strictEqual( - error.messageId, message.messageId, + error.messageId, `messageId '${message.messageId}' does not match expected messageId '${error.messageId}'.` ); if (hasOwnProperty(error, "data")) { diff --git a/tools/node_modules/eslint/lib/rules/arrow-body-style.js b/tools/node_modules/eslint/lib/rules/arrow-body-style.js index 6d84c7adfb1187..8d3b400037a6d5 100644 --- a/tools/node_modules/eslint/lib/rules/arrow-body-style.js +++ b/tools/node_modules/eslint/lib/rules/arrow-body-style.js @@ -175,10 +175,10 @@ module.exports = { } /* - * If the first token of the reutrn value is `{`, + * If the first token of the reutrn value is `{` or the return value is a sequence expression, * enclose the return value by parentheses to avoid syntax error. */ - if (astUtils.isOpeningBraceToken(firstValueToken)) { + if (astUtils.isOpeningBraceToken(firstValueToken) || blockBody[0].argument.type === "SequenceExpression") { fixes.push( fixer.insertTextBefore(firstValueToken, "("), fixer.insertTextAfter(lastValueToken, ")") diff --git a/tools/node_modules/eslint/lib/rules/dot-location.js b/tools/node_modules/eslint/lib/rules/dot-location.js index b9857ae2394ed8..c2e734a1a0b141 100644 --- a/tools/node_modules/eslint/lib/rules/dot-location.js +++ b/tools/node_modules/eslint/lib/rules/dot-location.js @@ -54,29 +54,31 @@ module.exports = { */ function checkDotLocation(obj, prop, node) { const dot = sourceCode.getTokenBefore(prop); - const textBeforeDot = sourceCode.getText().slice(obj.range[1], dot.range[0]); + + // `obj` expression can be parenthesized, but those paren tokens are not a part of the `obj` node. + const tokenBeforeDot = sourceCode.getTokenBefore(dot); + + const textBeforeDot = sourceCode.getText().slice(tokenBeforeDot.range[1], dot.range[0]); const textAfterDot = sourceCode.getText().slice(dot.range[1], prop.range[0]); - if (dot.type === "Punctuator" && dot.value === ".") { - if (onObject) { - if (!astUtils.isTokenOnSameLine(obj, dot)) { - const neededTextAfterObj = astUtils.isDecimalInteger(obj) ? " " : ""; - - context.report({ - node, - loc: dot.loc.start, - messageId: "expectedDotAfterObject", - fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${neededTextAfterObj}.${textBeforeDot}${textAfterDot}`) - }); - } - } else if (!astUtils.isTokenOnSameLine(dot, prop)) { + if (onObject) { + if (!astUtils.isTokenOnSameLine(tokenBeforeDot, dot)) { + const neededTextAfterToken = astUtils.isDecimalIntegerNumericToken(tokenBeforeDot) ? " " : ""; + context.report({ node, loc: dot.loc.start, - messageId: "expectedDotBeforeProperty", - fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${textBeforeDot}${textAfterDot}.`) + messageId: "expectedDotAfterObject", + fix: fixer => fixer.replaceTextRange([tokenBeforeDot.range[1], prop.range[0]], `${neededTextAfterToken}.${textBeforeDot}${textAfterDot}`) }); } + } else if (!astUtils.isTokenOnSameLine(dot, prop)) { + context.report({ + node, + loc: dot.loc.start, + messageId: "expectedDotBeforeProperty", + fix: fixer => fixer.replaceTextRange([tokenBeforeDot.range[1], prop.range[0]], `${textBeforeDot}${textAfterDot}.`) + }); } } @@ -86,7 +88,9 @@ module.exports = { * @returns {void} */ function checkNode(node) { - checkDotLocation(node.object, node.property, node); + if (!node.computed) { + checkDotLocation(node.object, node.property, node); + } } return { diff --git a/tools/node_modules/eslint/lib/rules/no-extra-parens.js b/tools/node_modules/eslint/lib/rules/no-extra-parens.js index 98fc49654cb951..6c3198b5f02bd1 100644 --- a/tools/node_modules/eslint/lib/rules/no-extra-parens.js +++ b/tools/node_modules/eslint/lib/rules/no-extra-parens.js @@ -81,6 +81,8 @@ module.exports = { const PRECEDENCE_OF_ASSIGNMENT_EXPR = precedence({ type: "AssignmentExpression" }); const PRECEDENCE_OF_UPDATE_EXPR = precedence({ type: "UpdateExpression" }); + let reportsBuffer; + /** * Determines if this rule should be enforced for a node given the current configuration. * @param {ASTNode} node - The node to be checked. @@ -316,19 +318,33 @@ module.exports = { } } - context.report({ - node, - loc: leftParenToken.loc.start, - messageId: "unexpected", - fix(fixer) { - const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]); + /** + * Finishes reporting + * @returns {void} + * @private + */ + function finishReport() { + context.report({ + node, + loc: leftParenToken.loc.start, + messageId: "unexpected", + fix(fixer) { + const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]); + + return fixer.replaceTextRange([ + leftParenToken.range[0], + rightParenToken.range[1] + ], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : "")); + } + }); + } - return fixer.replaceTextRange([ - leftParenToken.range[0], - rightParenToken.range[1] - ], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : "")); - } - }); + if (reportsBuffer) { + reportsBuffer.reports.push({ node, finishReport }); + return; + } + + finishReport(); } /** @@ -498,6 +514,126 @@ module.exports = { } } + /** + * Finds the path from the given node to the specified ancestor. + * @param {ASTNode} node First node in the path. + * @param {ASTNode} ancestor Last node in the path. + * @returns {ASTNode[]} Path, including both nodes. + * @throws {Error} If the given node does not have the specified ancestor. + */ + function pathToAncestor(node, ancestor) { + const path = [node]; + let currentNode = node; + + while (currentNode !== ancestor) { + + currentNode = currentNode.parent; + + /* istanbul ignore if */ + if (currentNode === null) { + throw new Error("Nodes are not in the ancestor-descendant relationship."); + } + + path.push(currentNode); + } + + return path; + } + + /** + * Finds the path from the given node to the specified descendant. + * @param {ASTNode} node First node in the path. + * @param {ASTNode} descendant Last node in the path. + * @returns {ASTNode[]} Path, including both nodes. + * @throws {Error} If the given node does not have the specified descendant. + */ + function pathToDescendant(node, descendant) { + return pathToAncestor(descendant, node).reverse(); + } + + /** + * Checks whether the syntax of the given ancestor of an 'in' expression inside a for-loop initializer + * is preventing the 'in' keyword from being interpreted as a part of an ill-formed for-in loop. + * + * @param {ASTNode} node Ancestor of an 'in' expression. + * @param {ASTNode} child Child of the node, ancestor of the same 'in' expression or the 'in' expression itself. + * @returns {boolean} True if the keyword 'in' would be interpreted as the 'in' operator, without any parenthesis. + */ + function isSafelyEnclosingInExpression(node, child) { + switch (node.type) { + case "ArrayExpression": + case "ArrayPattern": + case "BlockStatement": + case "ObjectExpression": + case "ObjectPattern": + case "TemplateLiteral": + return true; + case "ArrowFunctionExpression": + case "FunctionExpression": + return node.params.includes(child); + case "CallExpression": + case "NewExpression": + return node.arguments.includes(child); + case "MemberExpression": + return node.computed && node.property === child; + case "ConditionalExpression": + return node.consequent === child; + default: + return false; + } + } + + /** + * Starts a new reports buffering. Warnings will be stored in a buffer instead of being reported immediately. + * An additional logic that requires multiple nodes (e.g. a whole subtree) may dismiss some of the stored warnings. + * + * @returns {void} + */ + function startNewReportsBuffering() { + reportsBuffer = { + upper: reportsBuffer, + inExpressionNodes: [], + reports: [] + }; + } + + /** + * Ends the current reports buffering. + * @returns {void} + */ + function endCurrentReportsBuffering() { + const { upper, inExpressionNodes, reports } = reportsBuffer; + + if (upper) { + upper.inExpressionNodes.push(...inExpressionNodes); + upper.reports.push(...reports); + } else { + + // flush remaining reports + reports.forEach(({ finishReport }) => finishReport()); + } + + reportsBuffer = upper; + } + + /** + * Checks whether the given node is in the current reports buffer. + * @param {ASTNode} node Node to check. + * @returns {boolean} True if the node is in the current buffer, false otherwise. + */ + function isInCurrentReportsBuffer(node) { + return reportsBuffer.reports.some(r => r.node === node); + } + + /** + * Removes the given node from the current reports buffer. + * @param {ASTNode} node Node to remove. + * @returns {void} + */ + function removeFromCurrentReportsBuffer(node) { + reportsBuffer.reports = reportsBuffer.reports.filter(r => r.node !== node); + } + return { ArrayExpression(node) { node.elements @@ -540,7 +676,14 @@ module.exports = { } }, - BinaryExpression: checkBinaryLogical, + BinaryExpression(node) { + if (reportsBuffer && node.operator === "in") { + reportsBuffer.inExpressionNodes.push(node); + } + + checkBinaryLogical(node); + }, + CallExpression: checkCallNew, ConditionalExpression(node) { @@ -602,10 +745,6 @@ module.exports = { }, ForStatement(node) { - if (node.init && hasExcessParens(node.init)) { - report(node.init); - } - if (node.test && hasExcessParens(node.test) && !isCondAssignException(node)) { report(node.test); } @@ -613,6 +752,81 @@ module.exports = { if (node.update && hasExcessParens(node.update)) { report(node.update); } + + if (node.init) { + startNewReportsBuffering(); + + if (hasExcessParens(node.init)) { + report(node.init); + } + } + }, + + "ForStatement > *.init:exit"(node) { + + /* + * Removing parentheses around `in` expressions might change semantics and cause errors. + * + * For example, this valid for loop: + * for (let a = (b in c); ;); + * after removing parentheses would be treated as an invalid for-in loop: + * for (let a = b in c; ;); + */ + + if (reportsBuffer.reports.length) { + reportsBuffer.inExpressionNodes.forEach(inExpressionNode => { + const path = pathToDescendant(node, inExpressionNode); + let nodeToExclude; + + for (let i = 0; i < path.length; i++) { + const pathNode = path[i]; + + if (i < path.length - 1) { + const nextPathNode = path[i + 1]; + + if (isSafelyEnclosingInExpression(pathNode, nextPathNode)) { + + // The 'in' expression in safely enclosed by the syntax of its ancestor nodes (e.g. by '{}' or '[]'). + return; + } + } + + if (isParenthesised(pathNode)) { + if (isInCurrentReportsBuffer(pathNode)) { + + // This node was supposed to be reported, but parentheses might be necessary. + + if (isParenthesisedTwice(pathNode)) { + + /* + * This node is parenthesised twice, it certainly has at least one pair of `extra` parentheses. + * If the --fix option is on, the current fixing iteration will remove only one pair of parentheses. + * The remaining pair is safely enclosing the 'in' expression. + */ + return; + } + + // Exclude the outermost node only. + if (!nodeToExclude) { + nodeToExclude = pathNode; + } + + // Don't break the loop here, there might be some safe nodes or parentheses that will stay inside. + + } else { + + // This node will stay parenthesised, the 'in' expression in safely enclosed by '()'. + return; + } + } + } + + // Exclude the node from the list (i.e. treat parentheses as necessary) + removeFromCurrentReportsBuffer(nodeToExclude); + }); + } + + endCurrentReportsBuffering(); }, IfStatement(node) { @@ -664,6 +878,16 @@ module.exports = { }).forEach(property => report(property.value)); }, + Property(node) { + if (node.computed) { + const { key } = node; + + if (key && hasExcessParens(key) && precedence(key) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) { + report(key); + } + } + }, + ReturnStatement(node) { const returnToken = sourceCode.getFirstToken(node); diff --git a/tools/node_modules/eslint/lib/rules/no-param-reassign.js b/tools/node_modules/eslint/lib/rules/no-param-reassign.js index 880ff93cb53dc3..9b8c828d2c2a1d 100644 --- a/tools/node_modules/eslint/lib/rules/no-param-reassign.js +++ b/tools/node_modules/eslint/lib/rules/no-param-reassign.js @@ -67,7 +67,8 @@ module.exports = { let node = reference.identifier; let parent = node.parent; - while (parent && !stopNodePattern.test(parent.type)) { + while (parent && (!stopNodePattern.test(parent.type) || + parent.type === "ForInStatement" || parent.type === "ForOfStatement")) { switch (parent.type) { // e.g. foo.a = 0; @@ -85,6 +86,16 @@ module.exports = { } break; + // e.g. for (foo.a in b) {} + case "ForInStatement": + case "ForOfStatement": + if (parent.left === node) { + return true; + } + + // this is a stop node for parent.right and parent.body + return false; + // EXCLUDES: e.g. cache.get(foo.a).b = 0; case "CallExpression": if (parent.callee !== node) { diff --git a/tools/node_modules/eslint/lib/rules/prefer-const.js b/tools/node_modules/eslint/lib/rules/prefer-const.js index 68c07da4ed99e7..854da310e4be72 100644 --- a/tools/node_modules/eslint/lib/rules/prefer-const.js +++ b/tools/node_modules/eslint/lib/rules/prefer-const.js @@ -420,8 +420,9 @@ module.exports = { let shouldFix = varDeclParent && - // Don't do a fix unless the variable is initialized (or it's in a for-in or for-of loop) - (varDeclParent.parent.type === "ForInStatement" || varDeclParent.parent.type === "ForOfStatement" || varDeclParent.declarations[0].init) && + // Don't do a fix unless all variables in the declarations are initialized (or it's in a for-in or for-of loop) + (varDeclParent.parent.type === "ForInStatement" || varDeclParent.parent.type === "ForOfStatement" || + varDeclParent.declarations.every(declaration => declaration.init)) && /* * If options.destructuring is "all", then this warning will not occur unless @@ -450,7 +451,12 @@ module.exports = { node, messageId: "useConst", data: node, - fix: shouldFix ? fixer => fixer.replaceText(sourceCode.getFirstToken(varDeclParent), "const") : null + fix: shouldFix + ? fixer => fixer.replaceText( + sourceCode.getFirstToken(varDeclParent, t => t.value === varDeclParent.kind), + "const" + ) + : null }); }); } diff --git a/tools/node_modules/eslint/lib/rules/utils/ast-utils.js b/tools/node_modules/eslint/lib/rules/utils/ast-utils.js index 1aef4c162d40de..78ae7bc015778f 100644 --- a/tools/node_modules/eslint/lib/rules/utils/ast-utils.js +++ b/tools/node_modules/eslint/lib/rules/utils/ast-utils.js @@ -37,6 +37,8 @@ const LINEBREAKS = new Set(["\r\n", "\r", "\n", "\u2028", "\u2029"]); // A set of node types that can contain a list of statements const STATEMENT_LIST_PARENTS = new Set(["Program", "BlockStatement", "SwitchCase"]); +const DECIMAL_INTEGER_PATTERN = /^(0|[1-9]\d*)$/u; + /** * Checks reference if is non initializer and writable. * @param {Reference} reference - A reference to check. @@ -283,6 +285,16 @@ function isCommaToken(token) { return token.value === "," && token.type === "Punctuator"; } +/** + * Checks if the given token is a dot token or not. + * + * @param {Token} token - The token to check. + * @returns {boolean} `true` if the token is a dot token. + */ +function isDotToken(token) { + return token.value === "." && token.type === "Punctuator"; +} + /** * Checks if the given token is a semicolon token or not. * @@ -462,12 +474,14 @@ module.exports = { isColonToken, isCommaToken, isCommentToken, + isDotToken, isKeywordToken, isNotClosingBraceToken: negate(isClosingBraceToken), isNotClosingBracketToken: negate(isClosingBracketToken), isNotClosingParenToken: negate(isClosingParenToken), isNotColonToken: negate(isColonToken), isNotCommaToken: negate(isCommaToken), + isNotDotToken: negate(isDotToken), isNotOpeningBraceToken: negate(isOpeningBraceToken), isNotOpeningBracketToken: negate(isOpeningBracketToken), isNotOpeningParenToken: negate(isOpeningParenToken), @@ -988,7 +1002,18 @@ module.exports = { * '5' // false */ isDecimalInteger(node) { - return node.type === "Literal" && typeof node.value === "number" && /^(0|[1-9]\d*)$/u.test(node.raw); + return node.type === "Literal" && typeof node.value === "number" && + DECIMAL_INTEGER_PATTERN.test(node.raw); + }, + + /** + * Determines whether this token is a decimal integer numeric token. + * This is similar to isDecimalInteger(), but for tokens. + * @param {Token} token - The token to check. + * @returns {boolean} `true` if this token is a decimal integer. + */ + isDecimalIntegerNumericToken(token) { + return token.type === "Numeric" && DECIMAL_INTEGER_PATTERN.test(token.value); }, /** diff --git a/tools/node_modules/eslint/lib/cli-engine/naming.js b/tools/node_modules/eslint/lib/shared/naming.js similarity index 100% rename from tools/node_modules/eslint/lib/cli-engine/naming.js rename to tools/node_modules/eslint/lib/shared/naming.js diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/LICENSE b/tools/node_modules/eslint/node_modules/@babel/code-frame/LICENSE index 620366eb90071c..f31575ec773bb1 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/LICENSE +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2018 Sebastian McKenzie +Copyright (c) 2014-present Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js index 1f64c6ce7b992d..35176fbc0682ca 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js @@ -66,7 +66,7 @@ function getMarkerLines(loc, source, opts) { markerLines[lineNumber] = true; } else if (i === 0) { const sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn]; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; } else if (i === lineDiff) { markerLines[lineNumber] = [0, endColumn]; } else { @@ -102,7 +102,6 @@ function codeFrameColumns(rawLines, loc, opts = {}) { return highlighted ? chalkFn(string) : string; }; - if (highlighted) rawLines = (0, _highlight().default)(rawLines, opts); const lines = rawLines.split(NEWLINE); const { start, @@ -111,7 +110,8 @@ function codeFrameColumns(rawLines, loc, opts = {}) { } = getMarkerLines(loc, lines, opts); const hasColumns = loc.start && typeof loc.start.column === "number"; const numberMaxWidth = String(end).length; - let frame = lines.slice(start, end).map((line, index) => { + const highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines; + let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => { const number = start + 1 + index; const paddedNumber = ` ${number}`.slice(-numberMaxWidth); const gutter = ` ${paddedNumber} | `; diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json b/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json index f3b551dfa972de..d619d9a8f53194 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json @@ -13,13 +13,17 @@ "chalk": "^2.0.0", "strip-ansi": "^4.0.0" }, + "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", "homepage": "https://babeljs.io/", "license": "MIT", "main": "lib/index.js", "name": "@babel/code-frame", + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" }, - "version": "7.0.0" + "version": "7.5.5" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/@babel/highlight/LICENSE b/tools/node_modules/eslint/node_modules/@babel/highlight/LICENSE index 620366eb90071c..f31575ec773bb1 100644 --- a/tools/node_modules/eslint/node_modules/@babel/highlight/LICENSE +++ b/tools/node_modules/eslint/node_modules/@babel/highlight/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2018 Sebastian McKenzie +Copyright (c) 2014-present Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/tools/node_modules/eslint/node_modules/@babel/highlight/package.json b/tools/node_modules/eslint/node_modules/@babel/highlight/package.json index ff84c66ec29732..9c16718356c0a9 100644 --- a/tools/node_modules/eslint/node_modules/@babel/highlight/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/highlight/package.json @@ -14,13 +14,17 @@ "devDependencies": { "strip-ansi": "^4.0.0" }, + "gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4", "homepage": "https://babeljs.io/", "license": "MIT", "main": "lib/index.js", "name": "@babel/highlight", + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", "url": "https://github.com/babel/babel/tree/master/packages/babel-highlight" }, - "version": "7.0.0" + "version": "7.5.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/acorn/README.md b/tools/node_modules/eslint/node_modules/acorn/README.md index 3e5f58d95dea95..fa372ee6821bab 100644 --- a/tools/node_modules/eslint/node_modules/acorn/README.md +++ b/tools/node_modules/eslint/node_modules/acorn/README.md @@ -54,7 +54,7 @@ an object containing any of these fields: - **ecmaVersion**: Indicates the ECMAScript version to parse. Must be either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018) or 10 (2019, partial support). This influences support for strict mode, the set of - reserved words, and support for new syntax features. Default is 7. + reserved words, and support for new syntax features. Default is 9. **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being implemented by Acorn. Other proposed new features can be implemented @@ -260,10 +260,7 @@ The utility spits out the syntax tree as JSON data. Plugins for ECMAScript proposals: - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: - - [`acorn-async-iteration`](https://github.com/acornjs/acorn-async-iteration): Parse [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - - [`acorn-bigint`](https://github.com/acornjs/acorn-bigint): Parse [BigInt proposal](https://github.com/tc39/proposal-bigint) - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields) - - [`acorn-dynamic-import`](https://github.com/kesne/acorn-dynamic-import): Parse [import() proposal](https://github.com/tc39/proposal-dynamic-import) - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) - [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator) - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n diff --git a/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js b/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js index 0f5bce21806b4d..ae755fa230043f 100644 --- a/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js +++ b/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js @@ -1,5018 +1,4970 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.acorn = {}))); -}(this, (function (exports) { 'use strict'; - -// Reserved word lists for various dialects of the language - -var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" -}; - -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: ecma5AndLessKeywords, - 6: ecma5AndLessKeywords + " const class extends export import super" -}; - -var keywordRelationalOperator = /^in(stanceof)?$/; - -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `bin/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7b9\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; -var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by bin/generate-identifier-regex.js - -// eslint-disable-next-line comma-spacing -var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; - -// eslint-disable-next-line comma-spacing -var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { return false } - pos += set[i + 1]; - if (pos >= code) { return true } - } -} - -// Test whether a given character code starts an identifier. - -function isIdentifierStart(code, astral) { - if (code < 65) { return code === 36 } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) -} - -// Test whether a given character is part of an identifier. - -function isIdentifierChar(code, astral) { - if (code < 48) { return code === 36 } - if (code < 58) { return true } - if (code < 65) { return false } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) -} - -// ## Token types - -// The assignment of fine-grained, information-carrying type objects -// allows the tokenizer to store the information it has about a -// token in a way that is very cheap for the parser to look up. - -// All token type variables start with an underscore, to make them -// easy to recognize. - -// The `beforeExpr` property is used to disambiguate between regular -// expressions and divisions. It is set on all token types that can -// be followed by an expression (thus, a slash after them would be a -// regular expression). -// -// The `startsExpr` property is used to check if the token ends a -// `yield` expression. It is set on all token types that either can -// directly start an expression (like a quotation mark) or can -// continue an expression (like the body of a string). -// -// `isLoop` marks a keyword as starting a loop, which is important -// to know when parsing a label, in order to allow or disallow -// continue jumps to that label. - -var TokenType = function TokenType(label, conf) { - if ( conf === void 0 ) conf = {}; - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; -}; - -function binop(name, prec) { - return new TokenType(name, {beforeExpr: true, binop: prec}) -} -var beforeExpr = {beforeExpr: true}; -var startsExpr = {startsExpr: true}; - -// Map keyword names to token types. - -var keywords$1 = {}; - -// Succinct definitions of keyword token types -function kw(name, options) { - if ( options === void 0 ) options = {}; - - options.keyword = name; - return keywords$1[name] = new TokenType(name, options) -} - -var types = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), - bracketR: new TokenType("]"), - braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), - braceR: new TokenType("}"), - parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - invalidTemplate: new TokenType("invalidTemplate"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", {beforeExpr: true, isAssign: true}), - assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), - incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), - prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=/===/!==", 6), - relational: binop("/<=/>=", 7), - bitShift: binop("<>/>>>", 8), - plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", {beforeExpr: true}), - - // Keyword token types. - _break: kw("break"), - _case: kw("case", beforeExpr), - _catch: kw("catch"), - _continue: kw("continue"), - _debugger: kw("debugger"), - _default: kw("default", beforeExpr), - _do: kw("do", {isLoop: true, beforeExpr: true}), - _else: kw("else", beforeExpr), - _finally: kw("finally"), - _for: kw("for", {isLoop: true}), - _function: kw("function", startsExpr), - _if: kw("if"), - _return: kw("return", beforeExpr), - _switch: kw("switch"), - _throw: kw("throw", beforeExpr), - _try: kw("try"), - _var: kw("var"), - _const: kw("const"), - _while: kw("while", {isLoop: true}), - _with: kw("with"), - _new: kw("new", {beforeExpr: true, startsExpr: true}), - _this: kw("this", startsExpr), - _super: kw("super", startsExpr), - _class: kw("class", startsExpr), - _extends: kw("extends", beforeExpr), - _export: kw("export"), - _import: kw("import"), - _null: kw("null", startsExpr), - _true: kw("true", startsExpr), - _false: kw("false", startsExpr), - _in: kw("in", {beforeExpr: true, binop: 7}), - _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), - _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), - _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), - _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) -}; - -// Matches a whole line break (where CRLF is considered a single -// line break). Used to count lines. - -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); - -function isNewLine(code, ecma2019String) { - return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) -} - -var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - -var ref = Object.prototype; -var hasOwnProperty = ref.hasOwnProperty; -var toString = ref.toString; - -// Checks if an object has a property. - -function has(obj, propName) { - return hasOwnProperty.call(obj, propName) -} - -var isArray = Array.isArray || (function (obj) { return ( - toString.call(obj) === "[object Array]" -); }); - -function wordsRegexp(words) { - return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") -} - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = function Position(line, col) { - this.line = line; - this.column = col; -}; - -Position.prototype.offset = function offset (n) { - return new Position(this.line, this.column + n) -}; - -var SourceLocation = function SourceLocation(p, start, end) { - this.start = start; - this.end = end; - if (p.sourceFile !== null) { this.source = p.sourceFile; } -}; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur) + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.acorn = {})); +}(this, function (exports) { 'use strict'; + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }; + + // And the keywords + + var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; + + var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " const class extends export import super" + }; + + var keywordRelationalOperator = /^in(stanceof)?$/; + + // ## Character categories + + // Big ugly regular expressions that match characters in the + // whitespace, identifier, and identifier-start categories. These + // are only applied when a character is found to actually have a + // code point above 128. + // Generated by `bin/generate-identifier-regex.js`. + var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; + + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. They were + // generated by bin/generate-identifier-regex.js + + // eslint-disable-next-line comma-spacing + var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; + + // eslint-disable-next-line comma-spacing + var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239]; + + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { return false } + pos += set[i + 1]; + if (pos >= code) { return true } } } -} - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must be - // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 - // (2019). This influences support for strict mode, the set of - // reserved words, and support for new syntax features. The default - // is 9. - ecmaVersion: 9, - // `sourceType` indicates the mode the code should be parsed in. - // Can be either `"script"` or `"module"`. This influences global - // strict mode and parsing of `import` and `export` declarations. - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // the position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, await identifiers are allowed to appear at the top-level scope, - // but they are still not allowed in non-async functions. - allowAwaitOutsideFunction: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false -}; - -// Interpret and default an options object - -function getOptions(opts) { - var options = {}; - - for (var opt in defaultOptions) - { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - - if (options.ecmaVersion >= 2015) - { options.ecmaVersion -= 2009; } - - if (options.allowReserved == null) - { options.allowReserved = options.ecmaVersion < 5; } - - if (isArray(options.onToken)) { - var tokens = options.onToken; - options.onToken = function (token) { return tokens.push(token); }; - } - if (isArray(options.onComment)) - { options.onComment = pushComment(options, options.onComment); } - - return options -} - -function pushComment(options, array) { - return function(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) - { comment.loc = new SourceLocation(this, startLoc, endLoc); } - if (options.ranges) - { comment.range = [start, end]; } - array.push(comment); - } -} - -// Each scope gets a bitset that may contain these flags -var SCOPE_TOP = 1; -var SCOPE_FUNCTION = 2; -var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION; -var SCOPE_ASYNC = 4; -var SCOPE_GENERATOR = 8; -var SCOPE_ARROW = 16; -var SCOPE_SIMPLE_CATCH = 32; -var SCOPE_SUPER = 64; -var SCOPE_DIRECT_SUPER = 128; - -function functionFlags(async, generator) { - return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) -} - -// Used in checkLVal and declareName to determine the type of a binding -var BIND_NONE = 0; -var BIND_VAR = 1; -var BIND_LEXICAL = 2; -var BIND_FUNCTION = 3; -var BIND_SIMPLE_CATCH = 4; -var BIND_OUTSIDE = 5; // Special case for function names as bound inside the function - -var Parser = function Parser(options, input, startPos) { - this.options = options = getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]); - var reserved = ""; - if (!options.allowReserved) { - for (var v = options.ecmaVersion;; v--) - { if (reserved = reservedWords[v]) { break } } - if (options.sourceType === "module") { reserved += " await"; } - } - this.reservedWords = wordsRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; - this.reservedWordsStrict = wordsRegexp(reservedStrict); - this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - // Properties of the current token: - // Its type - this.type = types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.inModule = options.sourceType === "module"; - this.strict = this.inModule || this.strictDirective(this.pos); - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Positions to delayed-check that yield/await does not exist in default parameters. - this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; - // Labels in scope. - this.labels = []; - // Thus-far undefined exports. - this.undefinedExports = {}; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") - { this.skipLineComment(2); } - - // Scope tracking for duplicate variable names (see scope.js) - this.scopeStack = []; - this.enterScope(SCOPE_TOP); - - // For RegExp validation - this.regexpState = null; -}; - -var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - -Parser.prototype.parse = function parse () { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node) -}; - -prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; -prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; -prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; -prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; -prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; -prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - -// Switch to a getter for 7.0.0. -Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; - -Parser.extend = function extend () { - var plugins = [], len = arguments.length; - while ( len-- ) plugins[ len ] = arguments[ len ]; - - var cls = this; - for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } - return cls -}; - -Parser.parse = function parse (input, options) { - return new this(options, input).parse() -}; - -Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { - var parser = new this(options, input, pos); - parser.nextToken(); - return parser.parseExpression() -}; - -Parser.tokenizer = function tokenizer (input, options) { - return new this(options, input) -}; - -Object.defineProperties( Parser.prototype, prototypeAccessors ); - -var pp = Parser.prototype; - -// ## Parser utilities - -var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; -pp.strictDirective = function(start) { - var this$1 = this; - - for (;;) { - // Try to find string literal. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this$1.input)[0].length; - var match = literal.exec(this$1.input.slice(start)); - if (!match) { return false } - if ((match[1] || match[2]) === "use strict") { return true } - start += match[0].length; - - // Skip semicolon, if any. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this$1.input)[0].length; - if (this$1.input[start] === ";") - { start++; } + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) { return code === 36 } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) } -}; -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. + // Test whether a given character is part of an identifier. -pp.eat = function(type) { - if (this.type === type) { - this.next(); - return true - } else { - return false + function isIdentifierChar(code, astral) { + if (code < 48) { return code === 36 } + if (code < 58) { return true } + if (code < 65) { return false } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) } -}; - -// Tests whether parsed token is a contextual keyword. -pp.isContextual = function(name) { - return this.type === types.name && this.value === name && !this.containsEsc -}; + // ## Token types -// Consumes contextual keyword if possible. + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. -pp.eatContextual = function(name) { - if (!this.isContextual(name)) { return false } - this.next(); - return true -}; + // All token type variables start with an underscore, to make them + // easy to recognize. -// Asserts that following token is given contextual keyword. + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; -pp.expectContextual = function(name) { - if (!this.eatContextual(name)) { this.unexpected(); } -}; + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; + + // Map keyword names to token types. + + var keywords$1 = {}; + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name; + return keywords$1[name] = new TokenType(name, options) + } + + var types = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + invalidTemplate: new TokenType("invalidTemplate"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=/===/!==", 6), + relational: binop("/<=/>=", 7), + bitShift: binop("<>/>>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class", startsExpr), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import", startsExpr), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) + }; -// Test whether a semicolon can be inserted at the current position. + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. -pp.canInsertSemicolon = function() { - return this.type === types.eof || - this.type === types.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); -pp.insertSemicolon = function() { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) - { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } - return true + function isNewLine(code, ecma2019String) { + return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) } -}; -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. + var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; -pp.semicolon = function() { - if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } -}; + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; -pp.afterTrailingComma = function(tokType, notNext) { - if (this.type === tokType) { - if (this.options.onTrailingComma) - { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } - if (!notNext) - { this.next(); } - return true - } -}; - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function(type) { - this.eat(type) || this.unexpected(); -}; - -// Raise an unexpected token error. - -pp.unexpected = function(pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; - -function DestructuringErrors() { - this.shorthandAssign = - this.trailingComma = - this.parenthesizedAssign = - this.parenthesizedBind = - this.doubleProto = - -1; -} - -pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) { return } - if (refDestructuringErrors.trailingComma > -1) - { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } - var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; - if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } -}; - -pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { - if (!refDestructuringErrors) { return false } - var shorthandAssign = refDestructuringErrors.shorthandAssign; - var doubleProto = refDestructuringErrors.doubleProto; - if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } - if (shorthandAssign >= 0) - { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } - if (doubleProto >= 0) - { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } -}; - -pp.checkYieldAwaitInDefaultParams = function() { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) - { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } - if (this.awaitPos) - { this.raise(this.awaitPos, "Await expression cannot be a default value"); } -}; - -pp.isSimpleAssignTarget = function(expr) { - if (expr.type === "ParenthesizedExpression") - { return this.isSimpleAssignTarget(expr.expression) } - return expr.type === "Identifier" || expr.type === "MemberExpression" -}; - -var pp$1 = Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp$1.parseTopLevel = function(node) { - var this$1 = this; - - var exports = {}; - if (!node.body) { node.body = []; } - while (this.type !== types.eof) { - var stmt = this$1.parseStatement(null, true, exports); - node.body.push(stmt); - } - if (this.inModule) - { for (var i = 0, list = Object.keys(this$1.undefinedExports); i < list.length; i += 1) - { - var name = list[i]; + var ref = Object.prototype; + var hasOwnProperty = ref.hasOwnProperty; + var toString = ref.toString; - this$1.raiseRecoverable(this$1.undefinedExports[name].start, ("Export '" + name + "' is not defined")); - } } - this.adaptDirectivePrologue(node.body); - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program") -}; - -var loopLabel = {kind: "loop"}; -var switchLabel = {kind: "switch"}; - -pp$1.isLet = function(context) { - if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - // For ambiguous cases, determine if a LexicalDeclaration (or only a - // Statement) is allowed here. If context is not empty then only a Statement - // is allowed. However, `let [` is an explicit negative lookahead for - // ExpressionStatement, so special-case it first. - if (nextCh === 91) { return true } // '[' - if (context) { return false } - - if (nextCh === 123) { return true } // '{' - if (isIdentifierStart(nextCh, true)) { - var pos = next + 1; - while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } - var ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) { return true } - } - return false -}; - -// check 'async [no LineTerminator here] function' -// - 'async /*foo*/ function' is OK. -// - 'async /*\n*/ function' is invalid. -pp$1.isAsyncFunction = function() { - if (this.options.ecmaVersion < 8 || !this.isContextual("async")) - { return false } - - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length; - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) -}; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp$1.parseStatement = function(context, topLevel, exports) { - var starttype = this.type, node = this.startNode(), kind; - - if (this.isLet(context)) { - starttype = types._var; - kind = "let"; + // Checks if an object has a property. + + function has(obj, propName) { + return hasOwnProperty.call(obj, propName) } - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) - case types._debugger: return this.parseDebuggerStatement(node) - case types._do: return this.parseDoStatement(node) - case types._for: return this.parseForStatement(node) - case types._function: - // Function as sole body of either an if statement or a labeled statement - // works, but not when it is part of a labeled statement that is the sole - // body of an if statement. - if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } - return this.parseFunctionStatement(node, false, !context) - case types._class: - if (context) { this.unexpected(); } - return this.parseClass(node, true) - case types._if: return this.parseIfStatement(node) - case types._return: return this.parseReturnStatement(node) - case types._switch: return this.parseSwitchStatement(node) - case types._throw: return this.parseThrowStatement(node) - case types._try: return this.parseTryStatement(node) - case types._const: case types._var: - kind = kind || this.value; - if (context && kind !== "var") { this.unexpected(); } - return this.parseVarStatement(node, kind) - case types._while: return this.parseWhileStatement(node) - case types._with: return this.parseWithStatement(node) - case types.braceL: return this.parseBlock(true, node) - case types.semi: return this.parseEmptyStatement(node) - case types._export: - case types._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) - { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } - if (!this.inModule) - { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } - } - return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - if (this.isAsyncFunction()) { - if (context) { this.unexpected(); } - this.next(); - return this.parseFunctionStatement(node, true, !context) - } + var isArray = Array.isArray || (function (obj) { return ( + toString.call(obj) === "[object Array]" + ); }); - var maybeName = this.value, expr = this.parseExpression(); - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) - { return this.parseLabeledStatement(node, maybeName, expr, context) } - else { return this.parseExpressionStatement(node, expr) } + function wordsRegexp(words) { + return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") } -}; -pp$1.parseBreakContinueStatement = function(node, keyword) { - var this$1 = this; + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. - var isBreak = keyword === "break"; - this.next(); - if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } - else if (this.type !== types.name) { this.unexpected(); } - else { - node.label = this.parseIdent(); - this.semicolon(); - } + var Position = function Position(line, col) { + this.line = line; + this.column = col; + }; - // Verify that there is an actual destination to break or - // continue to. - var i = 0; - for (; i < this.labels.length; ++i) { - var lab = this$1.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } - if (node.label && isBreak) { break } - } - } - if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") -}; - -pp$1.parseDebuggerStatement = function(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement") -}; - -pp$1.parseDoStatement = function(node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement("do"); - this.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) - { this.eat(types.semi); } - else - { this.semicolon(); } - return this.finishNode(node, "DoWhileStatement") -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp$1.parseForStatement = function(node) { - this.next(); - var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; - this.labels.push(loopLabel); - this.enterScope(0); - this.expect(types.parenL); - if (this.type === types.semi) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, null) - } - var isLet = this.isLet(); - if (this.type === types._var || this.type === types._const || isLet) { - var init$1 = this.startNode(), kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(init$1, true, kind); - this.finishNode(init$1, "VariableDeclaration"); - if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && - !(kind !== "var" && init$1.declarations[0].init)) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - return this.parseForIn(node, init$1) - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init$1) - } - var refDestructuringErrors = new DestructuringErrors; - var init = this.parseExpression(true, refDestructuringErrors); - if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - this.toAssignable(init, false, refDestructuringErrors); - this.checkLVal(init); - return this.parseForIn(node, init) - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init) -}; - -pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) -}; - -pp$1.parseIfStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - // allow function declarations in branches, but only in non-strict mode - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement") -}; - -pp$1.parseReturnStatement = function(node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) - { this.raise(this.start, "'return' outside of function"); } - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } - else { node.argument = this.parseExpression(); this.semicolon(); } - return this.finishNode(node, "ReturnStatement") -}; - -pp$1.parseSwitchStatement = function(node) { - var this$1 = this; - - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(types.braceL); - this.labels.push(switchLabel); - this.enterScope(0); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - var cur; - for (var sawDefault = false; this.type !== types.braceR;) { - if (this$1.type === types._case || this$1.type === types._default) { - var isCase = this$1.type === types._case; - if (cur) { this$1.finishNode(cur, "SwitchCase"); } - node.cases.push(cur = this$1.startNode()); - cur.consequent = []; - this$1.next(); - if (isCase) { - cur.test = this$1.parseExpression(); - } else { - if (sawDefault) { this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses"); } - sawDefault = true; - cur.test = null; - } - this$1.expect(types.colon); - } else { - if (!cur) { this$1.unexpected(); } - cur.consequent.push(this$1.parseStatement(null)); - } - } - this.exitScope(); - if (cur) { this.finishNode(cur, "SwitchCase"); } - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement") -}; - -pp$1.parseThrowStatement = function(node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) - { this.raise(this.lastTokEnd, "Illegal newline after throw"); } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement") -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp$1.parseTryStatement = function(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === types._catch) { - var clause = this.startNode(); - this.next(); - if (this.eat(types.parenL)) { - clause.param = this.parseBindingAtom(); - var simple = clause.param.type === "Identifier"; - this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); - this.expect(types.parenR); - } else { - if (this.options.ecmaVersion < 10) { this.unexpected(); } - clause.param = null; - this.enterScope(0); - } - clause.body = this.parseBlock(false); - this.exitScope(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) - { this.raise(node.start, "Missing catch or finally clause"); } - return this.finishNode(node, "TryStatement") -}; - -pp$1.parseVarStatement = function(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration") -}; - -pp$1.parseWhileStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement("while"); - this.labels.pop(); - return this.finishNode(node, "WhileStatement") -}; - -pp$1.parseWithStatement = function(node) { - if (this.strict) { this.raise(this.start, "'with' in strict mode"); } - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement("with"); - return this.finishNode(node, "WithStatement") -}; - -pp$1.parseEmptyStatement = function(node) { - this.next(); - return this.finishNode(node, "EmptyStatement") -}; - -pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { - var this$1 = this; - - for (var i$1 = 0, list = this$1.labels; i$1 < list.length; i$1 += 1) - { - var label = list[i$1]; - - if (label.name === maybeName) - { this$1.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } } - var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label$1 = this$1.labels[i]; - if (label$1.statementStart === node.start) { - // Update information about previous labels on this node - label$1.statementStart = this$1.start; - label$1.kind = kind; - } else { break } - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement") -}; - -pp$1.parseExpressionStatement = function(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement") -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp$1.parseBlock = function(createNewLexicalScope, node) { - var this$1 = this; - if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; - if ( node === void 0 ) node = this.startNode(); - - node.body = []; - this.expect(types.braceL); - if (createNewLexicalScope) { this.enterScope(0); } - while (!this.eat(types.braceR)) { - var stmt = this$1.parseStatement(null); - node.body.push(stmt); - } - if (createNewLexicalScope) { this.exitScope(); } - return this.finishNode(node, "BlockStatement") -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp$1.parseFor = function(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.type === types.semi ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.type === types.parenR ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, "ForStatement") -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp$1.parseForIn = function(node, init) { - var type = this.type === types._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - if (type === "ForInStatement") { - if (init.type === "AssignmentPattern" || - (init.type === "VariableDeclaration" && init.declarations[0].init != null && - (this.strict || init.declarations[0].id.type !== "Identifier"))) - { this.raise(init.start, "Invalid assignment in for-in loop head"); } - } - node.left = init; - node.right = type === "ForInStatement" ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, type) -}; - -// Parse a list of variable declarations. - -pp$1.parseVar = function(node, isFor, kind) { - var this$1 = this; - - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this$1.startNode(); - this$1.parseVarId(decl, kind); - if (this$1.eat(types.eq)) { - decl.init = this$1.parseMaybeAssign(isFor); - } else if (kind === "const" && !(this$1.type === types._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { - this$1.unexpected(); - } else if (decl.id.type !== "Identifier" && !(isFor && (this$1.type === types._in || this$1.isContextual("of")))) { - this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")); - if (!this$1.eat(types.comma)) { break } - } - return node -}; + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; -pp$1.parseVarId = function(decl, kind) { - if ((kind === "const" || kind === "let") && this.isContextual("let")) { - this.raiseRecoverable(this.start, "let is disallowed as a lexically bound name"); - } - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); -}; - -var FUNC_STATEMENT = 1; -var FUNC_HANGING_STATEMENT = 2; -var FUNC_NULLABLE_ID = 4; - -// Parse a function declaration or literal (depending on the -// `statement & FUNC_STATEMENT`). - -// Remove `allowExpressionBody` for 7.0.0, as it is only called with false -pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { - this.initFunction(node); - if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { - if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) - { this.unexpected(); } - node.generator = this.eat(types.star); - } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - if (statement & FUNC_STATEMENT) { - node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); - if (node.id && !(statement & FUNC_HANGING_STATEMENT)) - // If it is a regular function declaration in sloppy mode, then it is - // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding - // mode depends on properties of the current scope (see - // treatFunctionsAsVar). - { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } - } + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start; + this.end = end; + if (p.sourceFile !== null) { this.source = p.sourceFile; } + }; - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(node.async, node.generator)); - - if (!(statement & FUNC_STATEMENT)) - { node.id = this.type === types.name ? this.parseIdent() : null; } - - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") -}; - -pp$1.parseFunctionParams = function(node) { - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp$1.parseClass = function(node, isStatement) { - var this$1 = this; - - this.next(); - - // ecma-262 14.6 Class Definitions - // A class definition is always strict mode code. - var oldStrict = this.strict; - this.strict = true; - - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - var element = this$1.parseClassElement(node.superClass !== null); - if (element) { - classBody.body.push(element); - if (element.type === "MethodDefinition" && element.kind === "constructor") { - if (hadConstructor) { this$1.raise(element.start, "Duplicate constructor in the same class"); } - hadConstructor = true; + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur) } } } - node.body = this.finishNode(classBody, "ClassBody"); - this.strict = oldStrict; - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") -}; - -pp$1.parseClassElement = function(constructorAllowsSuper) { - var this$1 = this; - - if (this.eat(types.semi)) { return null } - - var method = this.startNode(); - var tryContextual = function (k, noLineBreak) { - if ( noLineBreak === void 0 ) noLineBreak = false; - - var start = this$1.start, startLoc = this$1.startLoc; - if (!this$1.eatContextual(k)) { return false } - if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } - if (method.key) { this$1.unexpected(); } - method.computed = false; - method.key = this$1.startNodeAt(start, startLoc); - method.key.name = k; - this$1.finishNode(method.key, "Identifier"); - return false - }; - method.kind = "method"; - method.static = tryContextual("static"); - var isGenerator = this.eat(types.star); - var isAsync = false; - if (!isGenerator) { - if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - } else if (tryContextual("get")) { - method.kind = "get"; - } else if (tryContextual("set")) { - method.kind = "set"; - } - } - if (!method.key) { this.parsePropertyName(method); } - var key = method.key; - var allowsDirectSuper = false; - if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { - if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } - if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } - if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } - method.kind = "constructor"; - allowsDirectSuper = constructorAllowsSuper; - } else if (method.static && key.type === "Identifier" && key.name === "prototype") { - this.raise(key.start, "Classes may not have a static property named prototype"); - } - this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); - if (method.kind === "get" && method.value.params.length !== 0) - { this.raiseRecoverable(method.value.start, "getter should have no params"); } - if (method.kind === "set" && method.value.params.length !== 1) - { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } - if (method.kind === "set" && method.value.params[0].type === "RestElement") - { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } - return method -}; - -pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { - method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); - return this.finishNode(method, "MethodDefinition") -}; - -pp$1.parseClassId = function(node, isStatement) { - if (this.type === types.name) { - node.id = this.parseIdent(); - if (isStatement) - { this.checkLVal(node.id, BIND_LEXICAL, false); } - } else { - if (isStatement === true) - { this.unexpected(); } - node.id = null; - } -}; + // A second optional argument can be given to further configure + // the parser process. These options are recognized: + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 + // (2019). This influences support for strict mode, the set of + // reserved words, and support for new syntax features. The default + // is 9. + ecmaVersion: 9, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // the position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; -pp$1.parseClassSuper = function(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; -}; + // Interpret and default an options object -// Parses module export declaration. + function getOptions(opts) { + var options = {}; -pp$1.parseExport = function(node, exports) { - var this$1 = this; + for (var opt in defaultOptions) + { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - this.next(); - // export * from '...' - if (this.eat(types.star)) { - this.expectContextual("from"); - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(types._default)) { // export default ... - this.checkExport(exports, "default", this.lastTokStart); - var isAsync; - if (this.type === types._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - if (isAsync) { this.next(); } - node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); - } else if (this.type === types._class) { - var cNode = this.startNode(); - node.declaration = this.parseClass(cNode, "nullableID"); - } else { - node.declaration = this.parseMaybeAssign(); - this.semicolon(); - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(null); - if (node.declaration.type === "VariableDeclaration") - { this.checkVariableExport(exports, node.declaration.declarations); } - else - { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } - node.specifiers = []; - node.source = null; - } else { // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports); - if (this.eatContextual("from")) { - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - } else { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - // check for keywords used as local names - var spec = list[i]; + if (options.ecmaVersion >= 2015) + { options.ecmaVersion -= 2009; } - this$1.checkUnreserved(spec.local); - // check if export is defined - this$1.checkLocalExport(spec.local); - } + if (options.allowReserved == null) + { options.allowReserved = options.ecmaVersion < 5; } - node.source = null; + if (isArray(options.onToken)) { + var tokens = options.onToken; + options.onToken = function (token) { return tokens.push(token); }; + } + if (isArray(options.onComment)) + { options.onComment = pushComment(options, options.onComment); } + + return options + } + + function pushComment(options, array) { + return function(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) + { comment.loc = new SourceLocation(this, startLoc, endLoc); } + if (options.ranges) + { comment.range = [start, end]; } + array.push(comment); } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration") -}; - -pp$1.checkExport = function(exports, name, pos) { - if (!exports) { return } - if (has(exports, name)) - { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } - exports[name] = true; -}; - -pp$1.checkPatternExport = function(exports, pat) { - var this$1 = this; - - var type = pat.type; - if (type === "Identifier") - { this.checkExport(exports, pat.name, pat.start); } - else if (type === "ObjectPattern") - { for (var i = 0, list = pat.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this$1.checkPatternExport(exports, prop); - } } - else if (type === "ArrayPattern") - { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { - var elt = list$1[i$1]; - - if (elt) { this$1.checkPatternExport(exports, elt); } - } } - else if (type === "Property") - { this.checkPatternExport(exports, pat.value); } - else if (type === "AssignmentPattern") - { this.checkPatternExport(exports, pat.left); } - else if (type === "RestElement") - { this.checkPatternExport(exports, pat.argument); } - else if (type === "ParenthesizedExpression") - { this.checkPatternExport(exports, pat.expression); } -}; - -pp$1.checkVariableExport = function(exports, decls) { - var this$1 = this; - - if (!exports) { return } - for (var i = 0, list = decls; i < list.length; i += 1) - { - var decl = list[i]; - - this$1.checkPatternExport(exports, decl.id); - } -}; - -pp$1.shouldParseExportStatement = function() { - return this.type.keyword === "var" || - this.type.keyword === "const" || - this.type.keyword === "class" || - this.type.keyword === "function" || - this.isLet() || - this.isAsyncFunction() -}; - -// Parses a comma-separated list of module exports. - -pp$1.parseExportSpecifiers = function(exports) { - var this$1 = this; - - var nodes = [], first = true; - // export { x, y as z } [from '...'] - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node = this$1.startNode(); - node.local = this$1.parseIdent(true); - node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local; - this$1.checkExport(exports, node.exported.name, node.exported.start); - nodes.push(this$1.finishNode(node, "ExportSpecifier")); - } - return nodes -}; - -// Parses import declaration. - -pp$1.parseImport = function(node) { - this.next(); - // import '...' - if (this.type === types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration") -}; - -// Parses a comma-separated list of module imports. -pp$1.parseImportSpecifiers = function() { - var this$1 = this; - - var nodes = [], first = true; - if (this.type === types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, BIND_LEXICAL); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(types.comma)) { return nodes } - } - if (this.type === types.star) { - var node$1 = this.startNode(); - this.next(); - this.expectContextual("as"); - node$1.local = this.parseIdent(); - this.checkLVal(node$1.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); - return nodes - } - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node$2 = this$1.startNode(); - node$2.imported = this$1.parseIdent(true); - if (this$1.eatContextual("as")) { - node$2.local = this$1.parseIdent(); + // Each scope gets a bitset that may contain these flags + var + SCOPE_TOP = 1, + SCOPE_FUNCTION = 2, + SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128; + + function functionFlags(async, generator) { + return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) + } + + // Used in checkLVal and declareName to determine the type of a binding + var + BIND_NONE = 0, // Not a binding + BIND_VAR = 1, // Var-style binding + BIND_LEXICAL = 2, // Let- or const-style binding + BIND_FUNCTION = 3, // Function declaration + BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding + BIND_OUTSIDE = 5; // Special case for function names as bound inside the function + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]); + var reserved = ""; + if (options.allowReserved !== true) { + for (var v = options.ecmaVersion;; v--) + { if (reserved = reservedWords[v]) { break } } + if (options.sourceType === "module") { reserved += " await"; } + } + this.reservedWords = wordsRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; + this.reservedWordsStrict = wordsRegexp(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; } else { - this$1.checkUnreserved(node$2.imported); - node$2.local = node$2.imported; + this.pos = this.lineStart = 0; + this.curLine = 1; } - this$1.checkLVal(node$2.local, BIND_LEXICAL); - nodes.push(this$1.finishNode(node$2, "ImportSpecifier")); - } - return nodes -}; -// Set `ExpressionStatement#directive` property for directive prologues. -pp$1.adaptDirectivePrologue = function(statements) { - for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { - statements[i].directive = statements[i].expression.raw.slice(1, -1); - } -}; -pp$1.isDirectiveCandidate = function(statement) { - return ( - statement.type === "ExpressionStatement" && - statement.expression.type === "Literal" && - typeof statement.expression.value === "string" && - // Reject parenthesized strings. - (this.input[statement.start] === "\"" || this.input[statement.start] === "'") - ) -}; - -var pp$2 = Parser.prototype; - -// Convert existing expression atom to assignable pattern -// if possible. - -pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { - var this$1 = this; - - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") - { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } - break + // Properties of the current token: + // Its type + this.type = types.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; - case "ObjectPattern": - case "ArrayPattern": - case "RestElement": - break + // Figure out if it's a module code. + this.inModule = options.sourceType === "module"; + this.strict = this.inModule || this.strictDirective(this.pos); - case "ObjectExpression": - node.type = "ObjectPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - this$1.toAssignable(prop, isBinding); - // Early error: - // AssignmentRestProperty[Yield, Await] : - // `...` DestructuringAssignmentTarget[Yield, Await] - // - // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. - if ( - prop.type === "RestElement" && - (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") - ) { - this$1.raise(prop.argument.start, "Unexpected token"); - } - } - break + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; - case "Property": - // AssignmentProperty has type === "Property" - if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } - this.toAssignable(node.value, isBinding); - break + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + // Labels in scope. + this.labels = []; + // Thus-far undefined exports. + this.undefinedExports = {}; - case "ArrayExpression": - node.type = "ArrayPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - this.toAssignableList(node.elements, isBinding); - break + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") + { this.skipLineComment(2); } - case "SpreadElement": - node.type = "RestElement"; - this.toAssignable(node.argument, isBinding); - if (node.argument.type === "AssignmentPattern") - { this.raise(node.argument.start, "Rest elements cannot have a default value"); } - break + // Scope tracking for duplicate variable names (see scope.js) + this.scopeStack = []; + this.enterScope(SCOPE_TOP); - case "AssignmentExpression": - if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isBinding); - // falls through to AssignmentPattern + // For RegExp validation + this.regexpState = null; + }; - case "AssignmentPattern": - break + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - case "ParenthesizedExpression": - this.toAssignable(node.expression, isBinding, refDestructuringErrors); - break + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node) + }; - case "MemberExpression": - if (!isBinding) { break } + prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; + prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; + prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; + prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; + prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; + prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - default: - this.raise(node.start, "Assigning to rvalue"); - } - } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - return node -}; + // Switch to a getter for 7.0.0. + Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; -// Convert list of expression atoms to binding list. + Parser.extend = function extend () { + var plugins = [], len = arguments.length; + while ( len-- ) plugins[ len ] = arguments[ len ]; -pp$2.toAssignableList = function(exprList, isBinding) { - var this$1 = this; + var cls = this; + for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } + return cls + }; - var end = exprList.length; - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) { this$1.toAssignable(elt, isBinding); } - } - if (end) { - var last = exprList[end - 1]; - if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") - { this.unexpected(last.argument.start); } - } - return exprList -}; + Parser.parse = function parse (input, options) { + return new this(options, input).parse() + }; -// Parses spread element. + Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { + var parser = new this(options, input, pos); + parser.nextToken(); + return parser.parseExpression() + }; -pp$2.parseSpread = function(refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refDestructuringErrors); - return this.finishNode(node, "SpreadElement") -}; + Parser.tokenizer = function tokenizer (input, options) { + return new this(options, input) + }; -pp$2.parseRestBinding = function() { - var node = this.startNode(); - this.next(); + Object.defineProperties( Parser.prototype, prototypeAccessors ); - // RestElement inside of a function parameter must be an identifier - if (this.options.ecmaVersion === 6 && this.type !== types.name) - { this.unexpected(); } + var pp = Parser.prototype; - node.argument = this.parseBindingAtom(); + // ## Parser utilities - return this.finishNode(node, "RestElement") -}; + var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; + pp.strictDirective = function(start) { + for (;;) { + // Try to find string literal. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) { return false } + if ((match[1] || match[2]) === "use strict") { return true } + start += match[0].length; -// Parses lvalue (assignable) atom. + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + if (this.input[start] === ";") + { start++; } + } + }; -pp$2.parseBindingAtom = function() { - if (this.options.ecmaVersion >= 6) { - switch (this.type) { - case types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern") + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. - case types.braceL: - return this.parseObj(true) - } - } - return this.parseIdent() -}; - -pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (first) { first = false; } - else { this$1.expect(types.comma); } - if (allowEmpty && this$1.type === types.comma) { - elts.push(null); - } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { - break - } else if (this$1.type === types.ellipsis) { - var rest = this$1.parseRestBinding(); - this$1.parseBindingListItem(rest); - elts.push(rest); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - this$1.expect(close); - break + pp.eat = function(type) { + if (this.type === type) { + this.next(); + return true } else { - var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc); - this$1.parseBindingListItem(elem); - elts.push(elem); + return false } - } - return elts -}; - -pp$2.parseBindingListItem = function(param) { - return param -}; - -// Parses assignment pattern around given atom if possible. - -pp$2.parseMaybeDefault = function(startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern") -}; - -// Verify that a node is an lval — something that can be assigned -// to. -// bindingType can be either: -// 'var' indicating that the lval creates a 'var' binding -// 'let' indicating that the lval creates a lexical ('let' or 'const') binding -// 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references - -pp$2.checkLVal = function(expr, bindingType, checkClashes) { - var this$1 = this; - if ( bindingType === void 0 ) bindingType = BIND_NONE; - - switch (expr.type) { - case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } - if (checkClashes) { - if (has(checkClashes, expr.name)) - { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; - } - if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } - break - - case "MemberExpression": - if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } - break - - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this$1.checkLVal(prop, bindingType, checkClashes); - } - break + }; - case "Property": - // AssignmentProperty has type === "Property" - this.checkLVal(expr.value, bindingType, checkClashes); - break + // Tests whether parsed token is a contextual keyword. - case "ArrayPattern": - for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { - var elem = list$1[i$1]; + pp.isContextual = function(name) { + return this.type === types.name && this.value === name && !this.containsEsc + }; - if (elem) { this$1.checkLVal(elem, bindingType, checkClashes); } - } - break + // Consumes contextual keyword if possible. - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes); - break + pp.eatContextual = function(name) { + if (!this.isContextual(name)) { return false } + this.next(); + return true + }; - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes); - break + // Asserts that following token is given contextual keyword. - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes); - break + pp.expectContextual = function(name) { + if (!this.eatContextual(name)) { this.unexpected(); } + }; - default: - this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - -var pp$3 = Parser.prototype; - -// Check if property name clashes with already added. -// Object/class getters and setters are not allowed to clash — -// either with each other or with an init property — and in -// strict mode, init properties are also not allowed to be repeated. - -pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { - if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") - { return } - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - { return } - var key = prop.key; - var name; - switch (key.type) { - case "Identifier": name = key.name; break - case "Literal": name = String(key.value); break - default: return - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) { - if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } - // Backwards-compat kludge. Can be removed in version 6.0 - else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } - } - propHash.proto = true; - } - return - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var redefinition; - if (kind === "init") { - redefinition = this.strict && other.init || other.get || other.set; - } else { - redefinition = other.init || other[kind]; - } - if (redefinition) - { this.raiseRecoverable(key.start, "Redefinition of property"); } - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp$3.parseExpression = function(noIn, refDestructuringErrors) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); - if (this.type === types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(types.comma)) { node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)); } - return this.finishNode(node, "SequenceExpression") - } - return expr -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { - if (this.isContextual("yield")) { - if (this.inGenerator) { return this.parseYield(noIn) } - // The tokenizer will assume an expression is allowed after - // `yield`, but this isn't that kind of yield - else { this.exprAllowed = false; } - } + // Test whether a semicolon can be inserted at the current position. - var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign; - oldTrailingComma = refDestructuringErrors.trailingComma; - oldShorthandAssign = refDestructuringErrors.shorthandAssign; - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; - } else { - refDestructuringErrors = new DestructuringErrors; - ownDestructuringErrors = true; - } + pp.canInsertSemicolon = function() { + return this.type === types.eof || + this.type === types.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; - var startPos = this.start, startLoc = this.startLoc; - if (this.type === types.parenL || this.type === types.name) - { this.potentialArrowAt = this.start; } - var left = this.parseMaybeConditional(noIn, refDestructuringErrors); - if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; - if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } - refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression") - } else { - if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } - } - if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } - if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } - if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } - return left -}; - -// Parse a ternary conditional (`?:`) operator. - -pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - if (this.eat(types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression") - } - return expr -}; - -// Start the precedence parser. - -pp$3.parseExprOps = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== types._in)) { - if (prec > minPrec) { - var logical = this.type === types.logicalOR || this.type === types.logicalAND; - var op = this.value; - this.next(); - var startPos = this.start, startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) - } - } - return left -}; - -pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") -}; - -// Parse unary operators, both prefix and postfix. - -pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, expr; - if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { - expr = this.parseAwait(); - sawUnary = true; - } else if (this.type.prefix) { - var node = this.startNode(), update = this.type === types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { this.checkLVal(node.argument); } - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") - { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } - else { sawUnary = true; } - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else { - expr = this.parseExprSubscripts(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - while (this.type.postfix && !this.canInsertSemicolon()) { - var node$1 = this$1.startNodeAt(startPos, startLoc); - node$1.operator = this$1.value; - node$1.prefix = false; - node$1.argument = expr; - this$1.checkLVal(expr); - this$1.next(); - expr = this$1.finishNode(node$1, "UpdateExpression"); + pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } + return true } - } + }; - if (!sawUnary && this.eat(types.starstar)) - { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } - else - { return expr } -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp$3.parseExprSubscripts = function(refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors); - var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } - var result = this.parseSubscripts(expr, startPos, startLoc); - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } - if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } - } - return result -}; - -pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { - var this$1 = this; - - var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; - while (true) { - var element = this$1.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); - if (element === base || element.type === "ArrowFunctionExpression") { return element } - base = element; - } -}; + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. -pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { - var computed = this.eat(types.bracketL); - if (computed || this.eat(types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = computed ? this.parseExpression() : this.parseIdent(true); - node.computed = !!computed; - if (computed) { this.expect(types.bracketR); } - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(types.parenL)) { - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); - if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - if (this.awaitIdentPos > 0) - { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) - } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.callee = base; - node$1.arguments = exprList; - base = this.finishNode(node$1, "CallExpression"); - } else if (this.type === types.backQuote) { - var node$2 = this.startNodeAt(startPos, startLoc); - node$2.tag = base; - node$2.quasi = this.parseTemplate({isTagged: true}); - base = this.finishNode(node$2, "TaggedTemplateExpression"); - } - return base -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp$3.parseExprAtom = function(refDestructuringErrors) { - // If a division operator appears in an expression position, the - // tokenizer got confused, and we force it to read a regexp instead. - if (this.type === types.slash) { this.readRegexp(); } - - var node, canBeArrow = this.potentialArrowAt === this.start; - switch (this.type) { - case types._super: - if (!this.allowSuper) - { this.raise(this.start, "'super' keyword outside a method"); } - node = this.startNode(); - this.next(); - if (this.type === types.parenL && !this.allowDirectSuper) - { this.raise(node.start, "super() call outside constructor of a subclass"); } - // The `super` keyword can appear at below: - // SuperProperty: - // super [ Expression ] - // super . IdentifierName - // SuperCall: - // super Arguments - if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) - { this.unexpected(); } - return this.finishNode(node, "Super") + pp.semicolon = function() { + if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } + }; - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression") - - case types.name: - var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; - var id = this.parseIdent(false); - if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) - { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(types.arrow)) - { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { - id = this.parseIdent(false); - if (this.canInsertSemicolon() || !this.eat(types.arrow)) - { this.unexpected(); } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) - } + pp.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) + { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } + if (!notNext) + { this.next(); } + return true } - return id + }; - case types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = {pattern: value.pattern, flags: value.flags}; - return node + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. - case types.num: case types.string: - return this.parseLiteral(this.value) + pp.expect = function(type) { + this.eat(type) || this.unexpected(); + }; - case types._null: case types._true: case types._false: - node = this.startNode(); - node.value = this.type === types._null ? null : this.type === types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal") + // Raise an unexpected token error. - case types.parenL: - var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) - { refDestructuringErrors.parenthesizedAssign = start; } - if (refDestructuringErrors.parenthesizedBind < 0) - { refDestructuringErrors.parenthesizedBind = start; } - } - return expr + pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression") + function DestructuringErrors() { + this.shorthandAssign = + this.trailingComma = + this.parenthesizedAssign = + this.parenthesizedBind = + this.doubleProto = + -1; + } + + pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { return } + if (refDestructuringErrors.trailingComma > -1) + { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } + }; - case types.braceL: - return this.parseObj(false, refDestructuringErrors) + pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { return false } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } + if (shorthandAssign >= 0) + { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } + if (doubleProto >= 0) + { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } + }; - case types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, 0) + pp.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } + if (this.awaitPos) + { this.raise(this.awaitPos, "Await expression cannot be a default value"); } + }; - case types._class: - return this.parseClass(this.startNode(), false) + pp.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + { return this.isSimpleAssignTarget(expr.expression) } + return expr.type === "Identifier" || expr.type === "MemberExpression" + }; - case types._new: - return this.parseNew() + var pp$1 = Parser.prototype; - case types.backQuote: - return this.parseTemplate() + // ### Statement parsing - default: - this.unexpected(); - } -}; - -pp$3.parseLiteral = function(value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal") -}; - -pp$3.parseParenExpression = function() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val -}; - -pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; - if (this.options.ecmaVersion >= 6) { - this.next(); + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. - var innerStartPos = this.start, innerStartLoc = this.startLoc; - var exprList = [], first = true, lastIsComma = false; - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; - this.yieldPos = 0; - this.awaitPos = 0; - // Do not save awaitIdentPos to allow checking awaits nested in parameters - while (this.type !== types.parenR) { - first ? first = false : this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) { - lastIsComma = true; - break - } else if (this$1.type === types.ellipsis) { - spreadStart = this$1.start; - exprList.push(this$1.parseParenItem(this$1.parseRestBinding())); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - break - } else { - exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)); - } + pp$1.parseTopLevel = function(node) { + var exports = {}; + if (!node.body) { node.body = []; } + while (this.type !== types.eof) { + var stmt = this.parseStatement(null, true, exports); + node.body.push(stmt); } - var innerEndPos = this.start, innerEndLoc = this.startLoc; - this.expect(types.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - return this.parseParenArrowList(startPos, startLoc, exprList) + if (this.inModule) + { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) + { + var name = list[i]; + + this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); + } } + this.adaptDirectivePrologue(node.body); + this.next(); + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType; } + return this.finishNode(node, "Program") + }; - if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } - if (spreadStart) { this.unexpected(spreadStart); } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + pp$1.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + // For ambiguous cases, determine if a LexicalDeclaration (or only a + // Statement) is allowed here. If context is not empty then only a Statement + // is allowed. However, `let [` is an explicit negative lookahead for + // ExpressionStatement, so special-case it first. + if (nextCh === 91) { return true } // '[' + if (context) { return false } + + if (nextCh === 123) { return true } // '{' + if (isIdentifierStart(nextCh, true)) { + var pos = next + 1; + while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) { return true } } - } else { - val = this.parseParenExpression(); - } + return false + }; - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression") - } else { - return val - } -}; + // check 'async [no LineTerminator here] function' + // - 'async /*foo*/ function' is OK. + // - 'async /*\n*/ function' is invalid. + pp$1.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) + { return false } + + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length; + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) + }; -pp$3.parseParenItem = function(item) { - return item -}; + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. -pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) -}; + pp$1.parseStatement = function(context, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind; -// New's precedence is slightly tricky. It must allow its argument to -// be a `[]` or dot subscript expression, but not a call — at least, -// not without wrapping it in parentheses. Thus, it uses the noCalls -// argument to parseSubscripts to prevent it from consuming the -// argument list. + if (this.isLet(context)) { + starttype = types._var; + kind = "let"; + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case types._debugger: return this.parseDebuggerStatement(node) + case types._do: return this.parseDoStatement(node) + case types._for: return this.parseForStatement(node) + case types._function: + // Function as sole body of either an if statement or a labeled statement + // works, but not when it is part of a labeled statement that is the sole + // body of an if statement. + if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } + return this.parseFunctionStatement(node, false, !context) + case types._class: + if (context) { this.unexpected(); } + return this.parseClass(node, true) + case types._if: return this.parseIfStatement(node) + case types._return: return this.parseReturnStatement(node) + case types._switch: return this.parseSwitchStatement(node) + case types._throw: return this.parseThrowStatement(node) + case types._try: return this.parseTryStatement(node) + case types._const: case types._var: + kind = kind || this.value; + if (context && kind !== "var") { this.unexpected(); } + return this.parseVarStatement(node, kind) + case types._while: return this.parseWhileStatement(node) + case types._with: return this.parseWithStatement(node) + case types.braceL: return this.parseBlock(true, node) + case types.semi: return this.parseEmptyStatement(node) + case types._export: + case types._import: + if (this.options.ecmaVersion > 10 && starttype === types._import) { + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40) // '(' + { return this.parseExpressionStatement(node, this.parseExpression()) } + } + + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } + if (!this.inModule) + { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } + } + return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { this.unexpected(); } + this.next(); + return this.parseFunctionStatement(node, true, !context) + } + + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) + { return this.parseLabeledStatement(node, maybeName, expr, context) } + else { return this.parseExpressionStatement(node, expr) } + } + }; + + pp$1.parseBreakContinueStatement = function(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } + else if (this.type !== types.name) { this.unexpected(); } + else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + var i = 0; + for (; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } + if (node.label && isBreak) { break } + } + } + if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + }; + + pp$1.parseDebuggerStatement = function(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement") + }; + + pp$1.parseDoStatement = function(node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) + { this.eat(types.semi); } + else + { this.semicolon(); } + return this.finishNode(node, "DoWhileStatement") + }; + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$1.parseForStatement = function(node) { + this.next(); + var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; + this.labels.push(loopLabel); + this.enterScope(0); + this.expect(types.parenL); + if (this.type === types.semi) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, null) + } + var isLet = this.isLet(); + if (this.type === types._var || this.type === types._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + return this.parseForIn(node, init$1) + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors; + var init = this.parseExpression(true, refDestructuringErrors); + if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLVal(init); + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init) + }; + + pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) + }; + + pp$1.parseIfStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement") + }; + + pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + { this.raise(this.start, "'return' outside of function"); } + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } + else { node.argument = this.parseExpression(); this.semicolon(); } + return this.finishNode(node, "ReturnStatement") + }; + + pp$1.parseSwitchStatement = function(node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(types.braceL); + this.labels.push(switchLabel); + this.enterScope(0); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + var cur; + for (var sawDefault = false; this.type !== types.braceR;) { + if (this.type === types._case || this.type === types._default) { + var isCase = this.type === types._case; + if (cur) { this.finishNode(cur, "SwitchCase"); } + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } + sawDefault = true; + cur.test = null; + } + this.expect(types.colon); + } else { + if (!cur) { this.unexpected(); } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { this.finishNode(cur, "SwitchCase"); } + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement") + }; + + pp$1.parseThrowStatement = function(node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + { this.raise(this.lastTokEnd, "Illegal newline after throw"); } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement") + }; + + // Reused empty array added for node fields that are always empty. + + var empty = []; + + pp$1.parseTryStatement = function(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === types._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types.parenL)) { + clause.param = this.parseBindingAtom(); + var simple = clause.param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.expect(types.parenR); + } else { + if (this.options.ecmaVersion < 10) { this.unexpected(); } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) + { this.raise(node.start, "Missing catch or finally clause"); } + return this.finishNode(node, "TryStatement") + }; + + pp$1.parseVarStatement = function(node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration") + }; + + pp$1.parseWhileStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node, "WhileStatement") + }; + + pp$1.parseWithStatement = function(node) { + if (this.strict) { this.raise(this.start, "'with' in strict mode"); } + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement("with"); + return this.finishNode(node, "WithStatement") + }; + + pp$1.parseEmptyStatement = function(node) { + this.next(); + return this.finishNode(node, "EmptyStatement") + }; + + pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { + for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) + { + var label = list[i$1]; + + if (label.name === maybeName) + { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } } + var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label$1 = this.labels[i]; + if (label$1.statementStart === node.start) { + // Update information about previous labels on this node + label$1.statementStart = this.start; + label$1.kind = kind; + } else { break } + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement") + }; + + pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement") + }; + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$1.parseBlock = function(createNewLexicalScope, node) { + if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; + if ( node === void 0 ) node = this.startNode(); + + node.body = []; + this.expect(types.braceL); + if (createNewLexicalScope) { this.enterScope(0); } + while (!this.eat(types.braceR)) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + if (createNewLexicalScope) { this.exitScope(); } + return this.finishNode(node, "BlockStatement") + }; + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$1.parseFor = function(node, init) { + node.init = init; + this.expect(types.semi); + node.test = this.type === types.semi ? null : this.parseExpression(); + this.expect(types.semi); + node.update = this.type === types.parenR ? null : this.parseExpression(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, "ForStatement") + }; + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$1.parseForIn = function(node, init) { + var isForIn = this.type === types._in; + this.next(); + + if ( + init.type === "VariableDeclaration" && + init.declarations[0].init != null && + ( + !isForIn || + this.options.ecmaVersion < 8 || + this.strict || + init.kind !== "var" || + init.declarations[0].id.type !== "Identifier" + ) + ) { + this.raise( + init.start, + ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") + ); + } else if (init.type === "AssignmentPattern") { + this.raise(init.start, "Invalid left-hand side in for-loop"); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") + }; + + // Parse a list of variable declarations. + + pp$1.parseVar = function(node, isFor, kind) { + node.declarations = []; + node.kind = kind; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === "const" && !(this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { + this.unexpected(); + } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types.comma)) { break } + } + return node + }; + + pp$1.parseVarId = function(decl, kind) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + }; + + var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; + + // Parse a function declaration or literal (depending on the + // `statement & FUNC_STATEMENT`). + + // Remove `allowExpressionBody` for 7.0.0, as it is only called with false + pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { + this.initFunction(node); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) + { this.unexpected(); } + node.generator = this.eat(types.star); + } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + if (statement & FUNC_STATEMENT) { + node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); + if (node.id && !(statement & FUNC_HANGING_STATEMENT)) + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + } + + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + + if (!(statement & FUNC_STATEMENT)) + { node.id = this.type === types.name ? this.parseIdent() : null; } + + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") + }; + + pp$1.parseFunctionParams = function(node) { + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$1.parseClass = function(node, isStatement) { + this.next(); + + // ecma-262 14.6 Class Definitions + // A class definition is always strict mode code. + var oldStrict = this.strict; + this.strict = true; + + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + var element = this.parseClassElement(node.superClass !== null); + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor") { + if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); } + hadConstructor = true; + } + } + } + node.body = this.finishNode(classBody, "ClassBody"); + this.strict = oldStrict; + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + }; + + pp$1.parseClassElement = function(constructorAllowsSuper) { + var this$1 = this; + + if (this.eat(types.semi)) { return null } + + var method = this.startNode(); + var tryContextual = function (k, noLineBreak) { + if ( noLineBreak === void 0 ) noLineBreak = false; + + var start = this$1.start, startLoc = this$1.startLoc; + if (!this$1.eatContextual(k)) { return false } + if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } + if (method.key) { this$1.unexpected(); } + method.computed = false; + method.key = this$1.startNodeAt(start, startLoc); + method.key.name = k; + this$1.finishNode(method.key, "Identifier"); + return false + }; + + method.kind = "method"; + method.static = tryContextual("static"); + var isGenerator = this.eat(types.star); + var isAsync = false; + if (!isGenerator) { + if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + } else if (tryContextual("get")) { + method.kind = "get"; + } else if (tryContextual("set")) { + method.kind = "set"; + } + } + if (!method.key) { this.parsePropertyName(method); } + var key = method.key; + var allowsDirectSuper = false; + if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } + if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } + if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } + method.kind = "constructor"; + allowsDirectSuper = constructorAllowsSuper; + } else if (method.static && key.type === "Identifier" && key.name === "prototype") { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); + if (method.kind === "get" && method.value.params.length !== 0) + { this.raiseRecoverable(method.value.start, "getter should have no params"); } + if (method.kind === "set" && method.value.params.length !== 1) + { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } + return method + }; + + pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + return this.finishNode(method, "MethodDefinition") + }; + + pp$1.parseClassId = function(node, isStatement) { + if (this.type === types.name) { + node.id = this.parseIdent(); + if (isStatement) + { this.checkLVal(node.id, BIND_LEXICAL, false); } + } else { + if (isStatement === true) + { this.unexpected(); } + node.id = null; + } + }; + + pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; + }; + + // Parses module export declaration. + + pp$1.parseExport = function(node, exports) { + this.next(); + // export * from '...' + if (this.eat(types.star)) { + this.expectContextual("from"); + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(types._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart); + var isAsync; + if (this.type === types._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { this.next(); } + node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); + } else if (this.type === types._class) { + var cNode = this.startNode(); + node.declaration = this.parseClass(cNode, "nullableID"); + } else { + node.declaration = this.parseMaybeAssign(); + this.semicolon(); + } + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(null); + if (node.declaration.type === "VariableDeclaration") + { this.checkVariableExport(exports, node.declaration.declarations); } + else + { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } + node.specifiers = []; + node.source = null; + } else { // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + } else { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) { + // check for keywords used as local names + var spec = list[i]; + + this.checkUnreserved(spec.local); + // check if export is defined + this.checkLocalExport(spec.local); + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration") + }; + + pp$1.checkExport = function(exports, name, pos) { + if (!exports) { return } + if (has(exports, name)) + { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } + exports[name] = true; + }; + + pp$1.checkPatternExport = function(exports, pat) { + var type = pat.type; + if (type === "Identifier") + { this.checkExport(exports, pat.name, pat.start); } + else if (type === "ObjectPattern") + { for (var i = 0, list = pat.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkPatternExport(exports, prop); + } } + else if (type === "ArrayPattern") + { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + + if (elt) { this.checkPatternExport(exports, elt); } + } } + else if (type === "Property") + { this.checkPatternExport(exports, pat.value); } + else if (type === "AssignmentPattern") + { this.checkPatternExport(exports, pat.left); } + else if (type === "RestElement") + { this.checkPatternExport(exports, pat.argument); } + else if (type === "ParenthesizedExpression") + { this.checkPatternExport(exports, pat.expression); } + }; + + pp$1.checkVariableExport = function(exports, decls) { + if (!exports) { return } + for (var i = 0, list = decls; i < list.length; i += 1) + { + var decl = list[i]; + + this.checkPatternExport(exports, decl.id); + } + }; + + pp$1.shouldParseExportStatement = function() { + return this.type.keyword === "var" || + this.type.keyword === "const" || + this.type.keyword === "class" || + this.type.keyword === "function" || + this.isLet() || + this.isAsyncFunction() + }; + + // Parses a comma-separated list of module exports. + + pp$1.parseExportSpecifiers = function(exports) { + var nodes = [], first = true; + // export { x, y as z } [from '...'] + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node = this.startNode(); + node.local = this.parseIdent(true); + node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; + this.checkExport(exports, node.exported.name, node.exported.start); + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + return nodes + }; + + // Parses import declaration. + + pp$1.parseImport = function(node) { + this.next(); + // import '...' + if (this.type === types.string) { + node.specifiers = empty; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration") + }; + + // Parses a comma-separated list of module imports. + + pp$1.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLVal(node.local, BIND_LEXICAL); + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); + if (!this.eat(types.comma)) { return nodes } + } + if (this.type === types.star) { + var node$1 = this.startNode(); + this.next(); + this.expectContextual("as"); + node$1.local = this.parseIdent(); + this.checkLVal(node$1.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); + return nodes + } + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node$2 = this.startNode(); + node$2.imported = this.parseIdent(true); + if (this.eatContextual("as")) { + node$2.local = this.parseIdent(); + } else { + this.checkUnreserved(node$2.imported); + node$2.local = node$2.imported; + } + this.checkLVal(node$2.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$2, "ImportSpecifier")); + } + return nodes + }; + + // Set `ExpressionStatement#directive` property for directive prologues. + pp$1.adaptDirectivePrologue = function(statements) { + for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { + statements[i].directive = statements[i].expression.raw.slice(1, -1); + } + }; + pp$1.isDirectiveCandidate = function(statement) { + return ( + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + typeof statement.expression.value === "string" && + // Reject parenthesized strings. + (this.input[statement.start] === "\"" || this.input[statement.start] === "'") + ) + }; + + var pp$2 = Parser.prototype; + + // Convert existing expression atom to assignable pattern + // if possible. + + pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } + break + + case "ObjectPattern": + case "ArrayPattern": + case "RestElement": + break + + case "ObjectExpression": + node.type = "ObjectPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.toAssignable(prop, isBinding); + // Early error: + // AssignmentRestProperty[Yield, Await] : + // `...` DestructuringAssignmentTarget[Yield, Await] + // + // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. + if ( + prop.type === "RestElement" && + (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") + ) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break + + case "Property": + // AssignmentProperty has type === "Property" + if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } + this.toAssignable(node.value, isBinding); + break + + case "ArrayExpression": + node.type = "ArrayPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + this.toAssignableList(node.elements, isBinding); + break + + case "SpreadElement": + node.type = "RestElement"; + this.toAssignable(node.argument, isBinding); + if (node.argument.type === "AssignmentPattern") + { this.raise(node.argument.start, "Rest elements cannot have a default value"); } + break + + case "AssignmentExpression": + if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isBinding); + // falls through to AssignmentPattern + + case "AssignmentPattern": + break + + case "ParenthesizedExpression": + this.toAssignable(node.expression, isBinding, refDestructuringErrors); + break + + case "MemberExpression": + if (!isBinding) { break } + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + return node + }; + + // Convert list of expression atoms to binding list. + + pp$2.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) { this.toAssignable(elt, isBinding); } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + { this.unexpected(last.argument.start); } + } + return exprList + }; + + // Parses spread element. + + pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node, "SpreadElement") + }; + + pp$2.parseRestBinding = function() { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (this.options.ecmaVersion === 6 && this.type !== types.name) + { this.unexpected(); } + + node.argument = this.parseBindingAtom(); + + return this.finishNode(node, "RestElement") + }; + + // Parses lvalue (assignable) atom. + + pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types.bracketR, true, true); + return this.finishNode(node, "ArrayPattern") + + case types.braceL: + return this.parseObj(true) + } + } + return this.parseIdent() + }; + + pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { first = false; } + else { this.expect(types.comma); } + if (allowEmpty && this.type === types.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break + } else if (this.type === types.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + this.expect(close); + break + } else { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + elts.push(elem); + } + } + return elts + }; + + pp$2.parseBindingListItem = function(param) { + return param + }; + + // Parses assignment pattern around given atom if possible. + + pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern") + }; + + // Verify that a node is an lval — something that can be assigned + // to. + // bindingType can be either: + // 'var' indicating that the lval creates a 'var' binding + // 'let' indicating that the lval creates a lexical ('let' or 'const') binding + // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references + + pp$2.checkLVal = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Identifier": + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (checkClashes) { + if (has(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + break + + case "MemberExpression": + if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } + break + + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkLVal(prop, bindingType, checkClashes); + } + break + + case "Property": + // AssignmentProperty has type === "Property" + this.checkLVal(expr.value, bindingType, checkClashes); + break + + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + + if (elem) { this.checkLVal(elem, bindingType, checkClashes); } + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, bindingType, checkClashes); + break + + case "RestElement": + this.checkLVal(expr.argument, bindingType, checkClashes); + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, bindingType, checkClashes); + break + + default: + this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); + } + }; + + // A recursive descent parser operates by defining functions for all + + var pp$3 = Parser.prototype; + + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. + + pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") + { return } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + { return } + var key = prop.key; + var name; + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } + // Backwards-compat kludge. Can be removed in version 6.0 + else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } + } + propHash.proto = true; + } + return + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) + { this.raiseRecoverable(key.start, "Redefinition of property"); } + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); + if (this.type === types.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(types.comma)) { node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); } + return this.finishNode(node, "SequenceExpression") + } + return expr + }; + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { return this.parseYield(noIn) } + // The tokenizer will assume an expression is allowed after + // `yield`, but this isn't that kind of yield + else { this.exprAllowed = false; } + } + + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldShorthandAssign = refDestructuringErrors.shorthandAssign; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; + } else { + refDestructuringErrors = new DestructuringErrors; + ownDestructuringErrors = true; + } + + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types.parenL || this.type === types.name) + { this.potentialArrowAt = this.start; } + var left = this.parseMaybeConditional(noIn, refDestructuringErrors); + if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; + if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } + refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly + this.checkLVal(left); + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } + } + if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } + if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } + if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } + return left + }; + + // Parse a ternary conditional (`?:`) operator. + + pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(noIn, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + if (this.eat(types.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression") + } + return expr + }; + + // Start the precedence parser. + + pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) + }; + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== types._in)) { + if (prec > minPrec) { + var logical = this.type === types.logicalOR || this.type === types.logicalAND; + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left + }; + + pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.operator = op; + node.right = right; + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + }; + + // Parse unary operators, both prefix and postfix. + + pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { + expr = this.parseAwait(); + sawUnary = true; + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === types.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(null, true); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { this.checkLVal(node.argument); } + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } + else { sawUnary = true; } + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } else { + expr = this.parseExprSubscripts(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + + if (!sawUnary && this.eat(types.starstar)) + { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } + else + { return expr } + }; + + // Parse call, dot, and `[]`-subscript expressions. + + pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors); + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } + var result = this.parseSubscripts(expr, startPos, startLoc); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } + if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } + } + return result + }; + + pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; + while (true) { + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); + if (element === base || element.type === "ArrowFunctionExpression") { return element } + base = element; + } + }; + + pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { + var computed = this.eat(types.bracketL); + if (computed || this.eat(types.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = computed ? this.parseExpression() : this.parseIdent(true); + node.computed = !!computed; + if (computed) { this.expect(types.bracketR); } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(types.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && base.type !== "Import", false, refDestructuringErrors); + if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (node$1.callee.type === "Import") { + if (node$1.arguments.length !== 1) { + this.raise(node$1.start, "import() requires exactly one argument"); + } + + var importArg = node$1.arguments[0]; + if (importArg && importArg.type === "SpreadElement") { + this.raise(importArg.start, "... is not allowed in import()"); + } + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types.backQuote) { + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({isTagged: true}); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base + }; + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$3.parseExprAtom = function(refDestructuringErrors) { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.type === types.slash) { this.readRegexp(); } + + var node, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types._super: + if (!this.allowSuper) + { this.raise(this.start, "'super' keyword outside a method"); } + node = this.startNode(); + this.next(); + if (this.type === types.parenL && !this.allowDirectSuper) + { this.raise(node.start, "super() call outside constructor of a subclass"); } + // The `super` keyword can appear at below: + // SuperProperty: + // super [ Expression ] + // super . IdentifierName + // SuperCall: + // super Arguments + if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) + { this.unexpected(); } + return this.finishNode(node, "Super") + + case types._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression") + + case types.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) + { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types.arrow)) + { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types.arrow)) + { this.unexpected(); } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) + } + } + return id + + case types.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = {pattern: value.pattern, flags: value.flags}; + return node + + case types.num: case types.string: + return this.parseLiteral(this.value) + + case types._null: case types._true: case types._false: + node = this.startNode(); + node.value = this.type === types._null ? null : this.type === types._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal") + + case types.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + { refDestructuringErrors.parenthesizedAssign = start; } + if (refDestructuringErrors.parenthesizedBind < 0) + { refDestructuringErrors.parenthesizedBind = start; } + } + return expr + + case types.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression") + + case types.braceL: + return this.parseObj(false, refDestructuringErrors) + + case types._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, 0) + + case types._class: + return this.parseClass(this.startNode(), false) + + case types._new: + return this.parseNew() + + case types.backQuote: + return this.parseTemplate() + + case types._import: + if (this.options.ecmaVersion > 10) { + return this.parseDynamicImport() + } else { + return this.unexpected() + } + + default: + this.unexpected(); + } + }; + + pp$3.parseDynamicImport = function() { + var node = this.startNode(); + this.next(); + if (this.type !== types.parenL) { + this.unexpected(); + } + return this.finishNode(node, "Import") + }; + + pp$3.parseLiteral = function(value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1); } + this.next(); + return this.finishNode(node, "Literal") + }; + + pp$3.parseParenExpression = function() { + this.expect(types.parenL); + var val = this.parseExpression(); + this.expect(types.parenR); + return val + }; + + pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + // Do not save awaitIdentPos to allow checking awaits nested in parameters + while (this.type !== types.parenR) { + first ? first = false : this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(types.parenR, true)) { + lastIsComma = true; + break + } else if (this.type === types.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + break + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc; + this.expect(types.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } + if (spreadStart) { this.unexpected(spreadStart); } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } + }; + + pp$3.parseParenItem = function(item) { + return item + }; + + pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) + }; + + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. + + var empty$1 = []; + + pp$3.parseNew = function() { + var node = this.startNode(); + var meta = this.parseIdent(true); + if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { + node.meta = meta; + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target" || containsEsc) + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } + if (!this.inNonArrowFunction()) + { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + if (this.options.ecmaVersion > 10 && node.callee.type === "Import") { + this.raise(node.callee.start, "Cannot use new with import(...)"); + } + if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && node.callee.type !== "Import", false); } + else { node.arguments = empty$1; } + return this.finishNode(node, "NewExpression") + }; + + // Parse template expression. + + pp$3.parseTemplateElement = function(ref) { + var isTagged = ref.isTagged; + + var elem = this.startNode(); + if (this.type === types.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value, + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types.backQuote; + return this.finishNode(elem, "TemplateElement") + }; + + pp$3.parseTemplate = function(ref) { + if ( ref === void 0 ) ref = {}; + var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; + + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement({isTagged: isTagged}); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types.eof) { this.raise(this.pos, "Unterminated template literal"); } + this.expect(types.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types.braceR); + node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); + } + this.next(); + return this.finishNode(node, "TemplateLiteral") + }; + + pp$3.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && + (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && + !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + // Parse an object literal or binding pattern. + + pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var node = this.startNode(), first = true, propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } + node.properties.push(prop); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + }; + + pp$3.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types.comma) { + this.raise(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement") + } + // To disallow parenthesized identifier via `this.toAssignable()`. + if (this.type === types.parenL && refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0) { + refDestructuringErrors.parenthesizedAssign = this.start; + } + if (refDestructuringErrors.parenthesizedBind < 0) { + refDestructuringErrors.parenthesizedBind = this.start; + } + } + // Parse argument. + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + // To disallow trailing comma via `this.toAssignable()`. + if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + // Finish + return this.finishNode(prop, "SpreadElement") + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) + { isGenerator = this.eat(types.star); } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + this.parsePropertyName(prop, refDestructuringErrors); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property") + }; + + pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types.colon) + { this.unexpected(); } + + if (this.eat(types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { + if (isPattern) { this.unexpected(); } + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (!isPattern && !containsEsc && + this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type !== types.comma && this.type !== types.braceR)) { + if (isGenerator || isAsync) { this.unexpected(); } + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start = prop.value.start; + if (prop.kind === "get") + { this.raiseRecoverable(start, "getter should have no params"); } + else + { this.raiseRecoverable(start, "setter should have exactly one param"); } + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } + } + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { this.unexpected(); } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = startPos; } + prop.kind = "init"; + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else if (this.type === types.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + { refDestructuringErrors.shorthandAssign = this.start; } + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else { + prop.value = prop.key; + } + prop.shorthand = true; + } else { this.unexpected(); } + }; + + pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types.bracketR); + return prop.key + } else { + prop.computed = false; + } + } + return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true) + }; + + // Initialize empty function node. + + pp$3.initFunction = function(node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } + if (this.options.ecmaVersion >= 8) { node.async = false; } + }; + + // Parse object or class method. + + pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.initFunction(node); + if (this.options.ecmaVersion >= 6) + { node.generator = isGenerator; } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "FunctionExpression") + }; + + // Parse arrow function expression with given parameters. + + pp$3.parseArrowExpression = function(node, params, isAsync) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node); + if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "ArrowFunctionExpression") + }; + + // Parse function body and check parameters. + + pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { + var isExpression = isArrowFunction && this.type !== types.braceL; + var oldStrict = this.strict, useStrict = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + this.checkParams(node, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { this.strict = true; } + + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); + node.body = this.parseBlock(false); + node.expression = false; + this.adaptDirectivePrologue(node.body.body); + this.labels = oldLabels; + } + this.exitScope(); + + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } + this.strict = oldStrict; + }; + + pp$3.isSimpleParamList = function(params) { + for (var i = 0, list = params; i < list.length; i += 1) + { + var param = list[i]; + + if (param.type !== "Identifier") { return false + } } + return true + }; + + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. + + pp$3.checkParams = function(node, allowDuplicates) { + var nameHash = {}; + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); + } + }; + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { break } + } else { first = false; } + + var elt = (void 0); + if (allowEmpty && this.type === types.comma) + { elt = null; } + else if (this.type === types.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types.comma && refDestructuringErrors.trailingComma < 0) + { refDestructuringErrors.trailingComma = this.start; } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts + }; + + pp$3.checkUnreserved = function(ref) { + var start = ref.start; + var end = ref.end; + var name = ref.name; + + if (this.inGenerator && name === "yield") + { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } + if (this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } + if (this.keywords.test(name)) + { this.raise(start, ("Unexpected keyword '" + name + "'")); } + if (this.options.ecmaVersion < 6 && + this.input.slice(start, end).indexOf("\\") !== -1) { return } + var re = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re.test(name)) { + if (!this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } + this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); + } + }; + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$3.parseIdent = function(liberal, isBinding) { + var node = this.startNode(); + if (liberal && this.options.allowReserved === "never") { liberal = false; } + if (this.type === types.name) { + node.name = this.value; + } else if (this.type.keyword) { + node.name = this.type.keyword; + + // To fix https://github.com/acornjs/acorn/issues/575 + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword + if ((node.name === "class" || node.name === "function") && + (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + } else { + this.unexpected(); + } + this.next(); + this.finishNode(node, "Identifier"); + if (!liberal) { + this.checkUnreserved(node); + if (node.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = node.start; } + } + return node + }; + + // Parses yield expression inside generator. + + pp$3.parseYield = function(noIn) { + if (!this.yieldPos) { this.yieldPos = this.start; } + + var node = this.startNode(); + this.next(); + if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types.star); + node.argument = this.parseMaybeAssign(noIn); + } + return this.finishNode(node, "YieldExpression") + }; + + pp$3.parseAwait = function() { + if (!this.awaitPos) { this.awaitPos = this.start; } + + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeUnary(null, true); + return this.finishNode(node, "AwaitExpression") + }; + + var pp$4 = Parser.prototype; + + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. + + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; err.loc = loc; err.raisedAt = this.pos; + throw err + }; + + pp$4.raiseRecoverable = pp$4.raise; + + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + }; + + var pp$5 = Parser.prototype; + + var Scope = function Scope(flags) { + this.flags = flags; + // A list of var-declared names in the current lexical scope + this.var = []; + // A list of lexically-declared names in the current lexical scope + this.lexical = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + this.functions = []; + }; + + // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. + + pp$5.enterScope = function(flags) { + this.scopeStack.push(new Scope(flags)); + }; + + pp$5.exitScope = function() { + this.scopeStack.pop(); + }; + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + pp$5.treatFunctionsAsVarInScope = function(scope) { + return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) + }; + + pp$5.declareName = function(name, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + if (this.inModule && (scope.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + } else if (bindingType === BIND_SIMPLE_CATCH) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) + { redeclared = scope$2.lexical.indexOf(name) > -1; } + else + { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } + scope$2.functions.push(name); + } else { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + var scope$3 = this.scopeStack[i]; + if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || + !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { + redeclared = true; + break + } + scope$3.var.push(name); + if (this.inModule && (scope$3.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + if (scope$3.flags & SCOPE_VAR) { break } + } + } + if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } + }; + + pp$5.checkLocalExport = function(id) { + // scope.functions must be empty as Module code is always strict. + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + + pp$5.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1] + }; + + pp$5.currentVarScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { return scope } + } + }; + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + pp$5.currentThisScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } + } + }; + + var Node = function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) + { this.loc = new SourceLocation(parser, loc); } + if (parser.options.directSourceFile) + { this.sourceFile = parser.options.directSourceFile; } + if (parser.options.ranges) + { this.range = [pos, 0]; } + }; + + // Start an AST node, attaching a start offset. + + var pp$6 = Parser.prototype; + + pp$6.startNode = function() { + return new Node(this, this.start, this.startLoc) + }; + + pp$6.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + }; + + // Finish an AST node, adding `type` and `end` properties. + + function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) + { node.loc.end = loc; } + if (this.options.ranges) + { node.range[1] = pos; } + return node + } + + pp$6.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + }; + + // Finish node at given position + + pp$6.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + }; + + // The algorithm used to determine whether a regexp can appear at a + + var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + + var types$1 = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", false), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), + f_stat: new TokContext("function", false), + f_expr: new TokContext("function", true), + f_expr_gen: new TokContext("function", true, false, null, true), + f_gen: new TokContext("function", false, false, null, true) + }; + + var pp$7 = Parser.prototype; + + pp$7.initialContext = function() { + return [types$1.b_stat] + }; + + pp$7.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types$1.f_expr || parent === types$1.f_stat) + { return true } + if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) + { return !parent.isExpr } + + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if (prevType === types._return || prevType === types.name && this.exprAllowed) + { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } + if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) + { return true } + if (prevType === types.braceL) + { return parent === types$1.b_stat } + if (prevType === types._var || prevType === types._const || prevType === types.name) + { return false } + return !this.exprAllowed + }; + + pp$7.inGeneratorContext = function() { + for (var i = this.context.length - 1; i >= 1; i--) { + var context = this.context[i]; + if (context.token === "function") + { return context.generator } + } + return false + }; -var empty$1 = []; + pp$7.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types.dot) + { this.exprAllowed = false; } + else if (update = type.updateContext) + { update.call(this, prevType); } + else + { this.exprAllowed = type.beforeExpr; } + }; -pp$3.parseNew = function() { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { - node.meta = meta; - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "target" || containsEsc) - { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } - if (!this.inNonArrowFunction()) - { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } - return this.finishNode(node, "MetaProperty") - } - var startPos = this.start, startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); } - else { node.arguments = empty$1; } - return this.finishNode(node, "NewExpression") -}; - -// Parse template expression. - -pp$3.parseTemplateElement = function(ref) { - var isTagged = ref.isTagged; - - var elem = this.startNode(); - if (this.type === types.invalidTemplate) { - if (!isTagged) { - this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); - } - elem.value = { - raw: this.value, - cooked: null - }; - } else { - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value + // Token-specific context update code + + types.parenR.updateContext = types.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return + } + var out = this.context.pop(); + if (out === types$1.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + + types.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); + this.exprAllowed = true; + }; + + types.dollarBraceL.updateContext = function() { + this.context.push(types$1.b_tmpl); + this.exprAllowed = true; + }; + + types.parenL.updateContext = function(prevType) { + var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); + this.exprAllowed = true; + }; + + types.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + }; + + types._function.updateContext = types._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && + !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && + !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) + { this.context.push(types$1.f_expr); } + else + { this.context.push(types$1.f_stat); } + this.exprAllowed = false; + }; + + types.backQuote.updateContext = function() { + if (this.curContext() === types$1.q_tmpl) + { this.context.pop(); } + else + { this.context.push(types$1.q_tmpl); } + this.exprAllowed = false; + }; + + types.star.updateContext = function(prevType) { + if (prevType === types._function) { + var index = this.context.length - 1; + if (this.context[index] === types$1.f_expr) + { this.context[index] = types$1.f_expr_gen; } + else + { this.context[index] = types$1.f_gen; } + } + this.exprAllowed = true; + }; + + types.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { + if (this.value === "of" && !this.exprAllowed || + this.value === "yield" && this.inGeneratorContext()) + { allowed = true; } + } + this.exprAllowed = allowed; + }; + + // This file contains Unicode properties extracted from the ECMAScript + // specification. The lists are extracted like so: + // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) + + // #table-binary-unicode-properties + var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; + var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; + var ecma11BinaryProperties = ecma10BinaryProperties; + var unicodeBinaryProperties = { + 9: ecma9BinaryProperties, + 10: ecma10BinaryProperties, + 11: ecma11BinaryProperties + }; + + // #table-unicode-general-category-values + var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; + + // #table-unicode-script-values + var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; + var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; + var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; + var unicodeScriptValues = { + 9: ecma9ScriptValues, + 10: ecma10ScriptValues, + 11: ecma11ScriptValues + }; + + var data = {}; + function buildUnicodeData(ecmaVersion) { + var d = data[ecmaVersion] = { + binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), + nonBinary: { + General_Category: wordsRegexp(unicodeGeneralCategoryValues), + Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) + } }; - } - this.next(); - elem.tail = this.type === types.backQuote; - return this.finishNode(elem, "TemplateElement") -}; - -pp$3.parseTemplate = function(ref) { - var this$1 = this; - if ( ref === void 0 ) ref = {}; - var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; - - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement({isTagged: isTagged}); - node.quasis = [curElt]; - while (!curElt.tail) { - if (this$1.type === types.eof) { this$1.raise(this$1.pos, "Unterminated template literal"); } - this$1.expect(types.dollarBraceL); - node.expressions.push(this$1.parseExpression()); - this$1.expect(types.braceR); - node.quasis.push(curElt = this$1.parseTemplateElement({isTagged: isTagged})); - } - this.next(); - return this.finishNode(node, "TemplateLiteral") -}; - -pp$3.isAsyncProp = function(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && - (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && - !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; - -// Parse an object literal or binding pattern. - -pp$3.parseObj = function(isPattern, refDestructuringErrors) { - var this$1 = this; - - var node = this.startNode(), first = true, propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var prop = this$1.parseProperty(isPattern, refDestructuringErrors); - if (!isPattern) { this$1.checkPropClash(prop, propHash, refDestructuringErrors); } - node.properties.push(prop); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") -}; - -pp$3.parseProperty = function(isPattern, refDestructuringErrors) { - var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; - if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { - if (isPattern) { - prop.argument = this.parseIdent(false); - if (this.type === types.comma) { - this.raise(this.start, "Comma is not permitted after the rest element"); + d.nonBinary.Script_Extensions = d.nonBinary.Script; + + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + buildUnicodeData(9); + buildUnicodeData(10); + buildUnicodeData(11); + + var pp$8 = Parser.prototype; + + var RegExpValidationState = function RegExpValidationState(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); + this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = []; + this.backReferenceNames = []; + }; + + RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { + var unicode = flags.indexOf("u") !== -1; + this.start = start | 0; + this.source = pattern + ""; + this.flags = flags; + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + }; + + RegExpValidationState.prototype.raise = function raise (message) { + this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); + }; + + // If u flag is given, this returns the code point at the index (it combines a surrogate pair). + // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). + RegExpValidationState.prototype.at = function at (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return -1 + } + var c = s.charCodeAt(i); + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return c + } + return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 + }; + + RegExpValidationState.prototype.nextIndex = function nextIndex (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return l + } + var c = s.charCodeAt(i); + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return i + 1 + } + return i + 2 + }; + + RegExpValidationState.prototype.current = function current () { + return this.at(this.pos) + }; + + RegExpValidationState.prototype.lookahead = function lookahead () { + return this.at(this.nextIndex(this.pos)) + }; + + RegExpValidationState.prototype.advance = function advance () { + this.pos = this.nextIndex(this.pos); + }; + + RegExpValidationState.prototype.eat = function eat (ch) { + if (this.current() === ch) { + this.advance(); + return true + } + return false + }; + + function codePointToString(ch) { + if (ch <= 0xFFFF) { return String.fromCharCode(ch) } + ch -= 0x10000; + return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) + } + + /** + * Validate the flags part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + + for (var i = 0; i < flags.length; i++) { + var flag = flags.charAt(i); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); } - return this.finishNode(prop, "RestElement") + if (flags.indexOf(flag, i + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + } + }; + + /** + * Validate the pattern part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + + // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of + // parsing contains a |GroupName|, reparse with the goal symbol + // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* + // exception if _P_ did not conform to the grammar, if any elements of _P_ + // were not matched by the parse, or if any Early Error conditions exist. + if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { + state.switchN = true; + this.regexp_pattern(state); } - // To disallow parenthesized identifier via `this.toAssignable()`. - if (this.type === types.parenL && refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0) { - refDestructuringErrors.parenthesizedAssign = this.start; + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern + pp$8.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames.length = 0; + state.backReferenceNames.length = 0; + + this.regexp_disjunction(state); + + if (state.pos !== state.source.length) { + // Make the same messages as V8. + if (state.eat(0x29 /* ) */)) { + state.raise("Unmatched ')'"); } - if (refDestructuringErrors.parenthesizedBind < 0) { - refDestructuringErrors.parenthesizedBind = this.start; + if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { + state.raise("Lone quantifier brackets"); } } - // Parse argument. - prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); - // To disallow trailing comma via `this.toAssignable()`. - if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); } - // Finish - return this.finishNode(prop, "SpreadElement") - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) - { isGenerator = this.eat(types.star); } - } - var containsEsc = this.containsEsc; - this.parsePropertyName(prop); - if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - this.parsePropertyName(prop, refDestructuringErrors); - } else { - isAsync = false; - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); - return this.finishNode(prop, "Property") -}; - -pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { - if ((isGenerator || isAsync) && this.type === types.colon) - { this.unexpected(); } - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { - if (isPattern) { this.unexpected(); } - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } else if (!isPattern && !containsEsc && - this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type !== types.comma && this.type !== types.braceR)) { - if (isGenerator || isAsync) { this.unexpected(); } - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") - { this.raiseRecoverable(start, "getter should have no params"); } - else - { this.raiseRecoverable(start, "setter should have exactly one param"); } - } else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") - { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (isGenerator || isAsync) { this.unexpected(); } - this.checkUnreserved(prop.key); - if (prop.key.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = startPos; } - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === types.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) - { refDestructuringErrors.shorthandAssign = this.start; } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else { this.unexpected(); } -}; - -pp$3.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - return prop.key - } else { - prop.computed = false; + for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { + var name = list[i]; + + if (state.groupNames.indexOf(name) === -1) { + state.raise("Invalid named capture referenced"); + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction + pp$8.regexp_disjunction = function(state) { + this.regexp_alternative(state); + while (state.eat(0x7C /* | */)) { + this.regexp_alternative(state); } - } - return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true) -}; - -// Initialize empty function node. - -pp$3.initFunction = function(node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } - if (this.options.ecmaVersion >= 8) { node.async = false; } -}; - -// Parse object or class method. - -pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { - var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.initFunction(node); - if (this.options.ecmaVersion >= 6) - { node.generator = isGenerator; } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBody(node, false, true); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "FunctionExpression") -}; - -// Parse arrow function expression with given parameters. - -pp$3.parseArrowExpression = function(node, params, isAsync) { - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node); - if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "ArrowFunctionExpression") -}; - -// Parse function body and check parameters. - -pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { - var isExpression = isArrowFunction && this.type !== types.braceL; - var oldStrict = this.strict, useStrict = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - this.checkParams(node, false); - } else { - var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end); - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (useStrict && nonSimple) - { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } - } - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldLabels = this.labels; - this.labels = []; - if (useStrict) { this.strict = true; } - - // Add the params to varDeclaredNames to ensure that an error is thrown - // if a let/const declaration in the function clashes with one of the params. - this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); - node.body = this.parseBlock(false); - node.expression = false; - this.adaptDirectivePrologue(node.body.body); - this.labels = oldLabels; - } - this.exitScope(); - // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' - if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } - this.strict = oldStrict; -}; + // Make the same message as V8. + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat(0x7B /* { */)) { + state.raise("Lone quantifier brackets"); + } + }; -pp$3.isSimpleParamList = function(params) { - for (var i = 0, list = params; i < list.length; i += 1) - { - var param = list[i]; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative + pp$8.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) + { } + }; - if (param.type !== "Identifier") { return false - } } - return true -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term + pp$8.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + // Handle `QuantifiableAssertion Quantifier` alternative. + // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion + // is a QuantifiableAssertion. + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + // Make the same message as V8. + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true + } -// Checks function params for various disallowed patterns such as using "eval" -// or "arguments" and duplicate parameters. + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true + } -pp$3.checkParams = function(node, allowDuplicates) { - var this$1 = this; + return false + }; - var nameHash = {}; - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion + pp$8.regexp_eatAssertion = function(state) { + var start = state.pos; + state.lastAssertionIsQuantifiable = false; - this$1.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (!first) { - this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(close)) { break } - } else { first = false; } - - var elt = (void 0); - if (allowEmpty && this$1.type === types.comma) - { elt = null; } - else if (this$1.type === types.ellipsis) { - elt = this$1.parseSpread(refDestructuringErrors); - if (refDestructuringErrors && this$1.type === types.comma && refDestructuringErrors.trailingComma < 0) - { refDestructuringErrors.trailingComma = this$1.start; } - } else { - elt = this$1.parseMaybeAssign(false, refDestructuringErrors); + // ^, $ + if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { + return true } - elts.push(elt); - } - return elts -}; - -pp$3.checkUnreserved = function(ref) { - var start = ref.start; - var end = ref.end; - var name = ref.name; - - if (this.inGenerator && name === "yield") - { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } - if (this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } - if (this.keywords.test(name)) - { this.raise(start, ("Unexpected keyword '" + name + "'")); } - if (this.options.ecmaVersion < 6 && - this.input.slice(start, end).indexOf("\\") !== -1) { return } - var re = this.strict ? this.reservedWordsStrict : this.reservedWords; - if (re.test(name)) { - if (!this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } - this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); - } -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp$3.parseIdent = function(liberal, isBinding) { - var node = this.startNode(); - if (liberal && this.options.allowReserved === "never") { liberal = false; } - if (this.type === types.name) { - node.name = this.value; - } else if (this.type.keyword) { - node.name = this.type.keyword; - - // To fix https://github.com/acornjs/acorn/issues/575 - // `class` and `function` keywords push new context into this.context. - // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. - // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword - if ((node.name === "class" || node.name === "function") && - (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { - this.context.pop(); - } - } else { - this.unexpected(); - } - this.next(); - this.finishNode(node, "Identifier"); - if (!liberal) { - this.checkUnreserved(node); - if (node.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = node.start; } - } - return node -}; - -// Parses yield expression inside generator. - -pp$3.parseYield = function(noIn) { - if (!this.yieldPos) { this.yieldPos = this.start; } - - var node = this.startNode(); - this.next(); - if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(noIn); - } - return this.finishNode(node, "YieldExpression") -}; - -pp$3.parseAwait = function() { - if (!this.awaitPos) { this.awaitPos = this.start; } - - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(null, true); - return this.finishNode(node, "AwaitExpression") -}; - -var pp$4 = Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp$4.raise = function(pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; err.loc = loc; err.raisedAt = this.pos; - throw err -}; - -pp$4.raiseRecoverable = pp$4.raise; - -pp$4.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } -}; - -var pp$5 = Parser.prototype; - -var Scope = function Scope(flags) { - this.flags = flags; - // A list of var-declared names in the current lexical scope - this.var = []; - // A list of lexically-declared names in the current lexical scope - this.lexical = []; - // A list of lexically-declared FunctionDeclaration names in the current lexical scope - this.functions = []; -}; - -// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. - -pp$5.enterScope = function(flags) { - this.scopeStack.push(new Scope(flags)); -}; - -pp$5.exitScope = function() { - this.scopeStack.pop(); -}; - -// The spec says: -// > At the top level of a function, or script, function declarations are -// > treated like var declarations rather than like lexical declarations. -pp$5.treatFunctionsAsVarInScope = function(scope) { - return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) -}; - -pp$5.declareName = function(name, bindingType, pos) { - var this$1 = this; - - var redeclared = false; - if (bindingType === BIND_LEXICAL) { - var scope = this.currentScope(); - redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - scope.lexical.push(name); - if (this.inModule && (scope.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - } else if (bindingType === BIND_SIMPLE_CATCH) { - var scope$1 = this.currentScope(); - scope$1.lexical.push(name); - } else if (bindingType === BIND_FUNCTION) { - var scope$2 = this.currentScope(); - if (this.treatFunctionsAsVar) - { redeclared = scope$2.lexical.indexOf(name) > -1; } - else - { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } - scope$2.functions.push(name); - } else { - for (var i = this.scopeStack.length - 1; i >= 0; --i) { - var scope$3 = this$1.scopeStack[i]; - if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || - !this$1.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { - redeclared = true; - break + + // \b \B + if (state.eat(0x5C /* \ */)) { + if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + return true } - scope$3.var.push(name); - if (this$1.inModule && (scope$3.flags & SCOPE_TOP)) - { delete this$1.undefinedExports[name]; } - if (scope$3.flags & SCOPE_VAR) { break } + state.pos = start; } - } - if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } -}; - -pp$5.checkLocalExport = function(id) { - // scope.functions must be empty as Module code is always strict. - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && - this.scopeStack[0].var.indexOf(id.name) === -1) { - this.undefinedExports[id.name] = id; - } -}; -pp$5.currentScope = function() { - return this.scopeStack[this.scopeStack.length - 1] -}; + // Lookahead / Lookbehind + if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat(0x3C /* < */); + } + if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { + this.regexp_disjunction(state); + if (!state.eat(0x29 /* ) */)) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true + } + } -pp$5.currentVarScope = function() { - var this$1 = this; + state.pos = start; + return false + }; - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this$1.scopeStack[i]; - if (scope.flags & SCOPE_VAR) { return scope } - } -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier + pp$8.regexp_eatQuantifier = function(state, noError) { + if ( noError === void 0 ) noError = false; -// Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. -pp$5.currentThisScope = function() { - var this$1 = this; + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat(0x3F /* ? */); + return true + } + return false + }; - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this$1.scopeStack[i]; - if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } - } -}; - -var Node = function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) - { this.loc = new SourceLocation(parser, loc); } - if (parser.options.directSourceFile) - { this.sourceFile = parser.options.directSourceFile; } - if (parser.options.ranges) - { this.range = [pos, 0]; } -}; - -// Start an AST node, attaching a start offset. - -var pp$6 = Parser.prototype; - -pp$6.startNode = function() { - return new Node(this, this.start, this.startLoc) -}; - -pp$6.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) -}; - -// Finish an AST node, adding `type` and `end` properties. - -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) - { node.loc.end = loc; } - if (this.options.ranges) - { node.range[1] = pos; } - return node -} - -pp$6.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) -}; - -// Finish node at given position - -pp$6.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) -}; - -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - this.generator = !!generator; -}; - -var types$1 = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", false), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), - f_stat: new TokContext("function", false), - f_expr: new TokContext("function", true), - f_expr_gen: new TokContext("function", true, false, null, true), - f_gen: new TokContext("function", false, false, null, true) -}; - -var pp$7 = Parser.prototype; - -pp$7.initialContext = function() { - return [types$1.b_stat] -}; - -pp$7.braceIsBlock = function(prevType) { - var parent = this.curContext(); - if (parent === types$1.f_expr || parent === types$1.f_stat) - { return true } - if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) - { return !parent.isExpr } - - // The check for `tt.name && exprAllowed` detects whether we are - // after a `yield` or `of` construct. See the `updateContext` for - // `tt.name`. - if (prevType === types._return || prevType === types.name && this.exprAllowed) - { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) - { return true } - if (prevType === types.braceL) - { return parent === types$1.b_stat } - if (prevType === types._var || prevType === types._const || prevType === types.name) - { return false } - return !this.exprAllowed -}; - -pp$7.inGeneratorContext = function() { - var this$1 = this; - - for (var i = this.context.length - 1; i >= 1; i--) { - var context = this$1.context[i]; - if (context.token === "function") - { return context.generator } - } - return false -}; - -pp$7.updateContext = function(prevType) { - var update, type = this.type; - if (type.keyword && prevType === types.dot) - { this.exprAllowed = false; } - else if (update = type.updateContext) - { update.call(this, prevType); } - else - { this.exprAllowed = type.beforeExpr; } -}; - -// Token-specific context update code - -types.parenR.updateContext = types.braceR.updateContext = function() { - if (this.context.length === 1) { - this.exprAllowed = true; - return - } - var out = this.context.pop(); - if (out === types$1.b_stat && this.curContext().token === "function") { - out = this.context.pop(); - } - this.exprAllowed = !out.isExpr; -}; - -types.braceL.updateContext = function(prevType) { - this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); - this.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function() { - this.context.push(types$1.b_tmpl); - this.exprAllowed = true; -}; - -types.parenL.updateContext = function(prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); - this.exprAllowed = true; -}; - -types.incDec.updateContext = function() { - // tokExprAllowed stays unchanged -}; - -types._function.updateContext = types._class.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && - !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && - !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) - { this.context.push(types$1.f_expr); } - else - { this.context.push(types$1.f_stat); } - this.exprAllowed = false; -}; - -types.backQuote.updateContext = function() { - if (this.curContext() === types$1.q_tmpl) - { this.context.pop(); } - else - { this.context.push(types$1.q_tmpl); } - this.exprAllowed = false; -}; - -types.star.updateContext = function(prevType) { - if (prevType === types._function) { - var index = this.context.length - 1; - if (this.context[index] === types$1.f_expr) - { this.context[index] = types$1.f_expr_gen; } - else - { this.context[index] = types$1.f_gen; } - } - this.exprAllowed = true; -}; - -types.name.updateContext = function(prevType) { - var allowed = false; - if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { - if (this.value === "of" && !this.exprAllowed || - this.value === "yield" && this.inGeneratorContext()) - { allowed = true; } - } - this.exprAllowed = allowed; -}; - -// This file contains Unicode properties extracted from the ECMAScript -// specification. The lists are extracted like so: -// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) - -// #table-binary-unicode-properties -var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; -var unicodeBinaryProperties = { - 9: ecma9BinaryProperties, - 10: ecma9BinaryProperties + " Extended_Pictographic" -}; - -// #table-unicode-general-category-values -var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; - -// #table-unicode-script-values -var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; -var unicodeScriptValues = { - 9: ecma9ScriptValues, - 10: ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd" -}; - -var data = {}; -function buildUnicodeData(ecmaVersion) { - var d = data[ecmaVersion] = { - binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), - nonBinary: { - General_Category: wordsRegexp(unicodeGeneralCategoryValues), - Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) - } - }; - d.nonBinary.Script_Extensions = d.nonBinary.Script; - - d.nonBinary.gc = d.nonBinary.General_Category; - d.nonBinary.sc = d.nonBinary.Script; - d.nonBinary.scx = d.nonBinary.Script_Extensions; -} -buildUnicodeData(9); -buildUnicodeData(10); - -var pp$9 = Parser.prototype; - -var RegExpValidationState = function RegExpValidationState(parser) { - this.parser = parser; - this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); - this.unicodeProperties = data[parser.options.ecmaVersion >= 10 ? 10 : parser.options.ecmaVersion]; - this.source = ""; - this.flags = ""; - this.start = 0; - this.switchU = false; - this.switchN = false; - this.pos = 0; - this.lastIntValue = 0; - this.lastStringValue = ""; - this.lastAssertionIsQuantifiable = false; - this.numCapturingParens = 0; - this.maxBackReference = 0; - this.groupNames = []; - this.backReferenceNames = []; -}; - -RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { - var unicode = flags.indexOf("u") !== -1; - this.start = start | 0; - this.source = pattern + ""; - this.flags = flags; - this.switchU = unicode && this.parser.options.ecmaVersion >= 6; - this.switchN = unicode && this.parser.options.ecmaVersion >= 9; -}; - -RegExpValidationState.prototype.raise = function raise (message) { - this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); -}; - -// If u flag is given, this returns the code point at the index (it combines a surrogate pair). -// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). -RegExpValidationState.prototype.at = function at (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return -1 - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return c - } - return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 -}; - -RegExpValidationState.prototype.nextIndex = function nextIndex (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return l - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return i + 1 - } - return i + 2 -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix + pp$8.regexp_eatQuantifierPrefix = function(state, noError) { + return ( + state.eat(0x2A /* * */) || + state.eat(0x2B /* + */) || + state.eat(0x3F /* ? */) || + this.regexp_eatBracedQuantifier(state, noError) + ) + }; + pp$8.regexp_eatBracedQuantifier = function(state, noError) { + var start = state.pos; + if (state.eat(0x7B /* { */)) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat(0x7D /* } */)) { + // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start; + } + return false + }; -RegExpValidationState.prototype.current = function current () { - return this.at(this.pos) -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom + pp$8.regexp_eatAtom = function(state) { + return ( + this.regexp_eatPatternCharacters(state) || + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) + ) + }; + pp$8.regexp_eatReverseSolidusAtomEscape = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatAtomEscape(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatUncapturingGroup = function(state) { + var start = state.pos; + if (state.eat(0x28 /* ( */)) { + if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + return true + } + state.raise("Unterminated group"); + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatCapturingGroup = function(state) { + if (state.eat(0x28 /* ( */)) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 0x3F /* ? */) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + state.numCapturingParens += 1; + return true + } + state.raise("Unterminated group"); + } + return false + }; -RegExpValidationState.prototype.lookahead = function lookahead () { - return this.at(this.nextIndex(this.pos)) -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom + pp$8.regexp_eatExtendedAtom = function(state) { + return ( + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) || + this.regexp_eatInvalidBracedQuantifier(state) || + this.regexp_eatExtendedPatternCharacter(state) + ) + }; -RegExpValidationState.prototype.advance = function advance () { - this.pos = this.nextIndex(this.pos); -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier + pp$8.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false + }; -RegExpValidationState.prototype.eat = function eat (ch) { - if (this.current() === ch) { - this.advance(); - return true - } - return false -}; - -function codePointToString$1(ch) { - if (ch <= 0xFFFF) { return String.fromCharCode(ch) } - ch -= 0x10000; - return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) -} - -/** - * Validate the flags part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpFlags = function(state) { - var this$1 = this; - - var validFlags = state.validFlags; - var flags = state.flags; - - for (var i = 0; i < flags.length; i++) { - var flag = flags.charAt(i); - if (validFlags.indexOf(flag) === -1) { - this$1.raise(state.start, "Invalid regular expression flag"); - } - if (flags.indexOf(flag, i + 1) > -1) { - this$1.raise(state.start, "Duplicate regular expression flag"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter + pp$8.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter(ch)) { + state.lastIntValue = ch; + state.advance(); + return true } - } -}; - -/** - * Validate the pattern part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpPattern = function(state) { - this.regexp_pattern(state); - - // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of - // parsing contains a |GroupName|, reparse with the goal symbol - // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* - // exception if _P_ did not conform to the grammar, if any elements of _P_ - // were not matched by the parse, or if any Early Error conditions exist. - if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { - state.switchN = true; - this.regexp_pattern(state); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern -pp$9.regexp_pattern = function(state) { - state.pos = 0; - state.lastIntValue = 0; - state.lastStringValue = ""; - state.lastAssertionIsQuantifiable = false; - state.numCapturingParens = 0; - state.maxBackReference = 0; - state.groupNames.length = 0; - state.backReferenceNames.length = 0; - - this.regexp_disjunction(state); - - if (state.pos !== state.source.length) { - // Make the same messages as V8. - if (state.eat(0x29 /* ) */)) { - state.raise("Unmatched ')'"); - } - if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { - state.raise("Lone quantifier brackets"); + return false + }; + function isSyntaxCharacter(ch) { + return ( + ch === 0x24 /* $ */ || + ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || + ch === 0x2E /* . */ || + ch === 0x3F /* ? */ || + ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter + // But eat eager. + pp$8.regexp_eatPatternCharacters = function(state) { + var start = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { + state.advance(); } - } - if (state.maxBackReference > state.numCapturingParens) { - state.raise("Invalid escape"); - } - for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { - var name = list[i]; + return state.pos !== start + }; - if (state.groupNames.indexOf(name) === -1) { - state.raise("Invalid named capture referenced"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter + pp$8.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if ( + ch !== -1 && + ch !== 0x24 /* $ */ && + !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && + ch !== 0x2E /* . */ && + ch !== 0x3F /* ? */ && + ch !== 0x5B /* [ */ && + ch !== 0x5E /* ^ */ && + ch !== 0x7C /* | */ + ) { + state.advance(); + return true } - } -}; + return false + }; -// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction -pp$9.regexp_disjunction = function(state) { - var this$1 = this; + // GroupSpecifier[U] :: + // [empty] + // `?` GroupName[?U] + pp$8.regexp_groupSpecifier = function(state) { + if (state.eat(0x3F /* ? */)) { + if (this.regexp_eatGroupName(state)) { + if (state.groupNames.indexOf(state.lastStringValue) !== -1) { + state.raise("Duplicate capture group name"); + } + state.groupNames.push(state.lastStringValue); + return + } + state.raise("Invalid group"); + } + }; - this.regexp_alternative(state); - while (state.eat(0x7C /* | */)) { - this$1.regexp_alternative(state); - } + // GroupName[U] :: + // `<` RegExpIdentifierName[?U] `>` + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat(0x3C /* < */)) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return true + } + state.raise("Invalid capture group name"); + } + return false + }; - // Make the same message as V8. - if (this.regexp_eatQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - if (state.eat(0x7B /* { */)) { - state.raise("Lone quantifier brackets"); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative -pp$9.regexp_alternative = function(state) { - while (state.pos < state.source.length && this.regexp_eatTerm(state)) - { } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term -pp$9.regexp_eatTerm = function(state) { - if (this.regexp_eatAssertion(state)) { - // Handle `QuantifiableAssertion Quantifier` alternative. - // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion - // is a QuantifiableAssertion. - if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { - // Make the same message as V8. - if (state.switchU) { - state.raise("Invalid quantifier"); + // RegExpIdentifierName[U] :: + // RegExpIdentifierStart[?U] + // RegExpIdentifierName[?U] RegExpIdentifierPart[?U] + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); } + return true } - return true - } + return false + }; - if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { - this.regexp_eatQuantifier(state); - return true - } + // RegExpIdentifierStart[U] :: + // UnicodeIDStart + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + pp$8.regexp_eatRegExpIdentifierStart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart(ch)) { + state.lastIntValue = ch; + return true + } - return false -}; + state.pos = start; + return false + }; + function isRegExpIdentifierStart(ch) { + return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ + } + + // RegExpIdentifierPart[U] :: + // UnicodeIDContinue + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + // + // + pp$8.regexp_eatRegExpIdentifierPart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion -pp$9.regexp_eatAssertion = function(state) { - var start = state.pos; - state.lastAssertionIsQuantifiable = false; + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart(ch)) { + state.lastIntValue = ch; + return true + } - // ^, $ - if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { - return true + state.pos = start; + return false + }; + function isRegExpIdentifierPart(ch) { + return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ } - // \b \B - if (state.eat(0x5C /* \ */)) { - if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape + pp$8.regexp_eatAtomEscape = function(state) { + if ( + this.regexp_eatBackReference(state) || + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) || + (state.switchN && this.regexp_eatKGroupName(state)) + ) { return true } - state.pos = start; - } - - // Lookahead / Lookbehind - if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { - var lookbehind = false; - if (this.options.ecmaVersion >= 9) { - lookbehind = state.eat(0x3C /* < */); + if (state.switchU) { + // Make the same message as V8. + if (state.current() === 0x63 /* c */) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); } - if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { - this.regexp_disjunction(state); - if (!state.eat(0x29 /* ) */)) { - state.raise("Unterminated group"); + return false + }; + pp$8.regexp_eatBackReference = function(state) { + var start = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true } - state.lastAssertionIsQuantifiable = !lookbehind; - return true + if (n <= state.numCapturingParens) { + return true + } + state.pos = start; } - } - - state.pos = start; - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier -pp$9.regexp_eatQuantifier = function(state, noError) { - if ( noError === void 0 ) noError = false; - - if (this.regexp_eatQuantifierPrefix(state, noError)) { - state.eat(0x3F /* ? */); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix -pp$9.regexp_eatQuantifierPrefix = function(state, noError) { - return ( - state.eat(0x2A /* * */) || - state.eat(0x2B /* + */) || - state.eat(0x3F /* ? */) || - this.regexp_eatBracedQuantifier(state, noError) - ) -}; -pp$9.regexp_eatBracedQuantifier = function(state, noError) { - var start = state.pos; - if (state.eat(0x7B /* { */)) { - var min = 0, max = -1; - if (this.regexp_eatDecimalDigits(state)) { - min = state.lastIntValue; - if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { - max = state.lastIntValue; + return false + }; + pp$8.regexp_eatKGroupName = function(state) { + if (state.eat(0x6B /* k */)) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true } - if (state.eat(0x7D /* } */)) { - // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term - if (max !== -1 && max < min && !noError) { - state.raise("numbers out of order in {} quantifier"); - } + state.raise("Invalid named reference"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape + pp$8.regexp_eatCharacterEscape = function(state) { + return ( + this.regexp_eatControlEscape(state) || + this.regexp_eatCControlLetter(state) || + this.regexp_eatZero(state) || + this.regexp_eatHexEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state) || + (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || + this.regexp_eatIdentityEscape(state) + ) + }; + pp$8.regexp_eatCControlLetter = function(state) { + var start = state.pos; + if (state.eat(0x63 /* c */)) { + if (this.regexp_eatControlLetter(state)) { return true } + state.pos = start; } - if (state.switchU && !noError) { - state.raise("Incomplete quantifier"); + return false + }; + pp$8.regexp_eatZero = function(state) { + if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom -pp$9.regexp_eatAtom = function(state) { - return ( - this.regexp_eatPatternCharacters(state) || - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) - ) -}; -pp$9.regexp_eatReverseSolidusAtomEscape = function(state) { - var start = state.pos; - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatAtomEscape(state)) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape + pp$8.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 0x74 /* t */) { + state.lastIntValue = 0x09; /* \t */ + state.advance(); return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatUncapturingGroup = function(state) { - var start = state.pos; - if (state.eat(0x28 /* ( */)) { - if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - return true - } - state.raise("Unterminated group"); + if (ch === 0x6E /* n */) { + state.lastIntValue = 0x0A; /* \n */ + state.advance(); + return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatCapturingGroup = function(state) { - if (state.eat(0x28 /* ( */)) { - if (this.options.ecmaVersion >= 9) { - this.regexp_groupSpecifier(state); - } else if (state.current() === 0x3F /* ? */) { - state.raise("Invalid group"); + if (ch === 0x76 /* v */) { + state.lastIntValue = 0x0B; /* \v */ + state.advance(); + return true } - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - state.numCapturingParens += 1; + if (ch === 0x66 /* f */) { + state.lastIntValue = 0x0C; /* \f */ + state.advance(); return true } - state.raise("Unterminated group"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom -pp$9.regexp_eatExtendedAtom = function(state) { - return ( - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) || - this.regexp_eatInvalidBracedQuantifier(state) || - this.regexp_eatExtendedPatternCharacter(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier -pp$9.regexp_eatInvalidBracedQuantifier = function(state) { - if (this.regexp_eatBracedQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter -pp$9.regexp_eatSyntaxCharacter = function(state) { - var ch = state.current(); - if (isSyntaxCharacter(ch)) { - state.lastIntValue = ch; - state.advance(); - return true - } - return false -}; -function isSyntaxCharacter(ch) { - return ( - ch === 0x24 /* $ */ || - ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || - ch === 0x2E /* . */ || - ch === 0x3F /* ? */ || - ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || - ch >= 0x7B /* { */ && ch <= 0x7D /* } */ - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter -// But eat eager. -pp$9.regexp_eatPatternCharacters = function(state) { - var start = state.pos; - var ch = 0; - while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { - state.advance(); - } - return state.pos !== start -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter -pp$9.regexp_eatExtendedPatternCharacter = function(state) { - var ch = state.current(); - if ( - ch !== -1 && - ch !== 0x24 /* $ */ && - !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && - ch !== 0x2E /* . */ && - ch !== 0x3F /* ? */ && - ch !== 0x5B /* [ */ && - ch !== 0x5E /* ^ */ && - ch !== 0x7C /* | */ - ) { - state.advance(); - return true - } - return false -}; - -// GroupSpecifier[U] :: -// [empty] -// `?` GroupName[?U] -pp$9.regexp_groupSpecifier = function(state) { - if (state.eat(0x3F /* ? */)) { - if (this.regexp_eatGroupName(state)) { - if (state.groupNames.indexOf(state.lastStringValue) !== -1) { - state.raise("Duplicate capture group name"); - } - state.groupNames.push(state.lastStringValue); - return + if (ch === 0x72 /* r */) { + state.lastIntValue = 0x0D; /* \r */ + state.advance(); + return true } - state.raise("Invalid group"); - } -}; - -// GroupName[U] :: -// `<` RegExpIdentifierName[?U] `>` -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatGroupName = function(state) { - state.lastStringValue = ""; - if (state.eat(0x3C /* < */)) { - if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter + pp$8.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter(ch)) { + state.lastIntValue = ch % 0x20; + state.advance(); return true } - state.raise("Invalid capture group name"); - } - return false -}; - -// RegExpIdentifierName[U] :: -// RegExpIdentifierStart[?U] -// RegExpIdentifierName[?U] RegExpIdentifierPart[?U] -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatRegExpIdentifierName = function(state) { - state.lastStringValue = ""; - if (this.regexp_eatRegExpIdentifierStart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); - while (this.regexp_eatRegExpIdentifierPart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); + return false + }; + function isControlLetter(ch) { + return ( + (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || + (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence + pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state) { + var start = state.pos; + + if (state.eat(0x75 /* u */)) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { + var leadSurrogateEnd = state.pos; + if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail = state.lastIntValue; + if (trail >= 0xDC00 && trail <= 0xDFFF) { + state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return true + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true + } + if ( + state.switchU && + state.eat(0x7B /* { */) && + this.regexp_eatHexDigits(state) && + state.eat(0x7D /* } */) && + isValidUnicode(state.lastIntValue) + ) { + return true + } + if (state.switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start; } - return true - } - return false -}; - -// RegExpIdentifierStart[U] :: -// UnicodeIDStart -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -pp$9.regexp_eatRegExpIdentifierStart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierStart(ch)) { - state.lastIntValue = ch; - return true - } - state.pos = start; - return false -}; -function isRegExpIdentifierStart(ch) { - return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ -} - -// RegExpIdentifierPart[U] :: -// UnicodeIDContinue -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -// -// -pp$9.regexp_eatRegExpIdentifierPart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierPart(ch)) { - state.lastIntValue = ch; - return true + return false + }; + function isValidUnicode(ch) { + return ch >= 0 && ch <= 0x10FFFF } - state.pos = start; - return false -}; -function isRegExpIdentifierPart(ch) { - return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape -pp$9.regexp_eatAtomEscape = function(state) { - if ( - this.regexp_eatBackReference(state) || - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) || - (state.switchN && this.regexp_eatKGroupName(state)) - ) { - return true - } - if (state.switchU) { - // Make the same message as V8. - if (state.current() === 0x63 /* c */) { - state.raise("Invalid unicode escape"); - } - state.raise("Invalid escape"); - } - return false -}; -pp$9.regexp_eatBackReference = function(state) { - var start = state.pos; - if (this.regexp_eatDecimalEscape(state)) { - var n = state.lastIntValue; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape + pp$8.regexp_eatIdentityEscape = function(state) { if (state.switchU) { - // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape - if (n > state.maxBackReference) { - state.maxBackReference = n; + if (this.regexp_eatSyntaxCharacter(state)) { + return true } - return true - } - if (n <= state.numCapturingParens) { - return true + if (state.eat(0x2F /* / */)) { + state.lastIntValue = 0x2F; /* / */ + return true + } + return false } - state.pos = start; - } - return false -}; -pp$9.regexp_eatKGroupName = function(state) { - if (state.eat(0x6B /* k */)) { - if (this.regexp_eatGroupName(state)) { - state.backReferenceNames.push(state.lastStringValue); + + var ch = state.current(); + if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { + state.lastIntValue = ch; + state.advance(); return true } - state.raise("Invalid named reference"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape -pp$9.regexp_eatCharacterEscape = function(state) { - return ( - this.regexp_eatControlEscape(state) || - this.regexp_eatCControlLetter(state) || - this.regexp_eatZero(state) || - this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state) || - (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || - this.regexp_eatIdentityEscape(state) - ) -}; -pp$9.regexp_eatCControlLetter = function(state) { - var start = state.pos; - if (state.eat(0x63 /* c */)) { - if (this.regexp_eatControlLetter(state)) { + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape + pp$8.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatZero = function(state) { - if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { - state.lastIntValue = 0; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape -pp$9.regexp_eatControlEscape = function(state) { - var ch = state.current(); - if (ch === 0x74 /* t */) { - state.lastIntValue = 0x09; /* \t */ - state.advance(); - return true - } - if (ch === 0x6E /* n */) { - state.lastIntValue = 0x0A; /* \n */ - state.advance(); - return true - } - if (ch === 0x76 /* v */) { - state.lastIntValue = 0x0B; /* \v */ - state.advance(); - return true - } - if (ch === 0x66 /* f */) { - state.lastIntValue = 0x0C; /* \f */ - state.advance(); - return true - } - if (ch === 0x72 /* r */) { - state.lastIntValue = 0x0D; /* \r */ - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter -pp$9.regexp_eatControlLetter = function(state) { - var ch = state.current(); - if (isControlLetter(ch)) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; -function isControlLetter(ch) { - return ( - (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || - (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence -pp$9.regexp_eatRegExpUnicodeEscapeSequence = function(state) { - var start = state.pos; - - if (state.eat(0x75 /* u */)) { - if (this.regexp_eatFixedHexDigits(state, 4)) { - var lead = state.lastIntValue; - if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { - var leadSurrogateEnd = state.pos; - if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { - var trail = state.lastIntValue; - if (trail >= 0xDC00 && trail <= 0xDFFF) { - state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - return true - } - } - state.pos = leadSurrogateEnd; - state.lastIntValue = lead; - } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape + pp$8.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + + if (isCharacterClassEscape(ch)) { + state.lastIntValue = -1; + state.advance(); return true } + if ( state.switchU && - state.eat(0x7B /* { */) && - this.regexp_eatHexDigits(state) && - state.eat(0x7D /* } */) && - isValidUnicode(state.lastIntValue) + this.options.ecmaVersion >= 9 && + (ch === 0x50 /* P */ || ch === 0x70 /* p */) ) { - return true + state.lastIntValue = -1; + state.advance(); + if ( + state.eat(0x7B /* { */) && + this.regexp_eatUnicodePropertyValueExpression(state) && + state.eat(0x7D /* } */) + ) { + return true + } + state.raise("Invalid property name"); } - if (state.switchU) { - state.raise("Invalid unicode escape"); + + return false + }; + function isCharacterClassEscape(ch) { + return ( + ch === 0x64 /* d */ || + ch === 0x44 /* D */ || + ch === 0x73 /* s */ || + ch === 0x53 /* S */ || + ch === 0x77 /* w */ || + ch === 0x57 /* W */ + ) + } + + // UnicodePropertyValueExpression :: + // UnicodePropertyName `=` UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + pp$8.regexp_eatUnicodePropertyValueExpression = function(state) { + var start = state.pos; + + // UnicodePropertyName `=` UnicodePropertyValue + if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { + var name = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name, value); + return true + } } state.pos = start; - } - return false -}; -function isValidUnicode(ch) { - return ch >= 0 && ch <= 0x10FFFF -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape -pp$9.regexp_eatIdentityEscape = function(state) { - if (state.switchU) { - if (this.regexp_eatSyntaxCharacter(state)) { - return true - } - if (state.eat(0x2F /* / */)) { - state.lastIntValue = 0x2F; /* / */ + // LoneUnicodePropertyNameOrValue + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); return true } return false - } + }; + pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { + if (!has(state.unicodeProperties.nonBinary, name)) + { state.raise("Invalid property name"); } + if (!state.unicodeProperties.nonBinary[name].test(value)) + { state.raise("Invalid property value"); } + }; + pp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (!state.unicodeProperties.binary.test(nameOrValue)) + { state.raise("Invalid property name"); } + }; - var ch = state.current(); - if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { - state.lastIntValue = ch; - state.advance(); - return true + // UnicodePropertyName :: + // UnicodePropertyNameCharacters + pp$8.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyNameCharacter(ch) { + return isControlLetter(ch) || ch === 0x5F /* _ */ } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape -pp$9.regexp_eatDecimalEscape = function(state) { - state.lastIntValue = 0; - var ch = state.current(); - if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { - do { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + // UnicodePropertyValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); state.advance(); - } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) - return true + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyValueCharacter(ch) { + return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape -pp$9.regexp_eatCharacterClassEscape = function(state) { - var ch = state.current(); - if (isCharacterClassEscape(ch)) { - state.lastIntValue = -1; - state.advance(); - return true - } + // LoneUnicodePropertyNameOrValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state) + }; - if ( - state.switchU && - this.options.ecmaVersion >= 9 && - (ch === 0x50 /* P */ || ch === 0x70 /* p */) - ) { - state.lastIntValue = -1; - state.advance(); - if ( - state.eat(0x7B /* { */) && - this.regexp_eatUnicodePropertyValueExpression(state) && - state.eat(0x7D /* } */) - ) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass + pp$8.regexp_eatCharacterClass = function(state) { + if (state.eat(0x5B /* [ */)) { + state.eat(0x5E /* ^ */); + this.regexp_classRanges(state); + if (state.eat(0x5D /* [ */)) { + return true + } + // Unreachable since it threw "unterminated regular expression" error before. + state.raise("Unterminated character class"); } - state.raise("Invalid property name"); - } + return false + }; - return false -}; -function isCharacterClassEscape(ch) { - return ( - ch === 0x64 /* d */ || - ch === 0x44 /* D */ || - ch === 0x73 /* s */ || - ch === 0x53 /* S */ || - ch === 0x77 /* w */ || - ch === 0x57 /* W */ - ) -} - -// UnicodePropertyValueExpression :: -// UnicodePropertyName `=` UnicodePropertyValue -// LoneUnicodePropertyNameOrValue -pp$9.regexp_eatUnicodePropertyValueExpression = function(state) { - var start = state.pos; - - // UnicodePropertyName `=` UnicodePropertyValue - if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { - var name = state.lastStringValue; - if (this.regexp_eatUnicodePropertyValue(state)) { - var value = state.lastStringValue; - this.regexp_validateUnicodePropertyNameAndValue(state, name, value); - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash + pp$8.regexp_classRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } } - } - state.pos = start; + }; - // LoneUnicodePropertyNameOrValue - if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { - var nameOrValue = state.lastStringValue; - this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); - return true - } - return false -}; -pp$9.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { - if (!has(state.unicodeProperties.nonBinary, name)) - { state.raise("Invalid property name"); } - if (!state.unicodeProperties.nonBinary[name].test(value)) - { state.raise("Invalid property value"); } -}; -pp$9.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { - if (!state.unicodeProperties.binary.test(nameOrValue)) - { state.raise("Invalid property name"); } -}; - -// UnicodePropertyName :: -// UnicodePropertyNameCharacters -pp$9.regexp_eatUnicodePropertyName = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyNameCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyNameCharacter(ch) { - return isControlLetter(ch) || ch === 0x5F /* _ */ -} - -// UnicodePropertyValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatUnicodePropertyValue = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyValueCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyValueCharacter(ch) { - return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) -} - -// LoneUnicodePropertyNameOrValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { - return this.regexp_eatUnicodePropertyValue(state) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass -pp$9.regexp_eatCharacterClass = function(state) { - if (state.eat(0x5B /* [ */)) { - state.eat(0x5E /* ^ */); - this.regexp_classRanges(state); - if (state.eat(0x5D /* [ */)) { - return true - } - // Unreachable since it threw "unterminated regular expression" error before. - state.raise("Unterminated character class"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash -pp$9.regexp_classRanges = function(state) { - var this$1 = this; - - while (this.regexp_eatClassAtom(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D /* - */) && this$1.regexp_eatClassAtom(state)) { - var right = state.lastIntValue; - if (state.switchU && (left === -1 || right === -1)) { - state.raise("Invalid character class"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash + pp$8.regexp_eatClassAtom = function(state) { + var start = state.pos; + + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatClassEscape(state)) { + return true } - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); + if (state.switchU) { + // Make the same message as V8. + var ch$1 = state.current(); + if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); } + state.pos = start; } - } -}; -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash -pp$9.regexp_eatClassAtom = function(state) { - var start = state.pos; - - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatClassEscape(state)) { + var ch = state.current(); + if (ch !== 0x5D /* [ */) { + state.lastIntValue = ch; + state.advance(); return true } - if (state.switchU) { - // Make the same message as V8. - var ch$1 = state.current(); - if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { - state.raise("Invalid class escape"); - } - state.raise("Invalid escape"); + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape + pp$8.regexp_eatClassEscape = function(state) { + var start = state.pos; + + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true } - state.pos = start; - } - var ch = state.current(); - if (ch !== 0x5D /* [ */) { - state.lastIntValue = ch; - state.advance(); - return true - } + if (state.switchU && state.eat(0x2D /* - */)) { + state.lastIntValue = 0x2D; /* - */ + return true + } - return false -}; + if (!state.switchU && state.eat(0x63 /* c */)) { + if (this.regexp_eatClassControlLetter(state)) { + return true + } + state.pos = start; + } -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape -pp$9.regexp_eatClassEscape = function(state) { - var start = state.pos; + return ( + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) + ) + }; - if (state.eat(0x62 /* b */)) { - state.lastIntValue = 0x08; /* */ - return true - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter + pp$8.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; - if (state.switchU && state.eat(0x2D /* - */)) { - state.lastIntValue = 0x2D; /* - */ - return true - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatHexEscapeSequence = function(state) { + var start = state.pos; + if (state.eat(0x78 /* x */)) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start; + } + return false + }; - if (!state.switchU && state.eat(0x63 /* c */)) { - if (this.regexp_eatClassControlLetter(state)) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits + pp$8.regexp_eatDecimalDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); } - state.pos = start; + return state.pos !== start + }; + function isDecimalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ } - return ( - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter -pp$9.regexp_eatClassControlLetter = function(state) { - var ch = state.current(); - if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatHexEscapeSequence = function(state) { - var start = state.pos; - if (state.eat(0x78 /* x */)) { - if (this.regexp_eatFixedHexDigits(state, 2)) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits + pp$8.regexp_eatHexDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); } - if (state.switchU) { - state.raise("Invalid escape"); + return state.pos !== start + }; + function isHexDigit(ch) { + return ( + (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || + (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || + (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) + ) + } + function hexToInt(ch) { + if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { + return 10 + (ch - 0x41 /* A */) } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits -pp$9.regexp_eatDecimalDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isDecimalDigit(ch = state.current())) { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } - return state.pos !== start -}; -function isDecimalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits -pp$9.regexp_eatHexDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isHexDigit(ch = state.current())) { - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return state.pos !== start -}; -function isHexDigit(ch) { - return ( - (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || - (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || - (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) - ) -} -function hexToInt(ch) { - if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { - return 10 + (ch - 0x41 /* A */) - } - if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { - return 10 + (ch - 0x61 /* a */) + if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { + return 10 + (ch - 0x61 /* a */) + } + return ch - 0x30 /* 0 */ } - return ch - 0x30 /* 0 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence -// Allows only 0-377(octal) i.e. 0-255(decimal). -pp$9.regexp_eatLegacyOctalEscapeSequence = function(state) { - if (this.regexp_eatOctalDigit(state)) { - var n1 = state.lastIntValue; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence + // Allows only 0-377(octal) i.e. 0-255(decimal). + pp$8.regexp_eatLegacyOctalEscapeSequence = function(state) { if (this.regexp_eatOctalDigit(state)) { - var n2 = state.lastIntValue; - if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { - state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } } else { - state.lastIntValue = n1 * 8 + n2; + state.lastIntValue = n1; } - } else { - state.lastIntValue = n1; + return true } - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit -pp$9.regexp_eatOctalDigit = function(state) { - var ch = state.current(); - if (isOctalDigit(ch)) { - state.lastIntValue = ch - 0x30; /* 0 */ - state.advance(); - return true - } - state.lastIntValue = 0; - return false -}; -function isOctalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit -// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatFixedHexDigits = function(state, length) { - var start = state.pos; - state.lastIntValue = 0; - for (var i = 0; i < length; ++i) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit + pp$8.regexp_eatOctalDigit = function(state) { var ch = state.current(); - if (!isHexDigit(ch)) { - state.pos = start; - return false + if (isOctalDigit(ch)) { + state.lastIntValue = ch - 0x30; /* 0 */ + state.advance(); + return true } - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); + state.lastIntValue = 0; + return false + }; + function isOctalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ } - return true -}; - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = function Token(p) { - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) - { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } - if (p.options.ranges) - { this.range = [p.start, p.end]; } -}; - -// ## Tokenizer - -var pp$8 = Parser.prototype; - -// Move to the next token - -pp$8.next = function() { - if (this.options.onToken) - { this.options.onToken(new Token(this)); } - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp$8.getToken = function() { - this.next(); - return new Token(this) -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") - { pp$8[Symbol.iterator] = function() { - var this$1 = this; - return { - next: function () { - var token = this$1.getToken(); - return { - done: token.type === types.eof, - value: token - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit + // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatFixedHexDigits = function(state, length) { + var start = state.pos; + state.lastIntValue = 0; + for (var i = 0; i < length; ++i) { + var ch = state.current(); + if (!isHexDigit(ch)) { + state.pos = start; + return false } + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); } - }; } + return true + }; + + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. + + var Token = function Token(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) + { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } + if (p.options.ranges) + { this.range = [p.start, p.end]; } + }; + + // ## Tokenizer -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). + var pp$9 = Parser.prototype; -pp$8.curContext = function() { - return this.context[this.context.length - 1] -}; + // Move to the next token -// Read a single token, updating the parser object's token-related -// properties. + pp$9.next = function() { + if (this.options.onToken) + { this.options.onToken(new Token(this)); } -pp$8.nextToken = function() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; - this.start = this.pos; - if (this.options.locations) { this.startLoc = this.curPosition(); } - if (this.pos >= this.input.length) { return this.finishToken(types.eof) } + pp$9.getToken = function() { + this.next(); + return new Token(this) + }; - if (curContext.override) { return curContext.override(this) } - else { this.readToken(this.fullCharCodeAtPos()); } -}; + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + { pp$9[Symbol.iterator] = function() { + var this$1 = this; + + return { + next: function () { + var token = this$1.getToken(); + return { + done: token.type === types.eof, + value: token + } + } + } + }; } -pp$8.readToken = function(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) - { return this.readWord() } + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). - return this.getTokenFromCode(code) -}; + pp$9.curContext = function() { + return this.context[this.context.length - 1] + }; -pp$8.fullCharCodeAtPos = function() { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) { return code } - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00 -}; + // Read a single token, updating the parser object's token-related + // properties. -pp$8.skipBlockComment = function() { - var this$1 = this; + pp$9.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } - this.pos = end + 2; - if (this.options.locations) { - lineBreakG.lastIndex = start; - var match; - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this$1.curLine; - this$1.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) - { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()); } -}; - -pp$8.skipLineComment = function(startSkip) { - var this$1 = this; - - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && !isNewLine(ch)) { - ch = this$1.input.charCodeAt(++this$1.pos); - } - if (this.options.onComment) - { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()); } -}; + this.start = this.pos; + if (this.options.locations) { this.startLoc = this.curPosition(); } + if (this.pos >= this.input.length) { return this.finishToken(types.eof) } -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. + if (curContext.override) { return curContext.override(this) } + else { this.readToken(this.fullCharCodeAtPos()); } + }; -pp$8.skipSpace = function() { - var this$1 = this; + pp$9.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + { return this.readWord() } - loop: while (this.pos < this.input.length) { - var ch = this$1.input.charCodeAt(this$1.pos); - switch (ch) { - case 32: case 160: // ' ' - ++this$1.pos; - break - case 13: - if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { - ++this$1.pos; - } - case 10: case 8232: case 8233: - ++this$1.pos; - if (this$1.options.locations) { - ++this$1.curLine; - this$1.lineStart = this$1.pos; + return this.getTokenFromCode(code) + }; + + pp$9.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xe000) { return code } + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 0x35fdc00 + }; + + pp$9.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } + this.pos = end + 2; + if (this.options.locations) { + lineBreakG.lastIndex = start; + var match; + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this.curLine; + this.lineStart = match.index + match[0].length; } - break - case 47: // '/' - switch (this$1.input.charCodeAt(this$1.pos + 1)) { - case 42: // '*' - this$1.skipBlockComment(); + } + if (this.options.onComment) + { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()); } + }; + + pp$9.skipLineComment = function(startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) + { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()); } + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + pp$9.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: case 160: // ' ' + ++this.pos; + break + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: case 8232: case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } break - case 47: - this$1.skipLineComment(2); + case 47: // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: // '*' + this.skipBlockComment(); + break + case 47: + this.skipLineComment(2); + break + default: + break loop + } break default: - break loop + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop + } } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this$1.pos; - } else { - break loop + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + pp$9.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { this.endLoc = this.curPosition(); } + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp$9.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { return this.readNumber(true) } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3; + return this.finishToken(types.ellipsis) + } else { + ++this.pos; + return this.finishToken(types.dot) + } + }; + + pp$9.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { ++this.pos; return this.readRegexp() } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.slash, 1) + }; + + pp$9.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code === 42 ? types.star : types.modulo; + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { + ++size; + tokentype = types.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + + if (next === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(tokentype, size) + }; + + pp$9.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) + }; + + pp$9.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.bitwiseXOR, 1) + }; + + pp$9.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && + (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() } + return this.finishOp(types.incDec, 2) } - } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp$8.finishToken = function(type, val) { - this.end = this.pos; - if (this.options.locations) { this.endLoc = this.curPosition(); } - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp$8.readToken_dot = function() { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) { return this.readNumber(true) } - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' - this.pos += 3; - return this.finishToken(types.ellipsis) - } else { - ++this.pos; - return this.finishToken(types.dot) - } -}; - -pp$8.readToken_slash = function() { // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { ++this.pos; return this.readRegexp() } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.slash, 1) -}; - -pp$8.readToken_mult_modulo_exp = function(code) { // '%*' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? types.star : types.modulo; - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { - ++size; - tokentype = types.starstar; - next = this.input.charCodeAt(this.pos + 2); - } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) + }; - if (next === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(tokentype, size) -}; - -pp$8.readToken_pipe_amp = function(code) { // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) -}; - -pp$8.readToken_caret = function() { // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.bitwiseXOR, 1) -}; - -pp$8.readToken_plus_min = function(code) { // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && - (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { - // A `-->` line comment - this.skipLineComment(3); + pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // ` * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], '') +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(re[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js index f48252fc5f4b22..0f16fa40f8323f 100644 --- a/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js +++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js @@ -68,7 +68,7 @@ function defaultOptions() { directive: false, nodejsScope: false, impliedStrict: false, - sourceType: "script", // one of ['script', 'module'] + sourceType: "script", // one of ['script', 'module'] ecmaVersion: 5, childVisitorKeys: null, fallback: "iteration" @@ -93,7 +93,7 @@ function updateDeeply(target, override) { } for (const key in override) { - if (override.hasOwnProperty(key)) { + if (Object.prototype.hasOwnProperty.call(override, key)) { const val = override[key]; if (isHashObject(val)) { diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js index 55d0223df8bf2c..29f853293361d0 100644 --- a/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js +++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js @@ -81,7 +81,7 @@ class Importer extends esrecurse.Visitor { this.declaration, null, null - )); + )); }); } @@ -151,20 +151,26 @@ class Referencer extends esrecurse.Visitor { assignment.right, maybeImplicitGlobal, pattern !== assignment.left, - init); + init + ); }); } visitPattern(node, options, callback) { + let visitPatternOptions = options; + let visitPatternCallback = callback; + if (typeof options === "function") { - callback = options; - options = { processRightHandNodes: false }; + visitPatternCallback = options; + visitPatternOptions = { processRightHandNodes: false }; } + traverseIdentifierInPattern( this.options, node, - options.processRightHandNodes ? this : null, - callback); + visitPatternOptions.processRightHandNodes ? this : null, + visitPatternCallback + ); } visitFunction(node) { @@ -180,14 +186,14 @@ class Referencer extends esrecurse.Visitor { // id is defined in upper scope this.currentScope().__define(node.id, - new Definition( - Variable.FunctionName, - node.id, - node, - null, - null, - null - )); + new Definition( + Variable.FunctionName, + node.id, + node, + null, + null, + null + )); } // FunctionExpression with name creates its special scope; @@ -258,14 +264,14 @@ class Referencer extends esrecurse.Visitor { visitClass(node) { if (node.type === Syntax.ClassDeclaration) { this.currentScope().__define(node.id, - new Definition( - Variable.ClassName, - node.id, - node, - null, - null, - null - )); + new Definition( + Variable.ClassName, + node.id, + node, + null, + null, + null + )); } this.visit(node.superClass); @@ -274,11 +280,11 @@ class Referencer extends esrecurse.Visitor { if (node.id) { this.currentScope().__define(node.id, - new Definition( - Variable.ClassName, - node.id, - node - )); + new Definition( + Variable.ClassName, + node.id, + node + )); } this.visit(node.body); diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js index f0c3006c601f62..5c4c967780a3e5 100644 --- a/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js +++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js @@ -161,7 +161,7 @@ class Scope { */ this.type = type; - /** + /** * The scoped {@link Variable}s of this scope, as { Variable.name * : Variable }. * @member {Map} Scope#set @@ -192,13 +192,13 @@ class Scope { */ this.block = block; - /** + /** * The {@link Reference|references} that are not resolved with this scope. * @member {Reference[]} Scope#through */ this.through = []; - /** + /** * The scoped {@link Variable}s of this scope. In the case of a * 'function' scope this includes the automatic argument arguments as * its first element, as well as all further formal arguments. @@ -206,7 +206,7 @@ class Scope { */ this.variables = []; - /** + /** * Any variable {@link Reference|reference} found in this scope. This * includes occurrences of local variables as well as variables from * parent scopes (including the global scope). For local variables @@ -217,7 +217,7 @@ class Scope { */ this.references = []; - /** + /** * For 'global' and 'function' scopes, this is a self-reference. For * other scope types this is the variableScope value of the * parent scope. @@ -226,38 +226,38 @@ class Scope { this.variableScope = (this.type === "global" || this.type === "function" || this.type === "module") ? this : upperScope.variableScope; - /** + /** * Whether this scope is created by a FunctionExpression. * @member {boolean} Scope#functionExpressionScope */ this.functionExpressionScope = false; - /** + /** * Whether this is a scope that contains an 'eval()' invocation. * @member {boolean} Scope#directCallToEvalScope */ this.directCallToEvalScope = false; - /** + /** * @member {boolean} Scope#thisFound */ this.thisFound = false; this.__left = []; - /** + /** * Reference to the parent {@link Scope|scope}. * @member {Scope} Scope#upper */ this.upper = upperScope; - /** + /** * Whether 'use strict' is in effect in this scope. * @member {boolean} Scope#isStrict */ this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective()); - /** + /** * List of nested {@link Scope}s. * @member {Scope[]} Scope#childScopes */ @@ -414,11 +414,12 @@ class Scope { __define(node, def) { if (node && node.type === Syntax.Identifier) { this.__defineGeneric( - node.name, - this.set, - this.variables, - node, - def); + node.name, + this.set, + this.variables, + node, + def + ); } } @@ -550,14 +551,14 @@ class GlobalScope extends Scope { const info = implicit[i]; this.__defineImplicit(info.pattern, - new Definition( - Variable.ImplicitGlobalVariable, - info.pattern, - info.node, - null, - null, - null - )); + new Definition( + Variable.ImplicitGlobalVariable, + info.pattern, + info.node, + null, + null, + null + )); } @@ -569,11 +570,12 @@ class GlobalScope extends Scope { __defineImplicit(node, def) { if (node && node.type === Syntax.Identifier) { this.__defineGeneric( - node.name, - this.implicit.set, - this.implicit.variables, - node, - def); + node.name, + this.implicit.set, + this.implicit.variables, + node, + def + ); } } } @@ -588,14 +590,14 @@ class FunctionExpressionNameScope extends Scope { constructor(scopeManager, upperScope, block) { super(scopeManager, "function-expression-name", upperScope, block, false); this.__define(block.id, - new Definition( - Variable.FunctionName, - block.id, - block, - null, - null, - null - )); + new Definition( + Variable.FunctionName, + block.id, + block, + null, + null, + null + )); this.functionExpressionScope = true; } } @@ -684,11 +686,12 @@ class FunctionScope extends Scope { __defineArguments() { this.__defineGeneric( - "arguments", - this.set, - this.variables, - null, - null); + "arguments", + this.set, + this.variables, + null, + null + ); this.taints.set("arguments", true); } @@ -710,7 +713,7 @@ class FunctionScope extends Scope { // It's invalid resolution in the following case: return !( variable.scope === this && - ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. + ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. variable.defs.every(d => d.name.range[0] >= bodyStart) // the variable is in the body. ); } diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/package.json b/tools/node_modules/eslint/node_modules/eslint-scope/package.json index f3239af383b050..1c7fa4450b0c9c 100644 --- a/tools/node_modules/eslint/node_modules/eslint-scope/package.json +++ b/tools/node_modules/eslint/node_modules/eslint-scope/package.json @@ -10,20 +10,21 @@ "deprecated": false, "description": "ECMAScript scope analyzer for ESLint", "devDependencies": { - "chai": "^3.4.1", - "eslint": "^3.15.0", - "eslint-config-eslint": "^4.0.0", + "@typescript-eslint/parser": "^1.11.0", + "chai": "^4.2.0", + "eslint": "^6.0.1", + "eslint-config-eslint": "^5.0.1", + "eslint-plugin-node": "^9.1.0", "eslint-release": "^1.0.0", - "espree": "^3.1.1", + "espree": "^6.0.0", "istanbul": "^0.4.5", - "mocha": "^3.2.0", + "mocha": "^6.1.4", "npm-license": "^0.3.3", - "shelljs": "^0.7.6", - "typescript": "~2.0.10", - "typescript-eslint-parser": "^1.0.0" + "shelljs": "^0.8.3", + "typescript": "^3.5.2" }, "engines": { - "node": ">=4.0.0" + "node": ">=8.0.0" }, "files": [ "LICENSE", @@ -47,5 +48,5 @@ "publish-release": "eslint-publish-release", "test": "node Makefile.js test" }, - "version": "4.0.3" + "version": "5.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-utils/index.js b/tools/node_modules/eslint/node_modules/eslint-utils/index.js index a74dd9037ac2f9..d501e86d3f9681 100644 --- a/tools/node_modules/eslint/node_modules/eslint-utils/index.js +++ b/tools/node_modules/eslint/node_modules/eslint-utils/index.js @@ -3,6 +3,10 @@ Object.defineProperty(exports, '__esModule', { value: true }); +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var evk = _interopDefault(require('eslint-visitor-keys')); + /** * Get the innermost scope which contains a given location. * @param {Scope} initialScope The initial scope to search. @@ -742,12 +746,291 @@ function getFunctionNameWithKind(node) { return tokens.join(" ") } +const typeConversionBinaryOps = Object.freeze( + new Set([ + "==", + "!=", + "<", + "<=", + ">", + ">=", + "<<", + ">>", + ">>>", + "+", + "-", + "*", + "/", + "%", + "|", + "^", + "&", + "in", + ]) +); +const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"])); +const visitor = Object.freeze( + Object.assign(Object.create(null), { + $visit(node, options, visitorKeys) { + const { type } = node; + + if (typeof this[type] === "function") { + return this[type](node, options, visitorKeys) + } + + return this.$visitChildren(node, options, visitorKeys) + }, + + $visitChildren(node, options, visitorKeys) { + const { type } = node; + + for (const key of visitorKeys[type] || evk.getKeys(node)) { + const value = node[key]; + + if (Array.isArray(value)) { + for (const element of value) { + if ( + element && + this.$visit(element, options, visitorKeys) + ) { + return true + } + } + } else if (value && this.$visit(value, options, visitorKeys)) { + return true + } + } + + return false + }, + + ArrowFunctionExpression() { + return false + }, + AssignmentExpression() { + return true + }, + AwaitExpression() { + return true + }, + BinaryExpression(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + typeConversionBinaryOps.has(node.operator) && + (node.left.type !== "Literal" || node.right.type !== "Literal") + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + CallExpression() { + return true + }, + FunctionExpression() { + return false + }, + ImportExpression() { + return true + }, + MemberExpression(node, options, visitorKeys) { + if (options.considerGetters) { + return true + } + if ( + options.considerImplicitTypeConversion && + node.computed && + node.property.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + MethodDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + NewExpression() { + return true + }, + Property(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UnaryExpression(node, options, visitorKeys) { + if (node.operator === "delete") { + return true + } + if ( + options.considerImplicitTypeConversion && + typeConversionUnaryOps.has(node.operator) && + node.argument.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UpdateExpression() { + return true + }, + YieldExpression() { + return true + }, + }) +); + +/** + * Check whether a given node has any side effect or not. + * @param {Node} node The node to get. + * @param {SourceCode} sourceCode The source code object. + * @param {object} [options] The option object. + * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects. + * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects. + * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`. + * @returns {boolean} `true` if the node has a certain side effect. + */ +function hasSideEffect( + node, + sourceCode, + { considerGetters = false, considerImplicitTypeConversion = false } = {} +) { + return visitor.$visit( + node, + { considerGetters, considerImplicitTypeConversion }, + sourceCode.visitorKeys || evk.KEYS + ) +} + +/** + * Get the left parenthesis of the parent node syntax if it exists. + * E.g., `if (a) {}` then the `(`. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {Token|null} The left parenthesis of the parent node syntax + */ +function getParentSyntaxParen(node, sourceCode) { + const parent = node.parent; + + switch (parent.type) { + case "CallExpression": + case "NewExpression": + if (parent.arguments.length === 1 && parent.arguments[0] === node) { + return sourceCode.getTokenAfter( + parent.callee, + isOpeningParenToken + ) + } + return null + + case "DoWhileStatement": + if (parent.test === node) { + return sourceCode.getTokenAfter( + parent.body, + isOpeningParenToken + ) + } + return null + + case "IfStatement": + case "WhileStatement": + if (parent.test === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "ImportExpression": + if (parent.source === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "SwitchStatement": + if (parent.discriminant === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "WithStatement": + if (parent.object === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + default: + return null + } +} + +/** + * Check whether a given node is parenthesized or not. + * @param {number} times The number of parantheses. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized the given times. + */ +/** + * Check whether a given node is parenthesized or not. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized. + */ +function isParenthesized( + timesOrNode, + nodeOrSourceCode, + optionalSourceCode +) { + let times, node, sourceCode, maybeLeftParen, maybeRightParen; + if (typeof timesOrNode === "number") { + times = timesOrNode | 0; + node = nodeOrSourceCode; + sourceCode = optionalSourceCode; + if (!(times >= 1)) { + throw new TypeError("'times' should be a positive integer.") + } + } else { + times = 1; + node = timesOrNode; + sourceCode = nodeOrSourceCode; + } + + if (node == null) { + return false + } + + maybeLeftParen = maybeRightParen = node; + do { + maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen); + maybeRightParen = sourceCode.getTokenAfter(maybeRightParen); + } while ( + maybeLeftParen != null && + maybeRightParen != null && + isOpeningParenToken(maybeLeftParen) && + isClosingParenToken(maybeRightParen) && + // Avoid false positive such as `if (a) {}` + maybeLeftParen !== getParentSyntaxParen(node, sourceCode) && + --times > 0 + ) + + return times === 0 +} + /** * @author Toru Nagashima * See LICENSE file in root directory for full license. */ -const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/g; +const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/gu; /** @type {WeakMap} */ const internal = new WeakMap(); @@ -814,7 +1097,6 @@ function replaceS(matcher, str, replacement) { return chunks.join("") } -//eslint-disable-next-line valid-jsdoc /** * Replace a given string by a given matcher. * @param {PatternMatcher} matcher The pattern matcher. @@ -890,7 +1172,6 @@ class PatternMatcher { return !ret.done } - //eslint-disable-next-line valid-jsdoc /** * Replace a given string. * @param {string} str The string to be replaced. @@ -904,8 +1185,8 @@ class PatternMatcher { } } -const SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/; -const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/; +const SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/u; +const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u; const has = Function.call.bind(Object.hasOwnProperty); const READ = Symbol("read"); @@ -1126,7 +1407,7 @@ class ReferenceTracker { * @param {object} traceMap The trace map. * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references. */ - //eslint-disable-next-line complexity, require-jsdoc + //eslint-disable-next-line complexity *_iteratePropertyReferences(rootNode, path, traceMap) { let node = rootNode; while (!SENTINEL_TYPE.test(node.parent.type)) { @@ -1342,6 +1623,7 @@ var index = { getPropertyName, getStaticValue, getStringIfConstant, + hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, @@ -1363,16 +1645,20 @@ var index = { isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, + isParenthesized, isSemicolonToken, PatternMatcher, READ, ReferenceTracker, }; -exports.default = index; exports.CALL = CALL; exports.CONSTRUCT = CONSTRUCT; exports.ESM = ESM; +exports.PatternMatcher = PatternMatcher; +exports.READ = READ; +exports.ReferenceTracker = ReferenceTracker; +exports.default = index; exports.findVariable = findVariable; exports.getFunctionHeadLocation = getFunctionHeadLocation; exports.getFunctionNameWithKind = getFunctionNameWithKind; @@ -1380,6 +1666,7 @@ exports.getInnermostScope = getInnermostScope; exports.getPropertyName = getPropertyName; exports.getStaticValue = getStaticValue; exports.getStringIfConstant = getStringIfConstant; +exports.hasSideEffect = hasSideEffect; exports.isArrowToken = isArrowToken; exports.isClosingBraceToken = isClosingBraceToken; exports.isClosingBracketToken = isClosingBracketToken; @@ -1401,8 +1688,6 @@ exports.isNotSemicolonToken = isNotSemicolonToken; exports.isOpeningBraceToken = isOpeningBraceToken; exports.isOpeningBracketToken = isOpeningBracketToken; exports.isOpeningParenToken = isOpeningParenToken; +exports.isParenthesized = isParenthesized; exports.isSemicolonToken = isSemicolonToken; -exports.PatternMatcher = PatternMatcher; -exports.READ = READ; -exports.ReferenceTracker = ReferenceTracker; //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/eslint-utils/index.mjs b/tools/node_modules/eslint/node_modules/eslint-utils/index.mjs index 0ec1ad777e51eb..e050ba0e1b7c52 100644 --- a/tools/node_modules/eslint/node_modules/eslint-utils/index.mjs +++ b/tools/node_modules/eslint/node_modules/eslint-utils/index.mjs @@ -1,4 +1,6 @@ /*! @author Toru Nagashima */ +import evk from 'eslint-visitor-keys'; + /** * Get the innermost scope which contains a given location. * @param {Scope} initialScope The initial scope to search. @@ -738,12 +740,291 @@ function getFunctionNameWithKind(node) { return tokens.join(" ") } +const typeConversionBinaryOps = Object.freeze( + new Set([ + "==", + "!=", + "<", + "<=", + ">", + ">=", + "<<", + ">>", + ">>>", + "+", + "-", + "*", + "/", + "%", + "|", + "^", + "&", + "in", + ]) +); +const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"])); +const visitor = Object.freeze( + Object.assign(Object.create(null), { + $visit(node, options, visitorKeys) { + const { type } = node; + + if (typeof this[type] === "function") { + return this[type](node, options, visitorKeys) + } + + return this.$visitChildren(node, options, visitorKeys) + }, + + $visitChildren(node, options, visitorKeys) { + const { type } = node; + + for (const key of visitorKeys[type] || evk.getKeys(node)) { + const value = node[key]; + + if (Array.isArray(value)) { + for (const element of value) { + if ( + element && + this.$visit(element, options, visitorKeys) + ) { + return true + } + } + } else if (value && this.$visit(value, options, visitorKeys)) { + return true + } + } + + return false + }, + + ArrowFunctionExpression() { + return false + }, + AssignmentExpression() { + return true + }, + AwaitExpression() { + return true + }, + BinaryExpression(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + typeConversionBinaryOps.has(node.operator) && + (node.left.type !== "Literal" || node.right.type !== "Literal") + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + CallExpression() { + return true + }, + FunctionExpression() { + return false + }, + ImportExpression() { + return true + }, + MemberExpression(node, options, visitorKeys) { + if (options.considerGetters) { + return true + } + if ( + options.considerImplicitTypeConversion && + node.computed && + node.property.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + MethodDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + NewExpression() { + return true + }, + Property(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UnaryExpression(node, options, visitorKeys) { + if (node.operator === "delete") { + return true + } + if ( + options.considerImplicitTypeConversion && + typeConversionUnaryOps.has(node.operator) && + node.argument.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UpdateExpression() { + return true + }, + YieldExpression() { + return true + }, + }) +); + +/** + * Check whether a given node has any side effect or not. + * @param {Node} node The node to get. + * @param {SourceCode} sourceCode The source code object. + * @param {object} [options] The option object. + * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects. + * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects. + * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`. + * @returns {boolean} `true` if the node has a certain side effect. + */ +function hasSideEffect( + node, + sourceCode, + { considerGetters = false, considerImplicitTypeConversion = false } = {} +) { + return visitor.$visit( + node, + { considerGetters, considerImplicitTypeConversion }, + sourceCode.visitorKeys || evk.KEYS + ) +} + +/** + * Get the left parenthesis of the parent node syntax if it exists. + * E.g., `if (a) {}` then the `(`. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {Token|null} The left parenthesis of the parent node syntax + */ +function getParentSyntaxParen(node, sourceCode) { + const parent = node.parent; + + switch (parent.type) { + case "CallExpression": + case "NewExpression": + if (parent.arguments.length === 1 && parent.arguments[0] === node) { + return sourceCode.getTokenAfter( + parent.callee, + isOpeningParenToken + ) + } + return null + + case "DoWhileStatement": + if (parent.test === node) { + return sourceCode.getTokenAfter( + parent.body, + isOpeningParenToken + ) + } + return null + + case "IfStatement": + case "WhileStatement": + if (parent.test === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "ImportExpression": + if (parent.source === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "SwitchStatement": + if (parent.discriminant === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "WithStatement": + if (parent.object === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + default: + return null + } +} + +/** + * Check whether a given node is parenthesized or not. + * @param {number} times The number of parantheses. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized the given times. + */ +/** + * Check whether a given node is parenthesized or not. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized. + */ +function isParenthesized( + timesOrNode, + nodeOrSourceCode, + optionalSourceCode +) { + let times, node, sourceCode, maybeLeftParen, maybeRightParen; + if (typeof timesOrNode === "number") { + times = timesOrNode | 0; + node = nodeOrSourceCode; + sourceCode = optionalSourceCode; + if (!(times >= 1)) { + throw new TypeError("'times' should be a positive integer.") + } + } else { + times = 1; + node = timesOrNode; + sourceCode = nodeOrSourceCode; + } + + if (node == null) { + return false + } + + maybeLeftParen = maybeRightParen = node; + do { + maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen); + maybeRightParen = sourceCode.getTokenAfter(maybeRightParen); + } while ( + maybeLeftParen != null && + maybeRightParen != null && + isOpeningParenToken(maybeLeftParen) && + isClosingParenToken(maybeRightParen) && + // Avoid false positive such as `if (a) {}` + maybeLeftParen !== getParentSyntaxParen(node, sourceCode) && + --times > 0 + ) + + return times === 0 +} + /** * @author Toru Nagashima * See LICENSE file in root directory for full license. */ -const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/g; +const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/gu; /** @type {WeakMap} */ const internal = new WeakMap(); @@ -810,7 +1091,6 @@ function replaceS(matcher, str, replacement) { return chunks.join("") } -//eslint-disable-next-line valid-jsdoc /** * Replace a given string by a given matcher. * @param {PatternMatcher} matcher The pattern matcher. @@ -886,7 +1166,6 @@ class PatternMatcher { return !ret.done } - //eslint-disable-next-line valid-jsdoc /** * Replace a given string. * @param {string} str The string to be replaced. @@ -900,8 +1179,8 @@ class PatternMatcher { } } -const SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/; -const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/; +const SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/u; +const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u; const has = Function.call.bind(Object.hasOwnProperty); const READ = Symbol("read"); @@ -1122,7 +1401,7 @@ class ReferenceTracker { * @param {object} traceMap The trace map. * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references. */ - //eslint-disable-next-line complexity, require-jsdoc + //eslint-disable-next-line complexity *_iteratePropertyReferences(rootNode, path, traceMap) { let node = rootNode; while (!SENTINEL_TYPE.test(node.parent.type)) { @@ -1338,6 +1617,7 @@ var index = { getPropertyName, getStaticValue, getStringIfConstant, + hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, @@ -1359,6 +1639,7 @@ var index = { isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, + isParenthesized, isSemicolonToken, PatternMatcher, READ, @@ -1366,5 +1647,5 @@ var index = { }; export default index; -export { CALL, CONSTRUCT, ESM, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isSemicolonToken, PatternMatcher, READ, ReferenceTracker }; +export { CALL, CONSTRUCT, ESM, PatternMatcher, READ, ReferenceTracker, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken }; //# sourceMappingURL=index.mjs.map diff --git a/tools/node_modules/eslint/node_modules/eslint-utils/package.json b/tools/node_modules/eslint/node_modules/eslint-utils/package.json index 9157ef76634ddd..b6e49c8b9d384c 100644 --- a/tools/node_modules/eslint/node_modules/eslint-utils/package.json +++ b/tools/node_modules/eslint/node_modules/eslint-utils/package.json @@ -6,22 +6,26 @@ "url": "https://github.com/mysticatea/eslint-utils/issues" }, "bundleDependencies": false, - "dependencies": {}, + "dependencies": { + "eslint-visitor-keys": "^1.0.0" + }, "deprecated": false, "description": "Utilities for ESLint plugins.", "devDependencies": { - "@mysticatea/eslint-plugin": "^5.0.1", + "@mysticatea/eslint-plugin": "^10.0.3", "codecov": "^3.0.2", - "eslint": "^5.0.1", + "dot-prop": "^4.2.0", + "eslint": "^5.16.0", "esm": "^3.0.55", - "espree": "^4.0.0", + "espree": "^5.0.1", "mocha": "^5.2.0", - "nyc": "^12.0.2", + "nyc": "^13.0.1", "opener": "^1.4.3", "rimraf": "^2.6.2", - "rollup": "^0.62.0", + "rollup": "^1.16.7", "rollup-plugin-sourcemaps": "^0.4.2", - "vuepress": "github:mysticatea/vuepress#skip-waiting" + "vuepress": "^0.14.4", + "warun": "^1.0.0" }, "engines": { "node": ">=6" @@ -35,6 +39,7 @@ ], "license": "MIT", "main": "index", + "module": "index.mjs", "name": "eslint-utils", "repository": { "type": "git", @@ -54,7 +59,8 @@ "preversion": "npm test && npm run -s build", "prewatch": "npm run -s clean", "test": "nyc mocha --reporter dot \"test/*.js\"", - "watch": "mocha --require esm --reporter dot --watch --growl \"test/*.js\"" + "watch": "warun \"{src,test}/**/*.js\" -- nyc --reporter lcov mocha --reporter dot \"test/*.js\"" }, - "version": "1.3.1" + "sideEffects": false, + "version": "1.4.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/external-editor/README.md b/tools/node_modules/eslint/node_modules/external-editor/README.md index a6c69017ea10b4..9eb135b643cd56 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/README.md +++ b/tools/node_modules/eslint/node_modules/external-editor/README.md @@ -7,7 +7,7 @@ A node module to edit a string with a users preferred text editor using $VISUAL or $ENVIRONMENT. -Version: 3.0.3 +Version: 3.1.0 As of version 3.0.0, the minimum version of node supported is 4. @@ -63,15 +63,17 @@ A full featured example #### API **Convenience Methods** -- `edit(text)` +- `edit(text, config)` - `text` (string) *Optional* Defaults to empty string + - `config` (Config) *Optional* Options for temporary file creation - **Returns** (string) The contents of the file - Could throw `CreateFileError`, `ReadFileError`, or `LaunchEditorError`, or `RemoveFileError` -- `editAsync(text, callback)` +- `editAsync(text, callback, config)` - `text` (string) *Optional* Defaults to empty string - `callback` (function (error, text)) - `error` could be of type `CreateFileError`, `ReadFileError`, or `LaunchEditorError`, or `RemoveFileError` - - `text`(string) The contents of the file + - `text`(string) The contents of the file + - `config` (Config) *Optional* Options for temporary file creation **Errors** @@ -83,8 +85,9 @@ A full featured example **External Editor Public Methods** -- `new ExternalEditor(text)` +- `new ExternalEditor(text, config)` - `text` (string) *Optional* Defaults to empty string + - `config` (Config) *Optional* Options for temporary file creation - Could throw `CreateFileError` - `run()` Launches the editor. - **Returns** (string) The contents of the file @@ -105,6 +108,14 @@ A full featured example exists and would need be removed manually. - `lastExitStatus` (number) The last exit code emitted from the editor. +**Config Options** + +- `prefix` (string) *Optional* A prefix for the file name. +- `postfix` (string; *Optional* A postfix for the file name. Useful if you want to provide an extension. +- `mode` (number) *Optional* Which mode to create the file with. e.g. 644 +- `template` (string) *Optional* A template for the filename. See [tmp](https://www.npmjs.com/package/tmp). +- `dir` (string) *Optional* Which path to store the file. + ## Errors All errors have a simple message explaining what went wrong. They all also have an `originalError` property containing diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js index ca3f876d9e1994..7faa34c82c7790 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () { ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); - } + }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js index 3ab4817989c817..85a164e7a8fa86 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () { ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); - } + }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js index 7845d8deda2110..69e0513627ac0d 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () { ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); - } + }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js index 238570870e03f0..23d266f248cb46 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () { ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); - } + }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/index.js b/tools/node_modules/eslint/node_modules/external-editor/main/index.js index 3fa210e4b3ab50..258f31964b73b2 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/index.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/index.js @@ -3,7 +3,7 @@ * Node External Editor * * Kevin Gravier - * MIT 2018 + * MIT 2019 */ Object.defineProperty(exports, "__esModule", { value: true }); var chardet_1 = require("chardet"); @@ -19,17 +19,17 @@ var ReadFileError_1 = require("./errors/ReadFileError"); exports.ReadFileError = ReadFileError_1.ReadFileError; var RemoveFileError_1 = require("./errors/RemoveFileError"); exports.RemoveFileError = RemoveFileError_1.RemoveFileError; -function edit(text) { +function edit(text, fileOptions) { if (text === void 0) { text = ""; } - var editor = new ExternalEditor(text); + var editor = new ExternalEditor(text, fileOptions); editor.run(); editor.cleanup(); return editor.text; } exports.edit = edit; -function editAsync(text, callback) { +function editAsync(text, callback, fileOptions) { if (text === void 0) { text = ""; } - var editor = new ExternalEditor(text); + var editor = new ExternalEditor(text, fileOptions); editor.runAsync(function (err, result) { if (err) { setImmediate(callback, err, null); @@ -47,10 +47,14 @@ function editAsync(text, callback) { } exports.editAsync = editAsync; var ExternalEditor = /** @class */ (function () { - function ExternalEditor(text) { + function ExternalEditor(text, fileOptions) { if (text === void 0) { text = ""; } this.text = ""; + this.fileOptions = {}; this.text = text; + if (fileOptions) { + this.fileOptions = fileOptions; + } this.determineEditor(); this.createTemporaryFile(); } @@ -124,8 +128,12 @@ var ExternalEditor = /** @class */ (function () { }; ExternalEditor.prototype.createTemporaryFile = function () { try { - this.tempFile = tmp_1.tmpNameSync({}); - fs_1.writeFileSync(this.tempFile, this.text, { encoding: "utf8" }); + this.tempFile = tmp_1.tmpNameSync(this.fileOptions); + var opt = { encoding: "utf8" }; + if (this.fileOptions.hasOwnProperty("mode")) { + opt.mode = this.fileOptions.mode; + } + fs_1.writeFileSync(this.tempFile, this.text, opt); } catch (createFileError) { throw new CreateFileError_1.CreateFileError(createFileError); diff --git a/tools/node_modules/eslint/node_modules/external-editor/package.json b/tools/node_modules/eslint/node_modules/external-editor/package.json index c13988c0d393e0..ea87070894f653 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/package.json +++ b/tools/node_modules/eslint/node_modules/external-editor/package.json @@ -26,14 +26,14 @@ "@types/chai": "^4.1.4", "@types/chardet": "^0.5.0", "@types/mocha": "^5.2.5", - "@types/node": "^10.9.4", + "@types/node": "^10.14.12", "@types/tmp": "0.0.33", "chai": "^4.0.0", "es6-shim": "^0.35.3", "mocha": "^5.2.0", "ts-node": "^7.0.1", - "tslint": "^5.11.0", - "typescript": "^3.0.3" + "tslint": "^5.18.0", + "typescript": "^3.5.2" }, "engines": { "node": ">=4" @@ -60,9 +60,8 @@ "scripts": { "compile": "tsc -p tsconfig.json", "lint": "tslint './src/**/*.ts' './test/**/*.ts'", - "test": "npm run lint && npm run unit", - "unit": "mocha --recursive --require ts-node/register --timeout 10000 ./test/spec 'test/spec/**/*.ts'" + "test": "mocha --recursive --require ts-node/register --timeout 10000 ./test/spec 'test/spec/**/*.ts'" }, "types": "main/index.d.ts", - "version": "3.0.3" + "version": "3.1.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/glob-parent/LICENSE b/tools/node_modules/eslint/node_modules/glob-parent/LICENSE index 734076d8affcff..63222d7a8f9f5c 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/LICENSE +++ b/tools/node_modules/eslint/node_modules/glob-parent/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) 2015 Elan Shanker +Copyright (c) 2015, 2019 Elan Shanker Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/tools/node_modules/eslint/node_modules/glob-parent/README.md b/tools/node_modules/eslint/node_modules/glob-parent/README.md index 3bec5c78e49dd7..c7fbe3202264a2 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/README.md +++ b/tools/node_modules/eslint/node_modules/glob-parent/README.md @@ -1,17 +1,16 @@ -glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) -====== -Javascript module to extract the non-magic parent path from a glob string. +

    + + + +

    -[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) -[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) +# glob-parent -Usage ------ -```sh -npm install glob-parent --save -``` +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Extract the non-magic parent path from a glob string. -**Examples** +## Usage ```js var globParent = require('glob-parent'); @@ -35,12 +34,18 @@ globParent('path/foo/'); // 'path/foo' globParent('path/foo'); // 'path' (see issue #3 for details) ``` +## API + +### `globParent(maybeGlobString)` + +Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below. + ## Escaping The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: -- `?` (question mark) -- `*` (star) +- `?` (question mark) unless used as a path segment alone +- `*` (asterisk) - `|` (pipe) - `(` (opening parenthesis) - `)` (closing parenthesis) @@ -58,7 +63,7 @@ globParent('foo/\\[bar]/') // 'foo/[bar]' ## Limitations -#### Braces & Brackets +### Braces & Brackets This library attempts a quick and imperfect method of determining which path parts have glob magic without fully parsing/lexing the pattern. There are some advanced use cases that can trip it up, such as nested braces where the outer @@ -67,7 +72,7 @@ yourself in the unlikely circumstance of being affected by this or need to ensure higher-fidelity glob handling in your library, it is recommended that you pre-process your input with [expand-braces] and/or [expand-brackets]. -#### Windows +### Windows Backslashes are not valid path separators for globs. If a path with backslashes is provided anyway, for simple cases, glob-parent will replace the path separator for you and return the non-glob parent path (now with @@ -96,14 +101,28 @@ globParent('./foo \\[bar]') // 'foo [bar]' globParent('./foo \\[bar]*') // '.' ``` +## License -Change Log ----------- -[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) - -License -------- -[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) +ISC [expand-braces]: https://github.com/jonschlinkert/expand-braces [expand-brackets]: https://github.com/jonschlinkert/expand-brackets + +[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg +[npm-url]: https://www.npmjs.com/package/glob-parent +[npm-image]: https://img.shields.io/npm/v/glob-parent.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master + +[travis-url]: https://travis-ci.org/gulpjs/glob-parent +[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/tools/node_modules/eslint/node_modules/glob-parent/index.js b/tools/node_modules/eslint/node_modules/glob-parent/index.js index 3a14a539f04754..900d3fbe3bd1af 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/index.js +++ b/tools/node_modules/eslint/node_modules/glob-parent/index.js @@ -1,24 +1,34 @@ 'use strict'; -var path = require('path'); -var isglob = require('is-glob'); -var pathDirname = require('path-dirname'); +var isGlob = require('is-glob'); +var pathPosixDirname = require('path').posix.dirname; var isWin32 = require('os').platform() === 'win32'; +var slash = '/'; +var backslash = /\\/g; +var enclosure = /[\{\[].*[\/]*.*[\}\]]$/; +var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; +var escaped = /\\([\*\?\|\[\]\(\)\{\}])/g; + module.exports = function globParent(str) { - // flip windows path separators - if (isWin32 && str.indexOf('/') < 0) str = str.split('\\').join('/'); + // flip windows path separators + if (isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } - // special case for strings ending in enclosure containing path separator - if (/[\{\[].*[\/]*.*[\}\]]$/.test(str)) str += '/'; + // special case for strings ending in enclosure containing path separator + if (enclosure.test(str)) { + str += slash; + } - // preserves full path in case of trailing path separator - str += 'a'; + // preserves full path in case of trailing path separator + str += 'a'; - // remove path parts that are globby - do {str = pathDirname.posix(str)} - while (isglob(str) || /(^|[^\\])([\{\[]|\([^\)]+$)/.test(str)); + // remove path parts that are globby + do { + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); - // remove escape chars and return result - return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1'); + // remove escape chars and return result + return str.replace(escaped, '$1'); }; diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md deleted file mode 100644 index e71dc2ceb9856a..00000000000000 --- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob) - -> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-glob -``` - -You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). - -## Usage - -```js -var isGlob = require('is-glob'); -``` - -**True** - -Patterns that have glob characters or regex patterns will return `true`: - -```js -isGlob('!foo.js'); -isGlob('*.js'); -isGlob('**/abc.js'); -isGlob('abc/*.js'); -isGlob('abc/(aaa|bbb).js'); -isGlob('abc/[a-z].js'); -isGlob('abc/{a,b}.js'); -isGlob('abc/?.js'); -//=> true -``` - -Extglobs - -```js -isGlob('abc/@(a).js'); -isGlob('abc/!(a).js'); -isGlob('abc/+(a).js'); -isGlob('abc/*(a).js'); -isGlob('abc/?(a).js'); -//=> true -``` - -**False** - -Escaped globs or extglobs return `false`: - -```js -isGlob('abc/\\@(a).js'); -isGlob('abc/\\!(a).js'); -isGlob('abc/\\+(a).js'); -isGlob('abc/\\*(a).js'); -isGlob('abc/\\?(a).js'); -isGlob('\\!foo.js'); -isGlob('\\*.js'); -isGlob('\\*\\*/abc.js'); -isGlob('abc/\\*.js'); -isGlob('abc/\\(aaa|bbb).js'); -isGlob('abc/\\[a-z].js'); -isGlob('abc/\\{a,b}.js'); -isGlob('abc/\\?.js'); -//=> false -``` - -Patterns that do not have glob patterns return `false`: - -```js -isGlob('abc.js'); -isGlob('abc/def/ghi.js'); -isGlob('foo.js'); -isGlob('abc/@.js'); -isGlob('abc/+.js'); -isGlob(); -isGlob(null); -//=> false -``` - -Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): - -```js -isGlob(['**/*.js']); -isGlob(['foo.js']); -//=> false -``` - -## About - -### Related projects - -* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") -* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") -* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") -* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor**
    | -| --- | --- | -| 40 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [tuvistavie](https://github.com/tuvistavie) | - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/is-glob/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js deleted file mode 100644 index 2ecbe2a74ec48b..00000000000000 --- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/*! - * is-glob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -var isExtglob = require('is-extglob'); - -module.exports = function isGlob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) return true; - - var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/; - var match; - - while ((match = regex.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - return false; -}; diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json deleted file mode 100644 index e871a90c80aea6..00000000000000 --- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-glob/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Daniel Perez", - "email": "daniel@claudetech.com", - "url": "http://tuvistavie.com" - }, - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "is-extglob": "^2.1.0" - }, - "deprecated": false, - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-glob", - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "license": "MIT", - "main": "index.js", - "name": "is-glob", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-glob.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "layout": "default", - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "assemble", - "base", - "update", - "verb" - ] - }, - "reflinks": [ - "assemble", - "bach", - "base", - "composer", - "gulp", - "has-glob", - "is-valid-glob", - "micromatch", - "npm", - "scaffold", - "verb", - "vinyl" - ] - }, - "version": "3.1.0" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/glob-parent/package.json b/tools/node_modules/eslint/node_modules/glob-parent/package.json index fd6efef9308208..f59d1f99f39cda 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/package.json +++ b/tools/node_modules/eslint/node_modules/glob-parent/package.json @@ -1,27 +1,44 @@ { "author": { - "name": "Elan Shanker", - "url": "https://github.com/es128" + "name": "Gulp Team", + "email": "team@gulpjs.com", + "url": "https://gulpjs.com/" }, "bugs": { - "url": "https://github.com/es128/glob-parent/issues" + "url": "https://github.com/gulpjs/glob-parent/issues" }, "bundleDependencies": false, + "contributors": [ + { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com" + } + ], "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "is-glob": "^4.0.1" }, "deprecated": false, - "description": "Strips glob magic from a string to provide the parent directory path", + "description": "Extract the non-magic parent path from a glob string.", "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.5", - "mocha": "^2.1.0" + "coveralls": "github:phated/node-coveralls#2.x", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "mocha": "^6.0.2", + "nyc": "^13.3.0" + }, + "engines": { + "node": ">= 6" }, "files": [ + "LICENSE", "index.js" ], - "homepage": "https://github.com/es128/glob-parent", + "homepage": "https://github.com/gulpjs/glob-parent#readme", "keywords": [ "glob", "parent", @@ -37,11 +54,14 @@ "name": "glob-parent", "repository": { "type": "git", - "url": "git+https://github.com/es128/glob-parent.git" + "url": "git+https://github.com/gulpjs/glob-parent.git" }, "scripts": { - "ci-test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls", - "test": "istanbul test node_modules/mocha/bin/_mocha" + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only" }, - "version": "3.1.0" + "version": "5.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/import-fresh/package.json b/tools/node_modules/eslint/node_modules/import-fresh/package.json index 8ccb9f8b4e98e9..73e9316d8999b7 100644 --- a/tools/node_modules/eslint/node_modules/import-fresh/package.json +++ b/tools/node_modules/eslint/node_modules/import-fresh/package.json @@ -17,13 +17,15 @@ "devDependencies": { "ava": "^1.0.1", "heapdump": "^0.3.12", + "tsd": "^0.7.3", "xo": "^0.23.0" }, "engines": { "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/import-fresh#readme", "keywords": [ @@ -43,7 +45,7 @@ }, "scripts": { "heapdump": "node heapdump.js", - "test": "xo && ava" + "test": "xo && ava && tsd" }, - "version": "3.0.0" + "version": "3.1.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/import-fresh/readme.md b/tools/node_modules/eslint/node_modules/import-fresh/readme.md index 29758c91f75da2..f5414b8cf33fdd 100644 --- a/tools/node_modules/eslint/node_modules/import-fresh/readme.md +++ b/tools/node_modules/eslint/node_modules/import-fresh/readme.md @@ -45,6 +45,14 @@ importFresh('./foo')(); - [import-lazy](https://github.com/sindresorhus/import-lazy) - Import modules lazily -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) +--- + +
    + + Get professional support for this package with a Tidelift subscription + +
    + + Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. +
    +
    diff --git a/tools/node_modules/eslint/node_modules/inquirer/README.md b/tools/node_modules/eslint/node_modules/inquirer/README.md index 1f03655f7914dc..70d71e12a11065 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/README.md +++ b/tools/node_modules/eslint/node_modules/inquirer/README.md @@ -442,3 +442,8 @@ An S3 object selector for Inquirer. [**inquirer-autosubmit-prompt**](https://github.com/yaodingyd/inquirer-autosubmit-prompt)
    Auto submit based on your current input, saving one extra enter + +[**inquirer-file-tree-selection-prompt**](https://github.com/anc95/inquirer-file-tree-selection)
    +Inquirer prompt for to select a file or directory in file tree + +![inquirer-file-tree-selection-prompt](https://github.com/anc95/inquirer-file-tree-selection/blob/master/example/screenshot.gif) \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js index a1f5789d365115..2a090ad159c535 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js +++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js @@ -91,6 +91,8 @@ class InputPrompt extends Base { } onError(state) { + this.rl.line += state.value; + this.rl.cursor += state.value.length; this.render(state.isValid); } diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js index dfbd1d46cc57d8..d5343b39e30d6c 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js +++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js @@ -101,6 +101,11 @@ class PasswordPrompt extends Base { } onKeypress() { + // If user press a key, just clear the default value + if (this.opt.default) { + this.opt.default = undefined; + } + this.render(); } } diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/index.js deleted file mode 100644 index 9788c96dfa3b0c..00000000000000 --- a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - -module.exports = stripAnsi; -module.exports.default = stripAnsi; diff --git a/tools/node_modules/eslint/node_modules/inquirer/package.json b/tools/node_modules/eslint/node_modules/inquirer/package.json index 686c4cea9cc2f9..b0b63fdc1893d3 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/package.json +++ b/tools/node_modules/eslint/node_modules/inquirer/package.json @@ -14,7 +14,7 @@ "cli-width": "^2.0.0", "external-editor": "^3.0.3", "figures": "^2.0.0", - "lodash": "^4.17.11", + "lodash": "^4.17.12", "mute-stream": "0.0.7", "run-async": "^2.2.0", "rxjs": "^6.4.0", @@ -40,7 +40,7 @@ "lib", "README.md" ], - "gitHead": "b951b48e46930b3fe6300b7f42f58d3042579619", + "gitHead": "da5d0e22de84486240b12f52643fbd573f8d0d38", "homepage": "https://github.com/SBoudrias/Inquirer.js#readme", "keywords": [ "command", @@ -63,5 +63,5 @@ "prepublishOnly": "cp ../../README.md .", "test": "nyc mocha test/**/* -r ./test/before" }, - "version": "6.4.1" + "version": "6.5.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/lodash/LICENSE b/tools/node_modules/eslint/node_modules/lodash/LICENSE index c6f2f6145e79b8..77c42f1408a38a 100644 --- a/tools/node_modules/eslint/node_modules/lodash/LICENSE +++ b/tools/node_modules/eslint/node_modules/lodash/LICENSE @@ -1,4 +1,4 @@ -Copyright JS Foundation and other contributors +Copyright OpenJS Foundation and other contributors Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors diff --git a/tools/node_modules/eslint/node_modules/lodash/README.md b/tools/node_modules/eslint/node_modules/lodash/README.md index ba111a5a54ff20..292832fef2ff16 100644 --- a/tools/node_modules/eslint/node_modules/lodash/README.md +++ b/tools/node_modules/eslint/node_modules/lodash/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.11 +# lodash v4.17.15 The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. @@ -28,12 +28,12 @@ var at = require('lodash/at'); var curryN = require('lodash/fp/curryN'); ``` -See the [package source](https://github.com/lodash/lodash/tree/4.17.11-npm) for more details. +See the [package source](https://github.com/lodash/lodash/tree/4.17.15-npm) for more details. **Note:**
    Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. ## Support -Tested in Chrome 68-69, Firefox 61-62, IE 11, Edge 17, Safari 10-11, Node.js 6-10, & PhantomJS 2.1.1.
    +Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
    Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/tools/node_modules/eslint/node_modules/lodash/_baseClone.js b/tools/node_modules/eslint/node_modules/lodash/_baseClone.js index 6f73684f2a6084..290de9275def00 100644 --- a/tools/node_modules/eslint/node_modules/lodash/_baseClone.js +++ b/tools/node_modules/eslint/node_modules/lodash/_baseClone.js @@ -140,16 +140,10 @@ function baseClone(value, bitmask, customizer, key, object, stack) { value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); - - return result; - } - - if (isMap(value)) { + } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); - - return result; } var keysFunc = isFull diff --git a/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js b/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js index c5868f04c5ea3d..c98b5eb0b6acc0 100644 --- a/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js +++ b/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js @@ -22,8 +22,8 @@ function baseMerge(object, source, srcIndex, customizer, stack) { return; } baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); if (isObject(srcValue)) { - stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { diff --git a/tools/node_modules/eslint/node_modules/lodash/_createRound.js b/tools/node_modules/eslint/node_modules/lodash/_createRound.js index bf9b713fcb2b79..88be5df396b61c 100644 --- a/tools/node_modules/eslint/node_modules/lodash/_createRound.js +++ b/tools/node_modules/eslint/node_modules/lodash/_createRound.js @@ -1,9 +1,11 @@ -var toInteger = require('./toInteger'), +var root = require('./_root'), + toInteger = require('./toInteger'), toNumber = require('./toNumber'), toString = require('./toString'); /* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; +var nativeIsFinite = root.isFinite, + nativeMin = Math.min; /** * Creates a function like `_.round`. @@ -17,7 +19,7 @@ function createRound(methodName) { return function(number, precision) { number = toNumber(number); precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision) { + if (precision && nativeIsFinite(number)) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. var pair = (toString(number) + 'e').split('e'), diff --git a/tools/node_modules/eslint/node_modules/lodash/_safeGet.js b/tools/node_modules/eslint/node_modules/lodash/_safeGet.js index 411b062053fc65..b070897db29cac 100644 --- a/tools/node_modules/eslint/node_modules/lodash/_safeGet.js +++ b/tools/node_modules/eslint/node_modules/lodash/_safeGet.js @@ -1,5 +1,5 @@ /** - * Gets the value at `key`, unless `key` is "__proto__". + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. @@ -7,6 +7,10 @@ * @returns {*} Returns the property value. */ function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + if (key == '__proto__') { return; } diff --git a/tools/node_modules/eslint/node_modules/lodash/core.js b/tools/node_modules/eslint/node_modules/lodash/core.js index e333c15b986734..89c77ded06308d 100644 --- a/tools/node_modules/eslint/node_modules/lodash/core.js +++ b/tools/node_modules/eslint/node_modules/lodash/core.js @@ -2,7 +2,7 @@ * @license * Lodash (Custom Build) * Build: `lodash core -o ./dist/lodash.core.js` - * Copyright JS Foundation and other contributors + * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.11'; + var VERSION = '4.17.15'; /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; diff --git a/tools/node_modules/eslint/node_modules/lodash/core.min.js b/tools/node_modules/eslint/node_modules/lodash/core.min.js index bd1e5453f3617b..bb543ff54abc0a 100644 --- a/tools/node_modules/eslint/node_modules/lodash/core.min.js +++ b/tools/node_modules/eslint/node_modules/lodash/core.min.js @@ -25,5 +25,5 @@ return G(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return M(n)?n.length?A(n):[]:W(n)},o.values=W,o.extend=Bn,Y(o,o),o.clone=function(n){return V(n)?Nn(n)?A(n):k(n,_n(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,fn):n},o.every=function(n,t,r){return t=r?Z:t,f(n,g(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=q,o.identity=X,o.indexOf=P,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==hn.call(n); },o.isDate=function(n){return H(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return M(t)&&(Nn(t)||L(t)||U(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return H(n)&&"[object RegExp]"==hn.call(n)},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){ var t=null==n?0:n.length;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?a(n,X,v):Z},o.min=function(n){return n&&n.length?a(n,X,_):Z},o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=M(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){ -var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.11",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n); +var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.15",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n); })}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/lodash/debounce.js b/tools/node_modules/eslint/node_modules/lodash/debounce.js index 205e49f342480e..8f751d53d11886 100644 --- a/tools/node_modules/eslint/node_modules/lodash/debounce.js +++ b/tools/node_modules/eslint/node_modules/lodash/debounce.js @@ -173,6 +173,7 @@ function debounce(func, wait, options) { } if (maxing) { // Handle invocations in a tight loop. + clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } diff --git a/tools/node_modules/eslint/node_modules/lodash/lodash.js b/tools/node_modules/eslint/node_modules/lodash/lodash.js index cb139dd81ebee6..9b95dfefe87f73 100644 --- a/tools/node_modules/eslint/node_modules/lodash/lodash.js +++ b/tools/node_modules/eslint/node_modules/lodash/lodash.js @@ -1,7 +1,7 @@ /** * @license * Lodash - * Copyright JS Foundation and other contributors + * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.11'; + var VERSION = '4.17.15'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -2671,16 +2671,10 @@ value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); - - return result; - } - - if (isMap(value)) { + } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); - - return result; } var keysFunc = isFull @@ -3604,8 +3598,8 @@ return; } baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); if (isObject(srcValue)) { - stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { @@ -5422,7 +5416,7 @@ return function(number, precision) { number = toNumber(number); precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision) { + if (precision && nativeIsFinite(number)) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. var pair = (toString(number) + 'e').split('e'), @@ -6605,7 +6599,7 @@ } /** - * Gets the value at `key`, unless `key` is "__proto__". + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. @@ -6613,6 +6607,10 @@ * @returns {*} Returns the property value. */ function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + if (key == '__proto__') { return; } @@ -10413,6 +10411,7 @@ } if (maxing) { // Handle invocations in a tight loop. + clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } @@ -14799,9 +14798,12 @@ , 'g'); // Use a sourceURL for easier debugging. + // The sourceURL gets injected into the source that's eval-ed, so be careful + // with lookup (in case of e.g. prototype pollution), and strip newlines if any. + // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. var sourceURL = '//# sourceURL=' + - ('sourceURL' in options - ? options.sourceURL + (hasOwnProperty.call(options, 'sourceURL') + ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') : ('lodash.templateSources[' + (++templateCounter) + ']') ) + '\n'; @@ -14834,7 +14836,9 @@ // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - var variable = options.variable; + // Like with sourceURL, we take care to not check the option's prototype, + // as this configuration is a code injection vector. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; } @@ -17039,10 +17043,11 @@ baseForOwn(LazyWrapper.prototype, function(func, methodName) { var lodashFunc = lodash[methodName]; if (lodashFunc) { - var key = (lodashFunc.name + ''), - names = realNames[key] || (realNames[key] = []); - - names.push({ 'name': methodName, 'func': lodashFunc }); + var key = lodashFunc.name + ''; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ 'name': methodName, 'func': lodashFunc }); } }); diff --git a/tools/node_modules/eslint/node_modules/lodash/lodash.min.js b/tools/node_modules/eslint/node_modules/lodash/lodash.min.js index c911263442db41..13ec307dac5a6f 100644 --- a/tools/node_modules/eslint/node_modules/lodash/lodash.min.js +++ b/tools/node_modules/eslint/node_modules/lodash/lodash.min.js @@ -6,132 +6,132 @@ return true}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,kn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",En=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kn+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Un={}; -Un["[object Float32Array]"]=Un["[object Float64Array]"]=Un["[object Int8Array]"]=Un["[object Int16Array]"]=Un["[object Int32Array]"]=Un["[object Uint8Array]"]=Un["[object Uint8ClampedArray]"]=Un["[object Uint16Array]"]=Un["[object Uint32Array]"]=true,Un["[object Arguments]"]=Un["[object Array]"]=Un["[object ArrayBuffer]"]=Un["[object Boolean]"]=Un["[object DataView]"]=Un["[object Date]"]=Un["[object Error]"]=Un["[object Function]"]=Un["[object Map]"]=Un["[object Number]"]=Un["[object Object]"]=Un["[object RegExp]"]=Un["[object Set]"]=Un["[object String]"]=Un["[object WeakMap]"]=false; -var Bn={};Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object DataView]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object Symbol]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true, -Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object WeakMap]"]=false;var Ln={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){ -try{var n=Nn&&Nn.require&&Nn.require("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e", -"\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a", -"\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I", -"\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r", -"\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ", -"\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),tt=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Ln)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function kn(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Ln(n){ -this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Lr(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Bn[s])return i?n:{};f=ke(n,s,c)}}if(o||(o=new Zn), -i=o.get(n))return i;if(o.set(n,f),pf(n))return n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}),f;if(sf(n))return n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))}),f;var a=l?a?ve:_e:a?Uu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function"); -return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,E(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++ut}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,E(t))),s=Ci(p.length,s), -l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_r.length?t:Et(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Lt(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){ -return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)return true;if(null==n||null==t||!yu(n)&&!yu(t))return n!==n&&t!==t;n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{ +}function A(n,t){for(var r=-1,e=Array(n);++r"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,En="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+En+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={}; +Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object DataView]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false; +var Ln={};Ln["[object Arguments]"]=Ln["[object Array]"]=Ln["[object ArrayBuffer]"]=Ln["[object DataView]"]=Ln["[object Boolean]"]=Ln["[object Date]"]=Ln["[object Float32Array]"]=Ln["[object Float64Array]"]=Ln["[object Int8Array]"]=Ln["[object Int16Array]"]=Ln["[object Int32Array]"]=Ln["[object Map]"]=Ln["[object Number]"]=Ln["[object Object]"]=Ln["[object RegExp]"]=Ln["[object Set]"]=Ln["[object String]"]=Ln["[object Symbol]"]=Ln["[object Uint8Array]"]=Ln["[object Uint8ClampedArray]"]=Ln["[object Uint16Array]"]=Ln["[object Uint32Array]"]=true, +Ln["[object Error]"]=Ln["[object Function]"]=Ln["[object WeakMap]"]=false;var Un={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){ +try{var n=Nn&&Nn.f&&Nn.f("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I", +"\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C", +"\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i", +"\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r", +"\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij", +"\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),tt=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Un)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function En(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Un(n){this.__wrapped__=n, +this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Ur(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Ln[s])return i?n:{};f=Ee(n,s,c)}}if(o||(o=new Zn), +i=o.get(n))return i;o.set(n,f),pf(n)?n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}):sf(n)&&n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))});var a=l?a?ve:_e:a?Bu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function"); +return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,k(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++ut}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,k(t))),s=Ci(p.length,s), +l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_r.length?t:kt(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Ut(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){ +return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!yu(t))t=n!==n&&t!==t;else n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{ if(!(1&r)&&(i=a&&oi.call(n,"__wrapped__"),f=o&&oi.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Zn),t=Mt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Zn),i=1&r,f=_e(n),o=f.length,c=_e(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:oi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],E(ye())),n=Gt(n,function(n,r,u){return{a:c(t,function(t){return t(n)}), -b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f){e=c;break n}e=c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e=u){for(;e>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:ot.length?n:Et(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)),t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length); -}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?T:i,u=1),t=Qu(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:B(f,a),o-=c.length,or?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Ur(e,r,h[4]):r,i[4]=e?B(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Br(e,r,h[6]):r,i[6]=e?B(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1], -r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Li(i[9]-a,0),!f&&24&t&&(t&=-25),c=t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),Le((h?co:yo)(c,i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t; +}else{if(f=new Zn,e)var s=e(a,l,c,n,t,f);if(s===T?!Mt(l,a,3,e,f):!s)return false}}return true}function Ft(n){return!(!du(n)||ci&&ci in n)&&(_u(n)?hi:dn).test(Te(n))}function Nt(n){return yu(n)&&"[object RegExp]"==Ot(n)}function Pt(n){return yu(n)&&"[object Set]"==vo(n)}function Zt(n){return yu(n)&&gu(n.length)&&!!Bn[Ot(n)]}function qt(n){return typeof n=="function"?n:null==n?$u:typeof n=="object"?ff(n)?Jt(n[0],n[1]):Ht(n):Zu(n)}function Vt(n){if(!ze(n))return Li(n);var t,r=[];for(t in Qu(n))oi.call(n,t)&&"constructor"!=t&&r.push(t); +return r}function Kt(n,t){return nt?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],k(ye())),n=Gt(n,function(n){return{ +a:c(t,function(t){return t(n)}),b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e=u){for(;e>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:ot.length?n:kt(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)), +t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length)}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?T:i,u=1),t=Qu(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:L(f,a), +o-=c.length,or?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Br(e,r,h[4]):r,i[4]=e?L(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Lr(e,r,h[6]):r,i[6]=e?L(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0], +t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Ui(i[9]-a,0),!f&&24&t&&(t&=-25),Ue((h?co:yo)(t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t; var c=-1,a=true,l=2&r?new Nn:T;for(i.set(n,t),i.set(t,n);++cr&&(r=Li(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=ku(r),u=0>r?Li(e+u,0):Ci(u,e-1)),_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[]; -}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Li(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n; -}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=ku(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T),r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder, -n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments,a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)), -s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Li(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e), -r.cache=i.set(u,e)||i,e)};return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false; -var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==ku(n)}function gu(n){return typeof n=="number"&&-1=n}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"; -}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n)}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Lr(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value); -return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?L:Lu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function ku(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function Eu(n){return n?pt(ku(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n; -}function Ou(n){return Cr(n,Uu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:Et(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Uu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Bu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){ -return t(n,r[0])})}function Lu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=kt(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=kt(t,Wu(t))); -var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Lr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){}function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){ -var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.allocUnsafe:T,di=U(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){try{var n=je(Qu,"defineProperty"); -return n({},"",{}),n}catch(n){}}(),ki=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,Ei=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Ui=ri.join,Bi=U(Qu.keys,Qu),Li=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){ -function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=kn.prototype,An.prototype.constructor=An,On.prototype=eo(kn.prototype),On.prototype.constructor=On,Ln.prototype=eo(kn.prototype),Ln.prototype.constructor=Ln,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n], +return typeof n.constructor!="function"||ze(n)?{}:eo(di(n))}function Ee(n,t,r){var e=n.constructor;switch(t){case"[object ArrayBuffer]":return Rr(n);case"[object Boolean]":case"[object Date]":return new e(+n);case"[object DataView]":return t=r?Rr(n.buffer):n.buffer,new n.constructor(t,n.byteOffset,n.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]": +case"[object Uint16Array]":case"[object Uint32Array]":return zr(n,r);case"[object Map]":return new e;case"[object Number]":case"[object String]":return new e(n);case"[object RegExp]":return t=new n.constructor(n.source,_n.exec(n)),t.lastIndex=n.lastIndex,t;case"[object Set]":return new e;case"[object Symbol]":return to?Qu(to.call(n)):{}}}function ke(n){return ff(n)||of(n)||!!(ji&&n&&n[ji])}function Se(n,t){var r=typeof n;return t=null==t?9007199254740991:t,!!t&&("number"==r||"symbol"!=r&&bn.test(n))&&-1r&&(r=Ui(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=Eu(r),u=0>r?Ui(e+u,0):Ci(u,e-1)), +_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[]}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Ui(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){ +return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T), +r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder,n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments, +a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return lo(h),h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ui(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache; +return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t; +}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false;var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==Eu(n)}function gu(n){return typeof n=="number"&&-1=n; +}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n); +}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Ur(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?U:Uu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function ku(n){return n?pt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n, +n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n}function Ou(n){return Cr(n,Bu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:kt(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Bu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[], +null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Lu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){return t(n,r[0])})}function Uu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n; +}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=Et(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=Et(t,Wu(t)));var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Ur(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){} +function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.g:T,di=B(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){ +try{var n=je(Qu,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ei=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,ki=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Bi=ri.join,Li=B(Qu.keys,Qu),Ui=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){ +function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=eo(En.prototype),On.prototype.constructor=On,Un.prototype=eo(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n], this.size-=n?1:0,n},Mn.prototype.get=function(n){var t=this.__data__;return Vi?(n=t[n],"__lodash_hash_undefined__"===n?T:n):oi.call(t,n)?t[n]:T},Mn.prototype.has=function(n){var t=this.__data__;return Vi?t[n]!==T:oi.call(t,n)},Mn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Vi&&t===T?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(n){var t=this.__data__;return n=ft(t,n),!(0>n)&&(n==t.length-1?t.pop():xi.call(t,n,1), --this.size,true)},Tn.prototype.get=function(n){var t=this.__data__;return n=ft(t,n),0>n?T:t[n][1]},Tn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ni||Tn),string:new Mn}},Fn.prototype.delete=function(n){return n=be(this,n).delete(n),this.size-=n?1:0,n},Fn.prototype.get=function(n){return be(this,n).get(n); },Fn.prototype.has=function(n){return be(this,n).has(n)},Fn.prototype.set=function(n,t){var r=be(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Nn.prototype.add=Nn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Zn.prototype.get=function(n){ -return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=ki||function(n){ -return $n.clearTimeout(n)},so=Zi&&1/L(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){ +return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=Ei||function(n){ +return $n.clearTimeout(n)},so=Zi&&1/U(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){ var t=Ot(n);if(n=(n="[object Object]"==t?n.constructor:T)?Te(n):"")switch(n){case Hi:return"[object DataView]";case Ji:return"[object Map]";case Yi:return"[object Promise]";case Qi:return"[object Set]";case Xi:return"[object WeakMap]"}return t});var go=ui?_u:Vu,yo=Ce(co),bo=Si||function(n,t){return $n.setTimeout(n,t)},xo=Ce(ao),jo=function(n){n=cu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(tn,function(n,r,e,u){ -t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),ko=fr(function(n){var t=c(n,kr);return t.length&&t[0]===n[0]?Wt(t):[]}),Eo=fr(function(n){var t=Ve(n),r=c(n,kr);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,kr);return(t=typeof t=="function"?t:T)&&r.pop(), -r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Uo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Bo=fr(function(n){return mr(i(n,hu))}),Lo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T), -mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1=t}),of=Lt(function(){return arguments}())?Lt:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?E(Vn):Ct,af=zi||Vu,lf=Kn?E(Kn):Dt,sf=Gn?E(Gn):Tt,hf=Hn?E(Hn):Nt,pf=Jn?E(Jn):Pt,_f=Yn?E(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){ -if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Uu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Uu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Li(ku(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));et?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:ku(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[]; -},An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=ku(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:ku(e),0>e&&(e+=u),e=r>e?0:Eu(e);r>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Li(ku(r),0), -fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:ku(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:ku(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n), -n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Lr(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{}; -}return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null!=n&&(r=Er(r),n=lr(n,t,r(Et(n,t)),void 0)),n},An.updateWith=function(n,t,r,e){ -return e=typeof e=="function"?e:T,null!=n&&(r=Er(r),n=lr(n,t,r(Et(n,t)),e)),n},An.values=Lu,An.valuesIn=function(n){return null==n?[]:S(n,Uu(n))},An.without=Uo,An.words=Mu,An.wrap=function(n,t){return nf(Er(t),n)},An.xor=Bo,An.xorBy=Lo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Uf,An.capitalize=Cu, +t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),Eo=fr(function(n){var t=c(n,Er);return t.length&&t[0]===n[0]?Wt(t):[]}),ko=fr(function(n){var t=Ve(n),r=c(n,Er);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,Er);return(t=typeof t=="function"?t:T)&&r.pop(), +r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Bo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Lo=fr(function(n){return mr(i(n,hu))}),Uo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T), +mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1=t}),of=Ut(function(){return arguments}())?Ut:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?k(Vn):Ct,af=zi||Vu,lf=Kn?k(Kn):Dt,sf=Gn?k(Gn):Tt,hf=Hn?k(Hn):Nt,pf=Jn?k(Jn):Pt,_f=Yn?k(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){ +if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Bu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Bu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Ui(Eu(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));et?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[]; +},An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:ku(e);r>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Ui(Eu(r),0), +fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:Eu(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n), +n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Ur(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{}; +}return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null==n?n:lr(n,t,kr(r)(kt(n,t)),void 0)},An.updateWith=function(n,t,r,e){ +return e=typeof e=="function"?e:T,null!=n&&(n=lr(n,t,kr(r)(kt(n,t)),e)),n},An.values=Uu,An.valuesIn=function(n){return null==n?[]:S(n,Bu(n))},An.without=Bo,An.words=Mu,An.wrap=function(n,t){return nf(kr(t),n)},An.xor=Lo,An.xorBy=Uo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Bf,An.capitalize=Cu, An.ceil=Xf,An.clamp=function(n,t,r){return r===T&&(r=t,t=T),r!==T&&(r=Su(r),r=r===r?r:0),t!==T&&(t=Su(t),t=t===t?t:0),pt(Su(n),t,r)},An.clone=function(n){return _t(n,4)},An.cloneDeep=function(n){return _t(n,5)},An.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,5,t)},An.cloneWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,4,t)},An.conformsTo=function(n,t){return null==t||gt(n,t,Wu(t))},An.deburr=Du,An.defaultTo=function(n,t){return null==n||n!==n?t:n},An.divide=nc,An.endsWith=function(n,t,r){ -n=Iu(n),t=yr(t);var e=n.length,e=r=r===T?e:pt(ku(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},An.eq=lu,An.escape=function(n){return(n=Iu(n))&&H.test(n)?n.replace(K,nt):n},An.escapeRegExp=function(n){return(n=Iu(n))&&en.test(n)?n.replace(rn,"\\$&"):n},An.every=function(n,t,r){var e=ff(n)?u:bt;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.find=Fo,An.findIndex=Ne,An.findKey=function(n,t){return p(n,ye(t,3),mt)},An.findLast=No,An.findLastIndex=Pe,An.findLastKey=function(n,t){return p(n,ye(t,3),At); -},An.floor=tc,An.forEach=nu,An.forEachRight=tu,An.forIn=function(n,t){return null==n?n:oo(n,ye(t,3),Uu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Uu)},An.forOwn=function(n,t){return n&&mt(n,ye(t,3))},An.forOwnRight=function(n,t){return n&&At(n,ye(t,3))},An.get=Ru,An.gt=ef,An.gte=uf,An.has=function(n,t){return null!=n&&we(n,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(n,t,r,e){return n=su(n)?n:Lu(n),r=r&&!e?ku(r):0,e=n.length,0>r&&(r=Li(e+r,0)),ju(n)?r<=e&&-1r&&(r=Li(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&nr&&(r=Ui(e+r,0)),ju(n)?r<=e&&-1r&&(r=Ui(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&n=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Ui.call(n,t)},An.kebabCase=Bf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=ku(r),u=0>u?Li(e+u,0):Ci(u,e-1)), -t===t)n:{for(r=u+1;r--;)if(n[r]===t){n=r;break n}n=r}else n=_(n,d,u,true);return n},An.lowerCase=Lf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){ -return{}},An.stubString=function(){return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,ku(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=ku(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=ku(t))?D(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){ -var e=ff(n)?s:j,u=3>arguments.length;return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:ku(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++en||9007199254740991=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")), -u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Ln.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Ln.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({ -iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Ln.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ln.prototype[n]=function(){return this.__filtered__?new Ln(this):this[r](1)}}),Ln.prototype.compact=function(){return this.filter($u)},Ln.prototype.find=function(n){return this.filter(n).head()},Ln.prototype.findLast=function(n){return this.reverse().find(n); -},Ln.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Ln(this):this.map(function(r){return Bt(r,n,t)})}),Ln.prototype.reject=function(n){return this.filter(au(ye(n)))},Ln.prototype.slice=function(n,t){n=ku(n);var r=this;return r.__filtered__&&(0t)?new Ln(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=ku(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Ln.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ln.prototype.toArray=function(){return this.take(4294967295); -},mt(Ln.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ln,c=o[0],l=f||ff(t),s=function(n){return n=u.apply(An,a([n],o)),e&&h?n[0]:n};l&&r&&typeof c=="function"&&1!=c.length&&(f=l=false);var h=this.__chain__,p=!!this.__actions__.length,c=i&&!h,f=f&&!p;return!i&&l?(t=f?t:new Ln(this),t=n.apply(t,o),t.__actions__.push({ -func:Qe,args:[s],thisArg:T}),new On(t,h)):c&&f?n.apply(this,o):(t=this.thru(s),c?e?t.value()[0]:t.value():t)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)})}}),mt(Ln.prototype,function(n,t){var r=An[t];if(r){var e=r.name+""; -(Gi[e]||(Gi[e]=[])).push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Ln.prototype.clone=function(){var n=new Ln(this.__wrapped__);return n.__actions__=Lr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Lr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Lr(this.__views__),n},Ln.prototype.reverse=function(){if(this.__filtered__){var n=new Ln(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n; -},Ln.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=0;for(var o=i,f=this.__views__,c=-1,a=f.length;++c=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){for(var t,r=this;r instanceof kn;){ -var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Ln?(this.__actions__.length&&(n=new Ln(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,wi&&(An.prototype[wi]=Xe), -An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this); \ No newline at end of file +An.isSafeInteger=function(n){return vu(n)&&-9007199254740991<=n&&9007199254740991>=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Bi.call(n,t)},An.kebabCase=Lf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=Eu(r),u=0>u?Ui(e+u,0):Ci(u,e-1)), +t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=_(n,d,u,true);return n},An.lowerCase=Uf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return{}},An.stubString=function(){ +return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,Eu(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){var e=ff(n)?s:j,u=3>arguments.length; +return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++en||9007199254740991=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){ +var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Un.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){ +var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Un.prototype[n]=function(){return this.__filtered__?new Un(this):this[r](1)}}),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(n){ +return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0t)?new Un(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Un.prototype.takeRightWhile=function(n){ +return this.reverse().takeWhile(n).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){function t(n){return n=u.apply(An,a([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Un,l=f[0],s=c||ff(o);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=i&&!h,c=c&&!p; +return!i&&s?(o=c?o:new Un(this),o=n.apply(o,f),o.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(o,h)):l&&c?n.apply(this,f):(o=this.thru(t),l?e?o.value()[0]:o.value():o)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)}); +}}),mt(Un.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";oi.call(Gi,e)||(Gi[e]=[]),Gi[e].push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Un.prototype.clone=function(){var n=new Un(this.__wrapped__);return n.__actions__=Ur(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ur(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ur(this.__views__),n},Un.prototype.reverse=function(){if(this.__filtered__){var n=new Un(this); +n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Un.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){ +for(var t,r=this;r instanceof En;){var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Un?(this.__actions__.length&&(n=new Un(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head, +wi&&(An.prototype[wi]=Xe),An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this); \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/lodash/package.json b/tools/node_modules/eslint/node_modules/lodash/package.json index 73236b6290042b..ccf80be0796354 100644 --- a/tools/node_modules/eslint/node_modules/lodash/package.json +++ b/tools/node_modules/eslint/node_modules/lodash/package.json @@ -1,8 +1,7 @@ { "author": { "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" + "email": "john.david.dalton@gmail.com" }, "bugs": { "url": "https://github.com/lodash/lodash/issues" @@ -11,13 +10,11 @@ "contributors": [ { "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" + "email": "john.david.dalton@gmail.com" }, { "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" + "email": "mathias@qiwi.be" } ], "deprecated": false, @@ -39,5 +36,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" }, - "version": "4.17.11" + "version": "4.17.15" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/lodash/template.js b/tools/node_modules/eslint/node_modules/lodash/template.js index 16539eec2f78d6..f71d13024982f0 100644 --- a/tools/node_modules/eslint/node_modules/lodash/template.js +++ b/tools/node_modules/eslint/node_modules/lodash/template.js @@ -27,6 +27,12 @@ var reNoMatch = /($^)/; /** Used to match unescaped characters in compiled string literals. */ var reUnescapedString = /['\n\r\u2028\u2029\\]/g; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + /** * Creates a compiled template function that can interpolate data properties * in "interpolate" delimiters, HTML-escape interpolated data properties in @@ -162,7 +168,14 @@ function template(string, options, guard) { , 'g'); // Use a sourceURL for easier debugging. - var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : ''; + // The sourceURL gets injected into the source that's eval-ed, so be careful + // with lookup (in case of e.g. prototype pollution), and strip newlines if any. + // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + var sourceURL = hasOwnProperty.call(options, 'sourceURL') + ? ('//# sourceURL=' + + (options.sourceURL + '').replace(/[\r\n]/g, ' ') + + '\n') + : ''; string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { interpolateValue || (interpolateValue = esTemplateValue); @@ -193,7 +206,9 @@ function template(string, options, guard) { // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - var variable = options.variable; + // Like with sourceURL, we take care to not check the option's prototype, + // as this configuration is a code injection vector. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; } diff --git a/tools/node_modules/eslint/node_modules/path-dirname/index.js b/tools/node_modules/eslint/node_modules/path-dirname/index.js deleted file mode 100644 index ed67817a0045b0..00000000000000 --- a/tools/node_modules/eslint/node_modules/path-dirname/index.js +++ /dev/null @@ -1,143 +0,0 @@ -'use strict'; - -var path = require('path'); -var inspect = require('util').inspect; - -function assertPath(path) { - if (typeof path !== 'string') { - throw new TypeError('Path must be a string. Received ' + inspect(path)); - } -} - -function posix(path) { - assertPath(path); - if (path.length === 0) - return '.'; - var code = path.charCodeAt(0); - var hasRoot = (code === 47/*/*/); - var end = -1; - var matchedSlash = true; - for (var i = path.length - 1; i >= 1; --i) { - code = path.charCodeAt(i); - if (code === 47/*/*/) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) - return hasRoot ? '/' : '.'; - if (hasRoot && end === 1) - return '//'; - return path.slice(0, end); -} - -function win32(path) { - assertPath(path); - var len = path.length; - if (len === 0) - return '.'; - var rootEnd = -1; - var end = -1; - var matchedSlash = true; - var offset = 0; - var code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (code === 47/*/*/ || code === 92/*\*/) { - // Possible UNC root - - rootEnd = offset = 1; - - code = path.charCodeAt(1); - if (code === 47/*/*/ || code === 92/*\*/) { - // Matched double path separator at beginning - var j = 2; - var last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - code = path.charCodeAt(j); - if (code === 47/*/*/ || code === 92/*\*/) - break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - code = path.charCodeAt(j); - if (code !== 47/*/*/ && code !== 92/*\*/) - break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - code = path.charCodeAt(j); - if (code === 47/*/*/ || code === 92/*\*/) - break; - } - if (j === len) { - // We matched a UNC root only - return path; - } - if (j !== last) { - // We matched a UNC root with leftovers - - // Offset by 1 to include the separator after the UNC root to - // treat it as a "normal root" on top of a (UNC) root - rootEnd = offset = j + 1; - } - } - } - } - } else if ((code >= 65/*A*/ && code <= 90/*Z*/) || - (code >= 97/*a*/ && code <= 122/*z*/)) { - // Possible device root - - code = path.charCodeAt(1); - if (path.charCodeAt(1) === 58/*:*/) { - rootEnd = offset = 2; - if (len > 2) { - code = path.charCodeAt(2); - if (code === 47/*/*/ || code === 92/*\*/) - rootEnd = offset = 3; - } - } - } - } else if (code === 47/*/*/ || code === 92/*\*/) { - return path[0]; - } - - for (var i = len - 1; i >= offset; --i) { - code = path.charCodeAt(i); - if (code === 47/*/*/ || code === 92/*\*/) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) { - if (rootEnd === -1) - return '.'; - else - end = rootEnd; - } - return path.slice(0, end); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/tools/node_modules/eslint/node_modules/path-dirname/license b/tools/node_modules/eslint/node_modules/path-dirname/license deleted file mode 100644 index 1981663ad8f104..00000000000000 --- a/tools/node_modules/eslint/node_modules/path-dirname/license +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) Elan Shanker and Node.js 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. diff --git a/tools/node_modules/eslint/node_modules/path-dirname/package.json b/tools/node_modules/eslint/node_modules/path-dirname/package.json deleted file mode 100644 index 81aad7d043f386..00000000000000 --- a/tools/node_modules/eslint/node_modules/path-dirname/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Elan Shanker" - }, - "bugs": { - "url": "https://github.com/es128/path-dirname/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node.js path.dirname() ponyfill", - "files": [ - "index.js" - ], - "homepage": "https://github.com/es128/path-dirname#readme", - "keywords": [ - "dirname", - "dir", - "path", - "paths", - "file", - "built-in", - "util", - "utils", - "core", - "stdlib", - "ponyfill", - "polyfill", - "shim" - ], - "license": "MIT", - "name": "path-dirname", - "repository": { - "type": "git", - "url": "git+https://github.com/es128/path-dirname.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.2" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/path-dirname/readme.md b/tools/node_modules/eslint/node_modules/path-dirname/readme.md deleted file mode 100644 index 652a5623dfca72..00000000000000 --- a/tools/node_modules/eslint/node_modules/path-dirname/readme.md +++ /dev/null @@ -1,53 +0,0 @@ -# path-dirname [![Build Status](https://travis-ci.org/es128/path-dirname.svg?branch=master)](https://travis-ci.org/es128/path-dirname) - -> Node.js [`path.dirname()`](https://nodejs.org/api/path.html#path_path_dirname_path) [ponyfill](https://ponyfill.com) - -This was needed in order to expose `path.posix.dirname()` on Node.js v0.10 - -## Install - -``` -$ npm install --save path-dirname -``` - - -## Usage - -```js -const pathDirname = require('path-dirname'); - -pathDirname('/home/foo'); -//=> '/home' -pathDirname('C:\\Users\\foo'); -//=> 'C:\\Users' -pathDirname('foo'); -//=> '.' -pathDirname('foo/bar'); -//=> 'foo' - -//Using posix version for consistent output when dealing with glob escape chars -pathDirname.win32('C:\\Users\\foo/\\*bar'); -//=> 'C:\\Users\\foo/' -pathDirname.posix('C:\\Users\\foo/\\*bar'); -//=> 'C:\\Users\\foo' -``` - - -## API - -See the [`path.dirname()` docs](https://nodejs.org/api/path.html#path_path_dirname_path). - -### pathDirname(path) - -### pathDirname.posix(path) - -POSIX specific version. - -### pathDirname.win32(path) - -Windows specific version. - - -## License - -MIT diff --git a/tools/node_modules/eslint/node_modules/semver/README.md b/tools/node_modules/eslint/node_modules/semver/README.md index e5ccececf4808f..7de4504d8171df 100644 --- a/tools/node_modules/eslint/node_modules/semver/README.md +++ b/tools/node_modules/eslint/node_modules/semver/README.md @@ -4,7 +4,7 @@ semver(1) -- The semantic versioner for npm ## Install ```bash -npm install --save semver +npm install semver ```` ## Usage @@ -60,6 +60,12 @@ Options: Coerce a string into SemVer if possible (does not imply --loose) +--rtl + Coerce version strings right to left + +--ltr + Coerce version strings left to right (default) + Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. @@ -231,7 +237,7 @@ comparator. Allows minor-level changes if not. #### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` -Allows changes that do not modify the left-most non-zero digit in the +Allows changes that do not modify the left-most non-zero element in the `[major, minor, patch]` tuple. In other words, this allows patch and minor updates for versions `1.0.0` and above, patch updates for versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. @@ -354,6 +360,9 @@ strings that they parse. `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `diff(v1, v2)`: Returns difference between two versions by the release type (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), or null if the versions are the same. @@ -396,16 +405,39 @@ range, use the `satisfies(version, range)` function. ### Coercion -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver -string to semver. It looks for the first digit in a string, and -consumes all remaining characters which satisfy at least a partial semver -(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). -Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). -All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). -Only text which lacks digits will fail coercion (`version one` is not valid). -The maximum length for any semver component considered for coercion is 16 characters; -longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). -The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; -higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). +* `coerce(version, options)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` diff --git a/tools/node_modules/eslint/node_modules/semver/bin/.semver.js.swp b/tools/node_modules/eslint/node_modules/semver/bin/.semver.js.swp new file mode 100644 index 0000000000000000000000000000000000000000..c22a49e3a4edda25a698b9d793b65ef605064236 GIT binary patch literal 16384 zcmeHNO^h5z6)ro0gg_FM@DpqVwHx8-!81KxgMci%wt}(9MnSf;u_ahWxVEQyrq?~) zldkTu2PXlE5EQY15E6%=z$FP%5C^1yNKQx~gdhW4do|m~&To92f5<<^@Od+1f7?COed)Ou*;|VPEK))QiXOcB zCl`eur-6uHy&8Mi2<-IaxU-`=N)E>|>ug7fz4dplp|jWMqkdd7P&2TIft%U;j<4vc ze&_NMzx}pziz?RTH3KyRH3KyRH3KyRH3KyRH3KyR|A!3Zql4_Tucq?N+0loy>4{QR*ffeB0z`KB3fm?uo-@@2c;6>mC;CbLV;G4kXz!!l>fiX}3 zAs~TMz()WdXanyA4g+riZU-3fyPFyN8Sp*e^S}k*F5m{>0Pv?bG4_4nabOp?2%HD* z0S*EGcq3yk13w3z1ik?Tz&*eL;HNh+_7w1S;B!C-+z;FftN}-W>w#C^z}T;WXMv}I zM}P#l0Ne-M1snz54qONP^+v{i0Xz#l1?&P31DAmuP{1;<1pNI5#-0Jb3gkcvYyekZ z&)C0!Ujk165wH!c0v`Yl1MdLt01g5_d>wcKz6(49d;xd_NPu42CEx|%E5M@w`Hln@e>gskcEsE5Czycch&tUJ{ED*n|7ztEQj#z3Ez~%^D^V3Oa`(ilR&zL z=alHnRc`*r!naZ*zsuLG&L?2w^w#(N?jBoDrK3p}^#?iMpg-I2Px^c_7{rClW#+oM zo8K$OVl&91QO={`DAxQ5GKQz2CS#E2BemLb|D#E>e#a3M=!#C3z6M|+jV1oG)AzO- z*1QHk>Wpu(ut)+ee<0%#_nQ0)V-GRTA8Ptxnw=KGz$>eG;}(xv{L`q!tCGh}R7V@m zGnp4z!ZGyxq-D#;58W^cTHF!`F`zf6LCutQ!pYp1T zAdpH~YD+Fd5yiR;-j-4YUtW%KZv|AE0iX&V8RwXmS(avALr*Lo2zW#iPx!Xvg@X6O zLj+e*(vPJZTz)Ca2Rup5v}rV_I+5%RjL~$s?Z8=OJx7NoR}VrIa&O5M`>{;=`Jm~> zyVRA2LRT+c!H$}OZz>G8qLI^+bt~%5i~x6PE6`hZ6h<-TM`b|ZYvdL1P43Z_eHahcc#O-@qtpUT$O3ZABS+BEzG|!?d})21ukZ&SoRQH)!>WZ~4203- zxHd9o=Y%Cfzk9r~_1Z<|mGlLv%mQ*V&$+)YsQN#teZ?_`xkR(U+GnShv$jg?KJx{J z5uVkwPhT);lOQg7@@ytEiCIWb_7q`s^LUlM$dTa>fcvJq?M#Y`jPB^; zH1kJ=8hFC_PEUrSi1SsZE8)w!C%vQeoS^am3Sg-jG*;bho1Ra9o@`77%yvuKt@BXC zN-`2v3TwxC_8P77te9^EaSI#S0bJ*M+XYiq+osw=DaN%8Nm+mFt3edzUeobqsetMw z6}rVjdDGV~cn}qdOtVo+!AcnQ7D_Q=Yg){YES1u1Tjz}tt>g{n>T$kjc>*NWraRUGrX= zs@9GwqXAQ9f0><8McSUb|hn4wGoTC~3RqR%iRxEVmv*5hZr%r(3*G+1z^{Z*D4?j)!?w z>O!*)fs9N(P(+#Z8oqCLqtIJdnZ8}DoXYD~S14bK6}kI)XXUZ;uS${i_c>KYBDjdn zI{smvCXI3>w2J8$Qc}dRRg88FXus7pzumN}6cM5L={9MaU*j#uVQr_wMKa;47>!~I zP@GDU3o=B~<0GMzR9wU{&!x(hPt8tax2MohZw^CfG=U`4rASDb;0K#IC(u((j4!p@ z%u!9mX@a;&|Eu0^N+Xy{TJ|$B^x2(DokE#E+{@E+g};P;5de+&Ey_!{sS zKr#A_00VxE{(l5q0ZsxPfOKjB^`~Z_W}s%EW}s%EW}s%EW}s%^zrp~;iCupuMR?Ts z6ygXIku`?MN<~P^yL~y%DpH-6FY+jk@(EI|*yZmOD(93)rbk2Hq&^zw-SGx8&}N^H zfB})1P=QQ(wAoLyp3GWkX#$D~%4V|pI9b^UDWPk!sq}oR2uTgoBI&iL*Mw6#Ss}+2 z#YHwfGjZ}L7%8I`ohwqUY5=02>zwUOFXh?GSrcj4US`4=#Gw=u%^b2=jgkL#3b-rc zT>Uv^5}hu9QaJ*lzT&YA!6H)F`sBp3nWLs_-PQ@a1*b|2L>f_$NwTMcD2cZ~kk?BQ zza^4chXF*pR2@>t-pmGjJ0jco~lL3w=rR>;|;7Z)p zaREs>?*^ydM{Tmmq`*|^Qm*Ajc{D@=@6I=H3z1=TnJzkW*V1>C>}$Es+mxxo(caoL z15us{x;n0#Gjw`FVYG9(q0px(|4!I$xI*u-94@$KnQ0zXf5DtrA G{eJ+#s{f4u literal 0 HcmV?d00001 diff --git a/tools/node_modules/eslint/node_modules/semver/bin/semver.js b/tools/node_modules/eslint/node_modules/semver/bin/semver.js new file mode 100755 index 00000000000000..666034a75d8442 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/semver/bin/semver.js @@ -0,0 +1,174 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var rtl = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '--rtl': + rtl = true + break + case '--ltr': + rtl = false + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v, options) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + '--rtl', + ' Coerce version strings right to left', + '', + '--ltr', + ' Coerce version strings left to right (default)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/tools/node_modules/eslint/node_modules/semver/package.json b/tools/node_modules/eslint/node_modules/semver/package.json index c81acfc3af0d68..12dd2eace77264 100644 --- a/tools/node_modules/eslint/node_modules/semver/package.json +++ b/tools/node_modules/eslint/node_modules/semver/package.json @@ -1,6 +1,6 @@ { "bin": { - "semver": "./bin/semver" + "semver": "./bin/semver.js" }, "bugs": { "url": "https://github.com/npm/node-semver/issues" @@ -9,7 +9,7 @@ "deprecated": false, "description": "The semantic version parser used by npm.", "devDependencies": { - "tap": "^13.0.0-rc.18" + "tap": "^14.3.1" }, "files": [ "bin", @@ -25,7 +25,7 @@ "url": "git+https://github.com/npm/node-semver.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", "test": "tap" @@ -33,5 +33,5 @@ "tap": { "check-coverage": true }, - "version": "5.7.0" + "version": "6.2.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/semver/semver.js b/tools/node_modules/eslint/node_modules/semver/semver.js index d315d5d68b179e..fd6453f49e0b13 100644 --- a/tools/node_modules/eslint/node_modules/semver/semver.js +++ b/tools/node_modules/eslint/node_modules/semver/semver.js @@ -160,11 +160,13 @@ src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' // Coercion. // Extract anything that could conceivably be a part of a valid semver var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + +src[COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])' +var COERCERTL = R++ +re[COERCERTL] = new RegExp(src[COERCE], 'g') // Tilde ranges. // Meaning is "reasonably at or greater than" @@ -425,6 +427,30 @@ SemVer.prototype.comparePre = function (other) { } while (++i) } +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. SemVer.prototype.inc = function (release, identifier) { @@ -619,6 +645,13 @@ function compareLoose (a, b) { return compare(a, b, true) } +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + exports.rcompare = rcompare function rcompare (a, b, loose) { return compare(b, a, loose) @@ -627,14 +660,14 @@ function rcompare (a, b, loose) { exports.sort = sort function sort (list, loose) { return list.sort(function (a, b) { - return exports.compare(a, b, loose) + return exports.compareBuild(a, b, loose) }) } exports.rsort = rsort function rsort (list, loose) { return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) + return exports.compareBuild(b, a, loose) }) } @@ -754,7 +787,7 @@ Comparator.prototype.parse = function (comp) { throw new TypeError('Invalid comparator: ' + comp) } - this.operator = m[1] + this.operator = m[1] !== undefined ? m[1] : '' if (this.operator === '=') { this.operator = '' } @@ -774,12 +807,16 @@ Comparator.prototype.toString = function () { Comparator.prototype.test = function (version) { debug('Comparator.test', version, this.options.loose) - if (this.semver === ANY) { + if (this.semver === ANY || version === ANY) { return true } if (typeof version === 'string') { - version = new SemVer(version, this.options) + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } } return cmp(version, this.operator, this.semver, this.options) @@ -800,9 +837,15 @@ Comparator.prototype.intersects = function (comp, options) { var rangeTmp if (this.operator === '') { + if (this.value === '') { + return true + } rangeTmp = new Range(comp.value, options) return satisfies(this.value, rangeTmp, options) } else if (comp.operator === '') { + if (comp.value === '') { + return true + } rangeTmp = new Range(this.value, options) return satisfies(comp.semver, rangeTmp, options) } @@ -934,16 +977,40 @@ Range.prototype.intersects = function (range, options) { } return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) }) - }) + ) }) } +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + // Mostly just for testing and legacy API reasons exports.toComparators = toComparators function toComparators (range, options) { @@ -1099,10 +1166,14 @@ function replaceXRange (comp, options) { gtlt = '' } + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed - ret = '<0.0.0' + ret = '<0.0.0-0' } else { // nothing is forbidden ret = '*' @@ -1139,11 +1210,12 @@ function replaceXRange (comp, options) { } } - ret = gtlt + M + '.' + m + '.' + p + ret = gtlt + M + '.' + m + '.' + p + pr } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr } debug('xRange return', ret) @@ -1200,7 +1272,11 @@ Range.prototype.test = function (version) { } if (typeof version === 'string') { - version = new SemVer(version, this.options) + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } } for (var i = 0; i < this.set.length; i++) { @@ -1462,22 +1538,52 @@ function intersects (r1, r2, options) { } exports.coerce = coerce -function coerce (version) { +function coerce (version, options) { if (version instanceof SemVer) { return version } + if (typeof version === 'number') { + version = String(version) + } + if (typeof version !== 'string') { return null } - var match = version.match(re[COERCE]) + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[COERCERTL].lastIndex = -1 + } - if (match == null) { + if (match === null) { return null } - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) } diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000000..96e0292c8e2f64 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/license b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/license similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/license rename to tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/license diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/package.json b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/package.json similarity index 76% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/package.json rename to tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/package.json index 0c379e41c1aa24..472b3021ed8201 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/package.json +++ b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/package.json @@ -9,21 +9,19 @@ }, "bundleDependencies": false, "dependencies": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^3.0.0" }, "deprecated": false, - "description": "Strip ANSI escape codes from a string", + "description": "Strip ANSI escape codes", "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" + "ava": "*", + "xo": "*" }, "engines": { - "node": ">=6" + "node": ">=4" }, "files": [ - "index.js", - "index.d.ts" + "index.js" ], "homepage": "https://github.com/chalk/strip-ansi#readme", "keywords": [ @@ -57,7 +55,7 @@ "url": "git+https://github.com/chalk/strip-ansi.git" }, "scripts": { - "test": "xo && ava && tsd-check" + "test": "xo && ava" }, - "version": "5.2.0" + "version": "4.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/readme.md b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/readme.md similarity index 50% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/readme.md rename to tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/readme.md index 8681fe8af44242..dc76f0cb1a0595 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/readme.md +++ b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/readme.md @@ -1,20 +1,7 @@ # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) ---- - -
    - - Get professional support for 'strip-ansi' with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    - ---- ## Install @@ -30,21 +17,12 @@ const stripAnsi = require('strip-ansi'); stripAnsi('\u001B[4mUnicorn\u001B[0m'); //=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' ``` -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - ## Related - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module - [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes - [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/strip-ansi/index.js index 96e0292c8e2f64..9788c96dfa3b0c 100644 --- a/tools/node_modules/eslint/node_modules/strip-ansi/index.js +++ b/tools/node_modules/eslint/node_modules/strip-ansi/index.js @@ -1,4 +1,7 @@ 'use strict'; const ansiRegex = require('ansi-regex'); -module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; +const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; + +module.exports = stripAnsi; +module.exports.default = stripAnsi; diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/index.js b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/index.js rename to tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/license b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/license rename to tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/package.json b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/package.json rename to tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/readme.md b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/readme.md rename to tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/package.json b/tools/node_modules/eslint/node_modules/strip-ansi/package.json index 472b3021ed8201..0c379e41c1aa24 100644 --- a/tools/node_modules/eslint/node_modules/strip-ansi/package.json +++ b/tools/node_modules/eslint/node_modules/strip-ansi/package.json @@ -9,19 +9,21 @@ }, "bundleDependencies": false, "dependencies": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" }, "deprecated": false, - "description": "Strip ANSI escape codes", + "description": "Strip ANSI escape codes from a string", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" }, "engines": { - "node": ">=4" + "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/chalk/strip-ansi#readme", "keywords": [ @@ -55,7 +57,7 @@ "url": "git+https://github.com/chalk/strip-ansi.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd-check" }, - "version": "4.0.0" + "version": "5.2.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/readme.md b/tools/node_modules/eslint/node_modules/strip-ansi/readme.md index dc76f0cb1a0595..8681fe8af44242 100644 --- a/tools/node_modules/eslint/node_modules/strip-ansi/readme.md +++ b/tools/node_modules/eslint/node_modules/strip-ansi/readme.md @@ -1,7 +1,20 @@ # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string +--- + +
    + + Get professional support for 'strip-ansi' with a Tidelift subscription + +
    + + Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. +
    +
    + +--- ## Install @@ -17,12 +30,21 @@ const stripAnsi = require('strip-ansi'); stripAnsi('\u001B[4mUnicorn\u001B[0m'); //=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' ``` +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + ## Related - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module - [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes - [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/index.js b/tools/node_modules/eslint/node_modules/strip-json-comments/index.js index 4e6576e6d3c388..c37da3de24849c 100644 --- a/tools/node_modules/eslint/node_modules/strip-json-comments/index.js +++ b/tools/node_modules/eslint/node_modules/strip-json-comments/index.js @@ -1,32 +1,35 @@ 'use strict'; -var singleComment = 1; -var multiComment = 2; +const singleComment = Symbol('singleComment'); +const multiComment = Symbol('multiComment'); +const stripWithoutWhitespace = () => ''; +const stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/\S/g, ' '); -function stripWithoutWhitespace() { - return ''; -} +const isEscaped = (jsonString, quotePosition) => { + let index = quotePosition - 1; + let backslashCount = 0; -function stripWithWhitespace(str, start, end) { - return str.slice(start, end).replace(/\S/g, ' '); -} + while (jsonString[index] === '\\') { + index -= 1; + backslashCount += 1; + } + + return Boolean(backslashCount % 2); +}; -module.exports = function (str, opts) { - opts = opts || {}; +module.exports = (jsonString, options = {}) => { + const strip = options.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; - var currentChar; - var nextChar; - var insideString = false; - var insideComment = false; - var offset = 0; - var ret = ''; - var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; + let insideString = false; + let insideComment = false; + let offset = 0; + let result = ''; - for (var i = 0; i < str.length; i++) { - currentChar = str[i]; - nextChar = str[i + 1]; + for (let i = 0; i < jsonString.length; i++) { + const currentCharacter = jsonString[i]; + const nextCharacter = jsonString[i + 1]; - if (!insideComment && currentChar === '"') { - var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\'; + if (!insideComment && currentCharacter === '"') { + const escaped = isEscaped(jsonString, i); if (!escaped) { insideString = !insideString; } @@ -36,35 +39,35 @@ module.exports = function (str, opts) { continue; } - if (!insideComment && currentChar + nextChar === '//') { - ret += str.slice(offset, i); + if (!insideComment && currentCharacter + nextCharacter === '//') { + result += jsonString.slice(offset, i); offset = i; insideComment = singleComment; i++; - } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') { + } else if (insideComment === singleComment && currentCharacter + nextCharacter === '\r\n') { i++; insideComment = false; - ret += strip(str, offset, i); + result += strip(jsonString, offset, i); offset = i; continue; - } else if (insideComment === singleComment && currentChar === '\n') { + } else if (insideComment === singleComment && currentCharacter === '\n') { insideComment = false; - ret += strip(str, offset, i); + result += strip(jsonString, offset, i); offset = i; - } else if (!insideComment && currentChar + nextChar === '/*') { - ret += str.slice(offset, i); + } else if (!insideComment && currentCharacter + nextCharacter === '/*') { + result += jsonString.slice(offset, i); offset = i; insideComment = multiComment; i++; continue; - } else if (insideComment === multiComment && currentChar + nextChar === '*/') { + } else if (insideComment === multiComment && currentCharacter + nextCharacter === '*/') { i++; insideComment = false; - ret += strip(str, offset, i + 1); + result += strip(jsonString, offset, i + 1); offset = i + 1; continue; } } - return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset)); + return result + (insideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset)); }; diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/license b/tools/node_modules/eslint/node_modules/strip-json-comments/license index 654d0bfe943437..e7af2f77107d73 100644 --- a/tools/node_modules/eslint/node_modules/strip-json-comments/license +++ b/tools/node_modules/eslint/node_modules/strip-json-comments/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -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: +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 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. +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. diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/package.json b/tools/node_modules/eslint/node_modules/strip-json-comments/package.json index dd3c353b821377..e10695c2825cfe 100644 --- a/tools/node_modules/eslint/node_modules/strip-json-comments/package.json +++ b/tools/node_modules/eslint/node_modules/strip-json-comments/package.json @@ -11,28 +11,30 @@ "deprecated": false, "description": "Strip comments from JSON. Lets you use comments in your JSON files!", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.4.1", + "matcha": "^0.7.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/strip-json-comments#readme", "keywords": [ "json", "strip", + "comments", "remove", "delete", "trim", - "comments", "multiline", "parse", "config", "configuration", - "conf", "settings", "util", "env", @@ -45,7 +47,8 @@ "url": "git+https://github.com/sindresorhus/strip-json-comments.git" }, "scripts": { - "test": "xo && ava" + "bench": "matcha benchmark.js", + "test": "xo && ava && tsd" }, - "version": "2.0.1" + "version": "3.0.1" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md b/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md index 0ee58dfe3a2e9b..9ebfc206c4fed5 100644 --- a/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md +++ b/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md @@ -6,27 +6,30 @@ This is now possible: ```js { - // rainbows + // Rainbows "unicorn": /* ❤ */ "cake" } ``` It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. -Also available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. +Also available as a [Gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[Grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[Broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. ## Install ``` -$ npm install --save strip-json-comments +$ npm install strip-json-comments ``` ## Usage ```js -const json = '{/*rainbows*/"unicorn":"cake"}'; +const json = `{ + // Rainbows + "unicorn": /* ❤ */ "cake" +}`; JSON.parse(stripJsonComments(json)); //=> {unicorn: 'cake'} @@ -35,9 +38,9 @@ JSON.parse(stripJsonComments(json)); ## API -### stripJsonComments(input, [options]) +### stripJsonComments(jsonString, [options]) -#### input +#### jsonString Type: `string` @@ -45,14 +48,23 @@ Accepts a string with JSON and returns a string without comments. #### options +Type: `object` + ##### whitespace -Type: `boolean` +Type: `boolean`
    Default: `true` Replace comments with whitespace instead of stripping them entirely. +## Benchmark + +``` +$ npm run bench +``` + + ## Related - [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module @@ -61,4 +73,4 @@ Replace comments with whitespace instead of stripping them entirely. ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignString.js b/tools/node_modules/eslint/node_modules/table/dist/alignString.js index a599ce8f9b5e1a..24dc423f9033fe 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/alignString.js +++ b/tools/node_modules/eslint/node_modules/table/dist/alignString.js @@ -80,7 +80,7 @@ const alignString = (subject, containerWidth, alignment) => { throw new TypeError('Alignment parameter value must be a string.'); } - if (alignments.indexOf(alignment) === -1) { + if (!alignments.includes(alignment)) { throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); } diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow b/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow index 16936a44c14dcf..f0383ff460a5bb 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow @@ -74,7 +74,7 @@ export default (subject, containerWidth, alignment) => { throw new TypeError('Alignment parameter value must be a string.'); } - if (alignments.indexOf(alignment) === -1) { + if (!alignments.includes(alignment)) { throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); } diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/index.js b/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/index.js deleted file mode 100644 index c25448009f304d..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports = options => { - options = Object.assign({ - onlyFirst: false - }, options); - - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); -}; diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/license b/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/package.json b/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/package.json deleted file mode 100644 index db8f3cc8c7d14e..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-regex/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Regular expression for matching ANSI escape codes", - "devDependencies": { - "ava": "^0.25.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-regex#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "license": "MIT", - "name": "ansi-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-regex.git" - }, - "scripts": { - "test": "xo && ava", - "view-supported": "node fixtures/view-codes.js" - }, - "version": "4.1.0" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/readme.md b/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/readme.md deleted file mode 100644 index d19c44667e704b..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,87 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    - ---- - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` - - -## API - -### ansiRegex([options]) - -Returns a regex for matching ANSI escape codes. - -#### options - -##### onlyFirst - -Type: `boolean`
    -Default: `false` *(Matches any ANSI escape codes in a string)* - -Match only the first ANSI escape. - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/index.js deleted file mode 100644 index 9788c96dfa3b0c..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - -module.exports = stripAnsi; -module.exports.default = stripAnsi; diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/license b/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/package.json b/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/package.json deleted file mode 100644 index 0c379e41c1aa24..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/strip-ansi/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "deprecated": false, - "description": "Strip ANSI escape codes from a string", - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/chalk/strip-ansi#readme", - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "strip-ansi", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/strip-ansi.git" - }, - "scripts": { - "test": "xo && ava && tsd-check" - }, - "version": "5.2.0" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/readme.md b/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/readme.md deleted file mode 100644 index 8681fe8af44242..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - ---- - -
    - - Get professional support for 'strip-ansi' with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    - ---- - -## Install - -``` -$ npm install strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/tools/node_modules/eslint/node_modules/table/package.json b/tools/node_modules/eslint/node_modules/table/package.json index 54ffba30c84313..6d2a7df80c04ac 100644 --- a/tools/node_modules/eslint/node_modules/table/package.json +++ b/tools/node_modules/eslint/node_modules/table/package.json @@ -9,37 +9,37 @@ }, "bundleDependencies": false, "dependencies": { - "ajv": "^6.9.1", - "lodash": "^4.17.11", + "ajv": "^6.10.2", + "lodash": "^4.17.14", "slice-ansi": "^2.1.0", "string-width": "^3.0.0" }, "deprecated": false, "description": "Formats data into a string table.", "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.2.2", - "@babel/node": "^7.2.2", - "@babel/plugin-transform-flow-strip-types": "^7.2.3", - "@babel/preset-env": "^7.3.1", - "@babel/register": "^7.0.0", + "@babel/cli": "^7.5.0", + "@babel/core": "^7.5.4", + "@babel/node": "^7.5.0", + "@babel/plugin-transform-flow-strip-types": "^7.4.4", + "@babel/preset-env": "^7.5.4", + "@babel/register": "^7.4.4", "ajv-cli": "^3.0.0", - "ajv-keywords": "^3.4.0", - "babel-plugin-istanbul": "^5.1.0", + "ajv-keywords": "^3.4.1", + "babel-plugin-istanbul": "^5.1.4", "babel-plugin-transform-export-default-name": "^2.0.4", "chai": "^4.2.0", "chalk": "^2.4.2", - "coveralls": "^3.0.2", + "coveralls": "^3.0.5", "eslint": "^5.13.0", "eslint-config-canonical": "^16.1.0", - "flow-bin": "^0.92.1", - "flow-copy-source": "^2.0.2", - "gitdown": "^2.5.7", - "husky": "^1.3.1", - "mocha": "^5.2.0", - "nyc": "^13.2.0", - "semantic-release": "^15.13.3", - "sinon": "^7.2.3" + "flow-bin": "^0.102.0", + "flow-copy-source": "^2.0.7", + "gitdown": "^3.1.1", + "husky": "^3.0.0", + "mocha": "^6.1.4", + "nyc": "^14.1.1", + "semantic-release": "^15.13.18", + "sinon": "^7.3.2" }, "engines": { "node": ">=6.0.0" @@ -85,5 +85,5 @@ "lint": "npm run build && eslint ./src ./test && flow", "test": "mocha --require @babel/register" }, - "version": "5.4.1" + "version": "5.4.4" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/tslib/README.md b/tools/node_modules/eslint/node_modules/tslib/README.md index 3fd109d7317bbc..84c47cab59d0aa 100644 --- a/tools/node_modules/eslint/node_modules/tslib/README.md +++ b/tools/node_modules/eslint/node_modules/tslib/README.md @@ -102,9 +102,9 @@ You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: For JSPM users: ```json -{ - "compilerOptions": { - "module": "system", +{ + "compilerOptions": { + "module": "system", "importHelpers": true, "baseUrl": "./", "paths": { @@ -112,9 +112,9 @@ For JSPM users: } } } -``` - - +``` + + # Contribute There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. diff --git a/tools/node_modules/eslint/node_modules/tslib/tslib.es6.js b/tools/node_modules/eslint/node_modules/tslib/tslib.es6.js index 9b31275ec36647..08d746f54c02bb 100644 --- a/tools/node_modules/eslint/node_modules/tslib/tslib.es6.js +++ b/tools/node_modules/eslint/node_modules/tslib/tslib.es6.js @@ -37,9 +37,9 @@ export var __assign = function() { } return __assign.apply(this, arguments); } - -export function __rest(s, e) { - var t = {}; + +export function __rest(s, e) { + var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") @@ -50,9 +50,9 @@ export function __rest(s, e) { return t; } -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } @@ -134,9 +134,9 @@ export function __read(o, n) { return ar; } -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); return ar; } @@ -151,9 +151,9 @@ export function __spreadArrays() { export function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } diff --git a/tools/node_modules/eslint/node_modules/tslib/tslib.js b/tools/node_modules/eslint/node_modules/tslib/tslib.js index 523106e3bbcee0..1eae417046f6eb 100644 --- a/tools/node_modules/eslint/node_modules/tslib/tslib.js +++ b/tools/node_modules/eslint/node_modules/tslib/tslib.js @@ -19,9 +19,9 @@ var __rest; var __decorate; var __param; var __metadata; -var __awaiter; -var __generator; -var __exportStar; +var __awaiter; +var __generator; +var __exportStar; var __values; var __read; var __spread; @@ -29,9 +29,9 @@ var __spreadArrays; var __await; var __asyncGenerator; var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; +var __asyncValues; +var __makeTemplateObject; +var __importStar; var __importDefault; (function (factory) { var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; @@ -74,9 +74,9 @@ var __importDefault; } return t; }; - - __rest = function (s, e) { - var t = {}; + + __rest = function (s, e) { + var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") @@ -87,9 +87,9 @@ var __importDefault; return t; }; - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; @@ -171,9 +171,9 @@ var __importDefault; return ar; }; - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); return ar; }; @@ -188,9 +188,9 @@ var __importDefault; __await = function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } @@ -238,9 +238,9 @@ var __importDefault; exporter("__decorate", __decorate); exporter("__param", __param); exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); exporter("__values", __values); exporter("__read", __read); exporter("__spread", __spread); @@ -248,8 +248,8 @@ var __importDefault; exporter("__await", __await); exporter("__asyncGenerator", __asyncGenerator); exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); exporter("__importDefault", __importDefault); }); diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE b/tools/node_modules/eslint/node_modules/v8-compile-cache/LICENSE similarity index 88% rename from tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE rename to tools/node_modules/eslint/node_modules/v8-compile-cache/LICENSE index 39245ac1c60613..b72b6701877c7f 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2016, Jon Schlinkert. +Copyright (c) 2019 Andres Suarez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ 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 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md b/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md new file mode 100644 index 00000000000000..ad0ede6188c23a --- /dev/null +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md @@ -0,0 +1,53 @@ +# v8-compile-cache + +[![Build Status](https://travis-ci.org/zertosh/v8-compile-cache.svg?branch=master)](https://travis-ci.org/zertosh/v8-compile-cache) + +`v8-compile-cache` attaches a `require` hook to use [V8's code cache](https://v8project.blogspot.com/2015/07/code-caching.html) to speed up instantiation time. The "code cache" is the work of parsing and compiling done by V8. + +The ability to tap into V8 to produce/consume this cache was introduced in [Node v5.7.0](https://nodejs.org/en/blog/release/v5.7.0/). + +## Usage + +1. Add the dependency: + + ```sh + $ npm install --save v8-compile-cache + ``` + +2. Then, in your entry module add: + + ```js + require('v8-compile-cache'); + ``` + +**Requiring `v8-compile-cache` in Node <5.7.0 is a noop – but you need at least Node 4.0.0 to support the ES2015 syntax used by `v8-compile-cache`.** + +## Options + +Set the environment variable `DISABLE_V8_COMPILE_CACHE=1` to disable the cache. + +## Internals + +The caches are stored in `$TMP/v8-compile-cache/V8_VERSION`, where there are `.BLOB` and `.MAP` files corresponding to the entry module that required `v8-compile-cache`. The cache is _entry module specific_ because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis. + +## Benchmarks + +See https://github.com/zertosh/v8-compile-cache/tree/master/bench. + +**Load Times:** + +| Module | Without Cache | With Cache | +| ---------------- | -------------:| ----------:| +| `babel-core` | `218ms` | `185ms` | +| `yarn` | `153ms` | `113ms` | +| `yarn` (bundled) | `228ms` | `105ms` | + +_^ Includes the overhead of loading the cache itself._ + +## Acknowledgements + +* `FileSystemBlobStore` and `NativeCompileCache` are based on Atom's implementation of their v8 compile cache: + - https://github.com/atom/atom/blob/b0d7a8a/src/file-system-blob-store.js + - https://github.com/atom/atom/blob/b0d7a8a/src/native-compile-cache.js +* `mkdirpSync` is based on: + - https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json b/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json new file mode 100644 index 00000000000000..30189995283fe8 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json @@ -0,0 +1,42 @@ +{ + "author": { + "name": "Andres Suarez", + "email": "zertosh@gmail.com" + }, + "bugs": { + "url": "https://github.com/zertosh/v8-compile-cache/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Require hook for automatic V8 compile cache persistence", + "devDependencies": { + "babel-core": "6.23.1", + "eslint": "^3.15.0", + "flow-parser": "0.38.0", + "rimraf": "^2.5.4", + "rxjs": "5.2.0", + "semver": "^5.3.0", + "tap": "^10.1.1", + "temp": "^0.8.3", + "yarn": "0.20.3" + }, + "files": [ + "v8-compile-cache.js" + ], + "homepage": "https://github.com/zertosh/v8-compile-cache#readme", + "license": "MIT", + "main": "v8-compile-cache.js", + "name": "v8-compile-cache", + "repository": { + "type": "git", + "url": "git+https://github.com/zertosh/v8-compile-cache.git" + }, + "scripts": { + "bench": "bench/run.sh", + "lint": "eslint --max-warnings=0 .", + "posttest": "npm run lint", + "test": "tap test/*-test.js" + }, + "version": "2.0.3" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js b/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js new file mode 100644 index 00000000000000..e7a226b8a91063 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js @@ -0,0 +1,365 @@ +'use strict'; + +const Module = require('module'); +const crypto = require('crypto'); +const fs = require('fs'); +const path = require('path'); +const vm = require('vm'); +const os = require('os'); + +const hasOwnProperty = Object.prototype.hasOwnProperty; + +//------------------------------------------------------------------------------ +// FileSystemBlobStore +//------------------------------------------------------------------------------ + +class FileSystemBlobStore { + constructor(directory, prefix) { + const name = prefix ? slashEscape(prefix + '.') : ''; + this._blobFilename = path.join(directory, name + 'BLOB'); + this._mapFilename = path.join(directory, name + 'MAP'); + this._lockFilename = path.join(directory, name + 'LOCK'); + this._directory = directory; + this._load(); + } + + has(key, invalidationKey) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + return this._invalidationKeys[key] === invalidationKey; + } else if (hasOwnProperty.call(this._storedMap, key)) { + return this._storedMap[key][0] === invalidationKey; + } + return false; + } + + get(key, invalidationKey) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + if (this._invalidationKeys[key] === invalidationKey) { + return this._memoryBlobs[key]; + } + } else if (hasOwnProperty.call(this._storedMap, key)) { + const mapping = this._storedMap[key]; + if (mapping[0] === invalidationKey) { + return this._storedBlob.slice(mapping[1], mapping[2]); + } + } + } + + set(key, invalidationKey, buffer) { + this._invalidationKeys[key] = invalidationKey; + this._memoryBlobs[key] = buffer; + this._dirty = true; + } + + delete(key) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + this._dirty = true; + delete this._memoryBlobs[key]; + } + if (hasOwnProperty.call(this._invalidationKeys, key)) { + this._dirty = true; + delete this._invalidationKeys[key]; + } + if (hasOwnProperty.call(this._storedMap, key)) { + this._dirty = true; + delete this._storedMap[key]; + } + } + + isDirty() { + return this._dirty; + } + + save() { + const dump = this._getDump(); + const blobToStore = Buffer.concat(dump[0]); + const mapToStore = JSON.stringify(dump[1]); + + try { + mkdirpSync(this._directory); + fs.writeFileSync(this._lockFilename, 'LOCK', {flag: 'wx'}); + } catch (error) { + // Swallow the exception if we fail to acquire the lock. + return false; + } + + try { + fs.writeFileSync(this._blobFilename, blobToStore); + fs.writeFileSync(this._mapFilename, mapToStore); + } catch (error) { + throw error; + } finally { + fs.unlinkSync(this._lockFilename); + } + + return true; + } + + _load() { + try { + this._storedBlob = fs.readFileSync(this._blobFilename); + this._storedMap = JSON.parse(fs.readFileSync(this._mapFilename)); + } catch (e) { + this._storedBlob = Buffer.alloc(0); + this._storedMap = {}; + } + this._dirty = false; + this._memoryBlobs = {}; + this._invalidationKeys = {}; + } + + _getDump() { + const buffers = []; + const newMap = {}; + let offset = 0; + + function push(key, invalidationKey, buffer) { + buffers.push(buffer); + newMap[key] = [invalidationKey, offset, offset + buffer.length]; + offset += buffer.length; + } + + for (const key of Object.keys(this._memoryBlobs)) { + const buffer = this._memoryBlobs[key]; + const invalidationKey = this._invalidationKeys[key]; + push(key, invalidationKey, buffer); + } + + for (const key of Object.keys(this._storedMap)) { + if (hasOwnProperty.call(newMap, key)) continue; + const mapping = this._storedMap[key]; + const buffer = this._storedBlob.slice(mapping[1], mapping[2]); + push(key, mapping[0], buffer); + } + + return [buffers, newMap]; + } +} + +//------------------------------------------------------------------------------ +// NativeCompileCache +//------------------------------------------------------------------------------ + +class NativeCompileCache { + constructor() { + this._cacheStore = null; + this._previousModuleCompile = null; + } + + setCacheStore(cacheStore) { + this._cacheStore = cacheStore; + } + + install() { + const self = this; + const hasRequireResolvePaths = typeof require.resolve.paths === 'function'; + this._previousModuleCompile = Module.prototype._compile; + Module.prototype._compile = function(content, filename) { + const mod = this; + + function require(id) { + return mod.require(id); + } + + // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L28 + function resolve(request, options) { + return Module._resolveFilename(request, mod, false, options); + } + require.resolve = resolve; + + // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L37 + // resolve.resolve.paths was added in v8.9.0 + if (hasRequireResolvePaths) { + resolve.paths = function paths(request) { + return Module._resolveLookupPaths(request, mod, true); + }; + } + + require.main = process.mainModule; + + // Enable support to add extra extension types + require.extensions = Module._extensions; + require.cache = Module._cache; + + const dirname = path.dirname(filename); + + const compiledWrapper = self._moduleCompile(filename, content); + + // We skip the debugger setup because by the time we run, node has already + // done that itself. + + const args = [mod.exports, require, mod, filename, dirname, process, global]; + return compiledWrapper.apply(mod.exports, args); + }; + } + + uninstall() { + Module.prototype._compile = this._previousModuleCompile; + } + + _moduleCompile(filename, content) { + // https://github.com/nodejs/node/blob/v7.5.0/lib/module.js#L511 + + // Remove shebang + var contLen = content.length; + if (contLen >= 2) { + if (content.charCodeAt(0) === 35/*#*/ && + content.charCodeAt(1) === 33/*!*/) { + if (contLen === 2) { + // Exact match + content = ''; + } else { + // Find end of shebang line and slice it off + var i = 2; + for (; i < contLen; ++i) { + var code = content.charCodeAt(i); + if (code === 10/*\n*/ || code === 13/*\r*/) break; + } + if (i === contLen) { + content = ''; + } else { + // Note that this actually includes the newline character(s) in the + // new output. This duplicates the behavior of the regular + // expression that was previously used to replace the shebang line + content = content.slice(i); + } + } + } + } + + // create wrapper function + var wrapper = Module.wrap(content); + + var invalidationKey = crypto + .createHash('sha1') + .update(content, 'utf8') + .digest('hex'); + + var buffer = this._cacheStore.get(filename, invalidationKey); + + var script = new vm.Script(wrapper, { + filename: filename, + lineOffset: 0, + displayErrors: true, + cachedData: buffer, + produceCachedData: true, + }); + + if (script.cachedDataProduced) { + this._cacheStore.set(filename, invalidationKey, script.cachedData); + } else if (script.cachedDataRejected) { + this._cacheStore.delete(filename); + } + + var compiledWrapper = script.runInThisContext({ + filename: filename, + lineOffset: 0, + columnOffset: 0, + displayErrors: true, + }); + + return compiledWrapper; + } +} + +//------------------------------------------------------------------------------ +// utilities +// +// https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 +// https://github.com/zertosh/slash-escape/blob/e7ebb99/slash-escape.js +//------------------------------------------------------------------------------ + +function mkdirpSync(p_) { + _mkdirpSync(path.resolve(p_), parseInt('0777', 8) & ~process.umask()); +} + +function _mkdirpSync(p, mode) { + try { + fs.mkdirSync(p, mode); + } catch (err0) { + if (err0.code === 'ENOENT') { + _mkdirpSync(path.dirname(p)); + _mkdirpSync(p); + } else { + try { + const stat = fs.statSync(p); + if (!stat.isDirectory()) { throw err0; } + } catch (err1) { + throw err0; + } + } + } +} + +function slashEscape(str) { + const ESCAPE_LOOKUP = { + '\\': 'zB', + ':': 'zC', + '/': 'zS', + '\x00': 'z0', + 'z': 'zZ', + }; + return str.replace(/[\\:\/\x00z]/g, match => (ESCAPE_LOOKUP[match])); +} + +function supportsCachedData() { + const script = new vm.Script('""', {produceCachedData: true}); + // chakracore, as of v1.7.1.0, returns `false`. + return script.cachedDataProduced === true; +} + +function getCacheDir() { + // Avoid cache ownership issues on POSIX systems. + const dirname = typeof process.getuid === 'function' + ? 'v8-compile-cache-' + process.getuid() + : 'v8-compile-cache'; + const version = typeof process.versions.v8 === 'string' + ? process.versions.v8 + : typeof process.versions.chakracore === 'string' + ? 'chakracore-' + process.versions.chakracore + : 'node-' + process.version; + const cacheDir = path.join(os.tmpdir(), dirname, version); + return cacheDir; +} + +function getParentName() { + // `module.parent.filename` is undefined or null when: + // * node -e 'require("v8-compile-cache")' + // * node -r 'v8-compile-cache' + // * Or, requiring from the REPL. + const parentName = module.parent && typeof module.parent.filename === 'string' + ? module.parent.filename + : process.cwd(); + return parentName; +} + +//------------------------------------------------------------------------------ +// main +//------------------------------------------------------------------------------ + +if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) { + const cacheDir = getCacheDir(); + const prefix = getParentName(); + const blobStore = new FileSystemBlobStore(cacheDir, prefix); + + const nativeCompileCache = new NativeCompileCache(); + nativeCompileCache.setCacheStore(blobStore); + nativeCompileCache.install(); + + process.once('exit', code => { + if (blobStore.isDirty()) { + blobStore.save(); + } + nativeCompileCache.uninstall(); + }); +} + +module.exports.__TEST__ = { + FileSystemBlobStore, + NativeCompileCache, + mkdirpSync, + slashEscape, + supportsCachedData, + getCacheDir, + getParentName, +}; diff --git a/tools/node_modules/eslint/node_modules/xtend/LICENCE b/tools/node_modules/eslint/node_modules/xtend/LICENSE similarity index 97% rename from tools/node_modules/eslint/node_modules/xtend/LICENCE rename to tools/node_modules/eslint/node_modules/xtend/LICENSE index 1a14b437e87a8f..0099f4f6c77f40 100644 --- a/tools/node_modules/eslint/node_modules/xtend/LICENCE +++ b/tools/node_modules/eslint/node_modules/xtend/LICENSE @@ -1,3 +1,4 @@ +The MIT License (MIT) Copyright (c) 2012-2014 Raynos. Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/tools/node_modules/eslint/node_modules/xtend/Makefile b/tools/node_modules/eslint/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf49dc1a3..00000000000000 --- a/tools/node_modules/eslint/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/xtend/README.md b/tools/node_modules/eslint/node_modules/xtend/README.md index 093cb2978e4af0..ecae00d585cbd1 100644 --- a/tools/node_modules/eslint/node_modules/xtend/README.md +++ b/tools/node_modules/eslint/node_modules/xtend/README.md @@ -16,7 +16,7 @@ var extend = require("xtend") // extend returns a new object. Does not mutate arguments var combination = extend({ a: "a", - b: 'c' + b: "c" }, { b: "b" }) @@ -25,7 +25,7 @@ var combination = extend({ ## Stability status: Locked -## MIT Licenced +## MIT Licensed [3]: http://ci.testling.com/Raynos/xtend.png diff --git a/tools/node_modules/eslint/node_modules/xtend/package.json b/tools/node_modules/eslint/node_modules/xtend/package.json index 3303e0d2f725bf..970fcf29de706d 100644 --- a/tools/node_modules/eslint/node_modules/xtend/package.json +++ b/tools/node_modules/eslint/node_modules/xtend/package.json @@ -59,5 +59,5 @@ "iphone/6.0..latest" ] }, - "version": "4.0.1" + "version": "4.0.2" } \ No newline at end of file diff --git a/tools/node_modules/eslint/package.json b/tools/node_modules/eslint/package.json index 530373a2204808..88a2141a91afa4 100644 --- a/tools/node_modules/eslint/package.json +++ b/tools/node_modules/eslint/package.json @@ -18,7 +18,7 @@ "debug": "^4.0.1", "doctrine": "^3.0.0", "eslint-plugin-markdown": "^1.0.0", - "eslint-scope": "^4.0.3", + "eslint-scope": "^5.0.0", "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", "espree": "^6.0.0", @@ -26,28 +26,29 @@ "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^3.1.0", + "glob-parent": "^5.0.0", "globals": "^11.7.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", + "inquirer": "^6.4.1", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.11", + "lodash": "^4.17.14", "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "progress": "^2.0.0", "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", "table": "^5.2.3", - "text-table": "^0.2.0" + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" }, "deprecated": false, "description": "An AST-based pattern checker for JavaScript.", @@ -80,22 +81,22 @@ "leche": "^2.2.3", "lint-staged": "^8.1.5", "load-perf": "^0.2.0", - "markdownlint": "^0.13.0", - "markdownlint-cli": "^0.15.0", - "metro-memory-fs": "^0.53.1", + "markdownlint": "^0.15.0", + "markdownlint-cli": "^0.17.0", + "metro-memory-fs": "^0.54.1", "mocha": "^6.1.2", "mocha-junit-reporter": "^1.23.0", "npm-license": "^0.3.3", - "nyc": "^13.3.0", + "nyc": "^14.1.1", "proxyquire": "^2.0.1", - "puppeteer": "^1.14.0", - "recast": "^0.17.6", + "puppeteer": "^1.18.0", + "recast": "^0.18.1", "regenerator-runtime": "^0.13.2", "shelljs": "^0.8.2", "sinon": "^7.3.2", "temp": "^0.9.0", - "webpack": "^4.29.6", - "webpack-cli": "^3.3.0", + "webpack": "^4.35.0", + "webpack-cli": "^3.3.5", "yorkie": "^2.0.0" }, "engines": { @@ -148,5 +149,5 @@ "test": "node Makefile.js test", "webpack": "node Makefile.js webpack" }, - "version": "6.0.1" + "version": "6.1.0" } \ No newline at end of file From 0ee12980561cd7b5c51708a3ba85c6991710dd0d Mon Sep 17 00:00:00 2001 From: Brian White Date: Sat, 20 Jul 2019 22:49:24 -0400 Subject: [PATCH 161/162] dns: fix unsigned record values Fixes: https://github.com/nodejs/node/issues/28790 PR-URL: https://github.com/nodejs/node/pull/28792 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis --- src/cares_wrap.cc | 19 ++++--- test/parallel/test-dns.js | 112 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+), 8 deletions(-) diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 0be02596f96945..85d0fdbde64f20 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -756,7 +756,7 @@ Local AddrTTLToArray(Environment* env, Local ttls = Array::New(isolate, naddrttls); for (size_t i = 0; i < naddrttls; i++) { - auto value = Integer::New(isolate, addrttls[i].ttl); + auto value = Integer::NewFromUnsigned(isolate, addrttls[i].ttl); ttls->Set(context, i, value).Check(); } @@ -1139,7 +1139,7 @@ int ParseSoaReply(Environment* env, hostmaster.get())).Check(); soa_record->Set(context, env->serial_string(), - Integer::New(env->isolate(), serial)).Check(); + Integer::NewFromUnsigned(env->isolate(), serial)).Check(); soa_record->Set(context, env->refresh_string(), Integer::New(env->isolate(), refresh)).Check(); @@ -1151,7 +1151,7 @@ int ParseSoaReply(Environment* env, Integer::New(env->isolate(), expire)).Check(); soa_record->Set(context, env->minttl_string(), - Integer::New(env->isolate(), minttl)).Check(); + Integer::NewFromUnsigned(env->isolate(), minttl)).Check(); soa_record->Set(context, env->type_string(), env->dns_soa_string()).Check(); @@ -1219,7 +1219,8 @@ class QueryAnyWrap: public QueryWrap { ret->Get(context, i).ToLocalChecked()).Check(); obj->Set(context, env()->ttl_string(), - Integer::New(env()->isolate(), addrttls[i].ttl)).Check(); + Integer::NewFromUnsigned( + env()->isolate(), addrttls[i].ttl)).Check(); obj->Set(context, env()->type_string(), env()->dns_a_string()).Check(); @@ -1265,8 +1266,8 @@ class QueryAnyWrap: public QueryWrap { ret->Get(context, i).ToLocalChecked()).Check(); obj->Set(context, env()->ttl_string(), - Integer::New(env()->isolate(), addr6ttls[i - a_count].ttl)) - .Check(); + Integer::NewFromUnsigned( + env()->isolate(), addr6ttls[i - a_count].ttl)).Check(); obj->Set(context, env()->type_string(), env()->dns_aaaa_string()).Check(); @@ -1709,7 +1710,8 @@ class QuerySoaWrap: public QueryWrap { soa_out->hostmaster)).Check(); soa_record->Set(context, env()->serial_string(), - Integer::New(env()->isolate(), soa_out->serial)).Check(); + Integer::NewFromUnsigned( + env()->isolate(), soa_out->serial)).Check(); soa_record->Set(context, env()->refresh_string(), Integer::New(env()->isolate(), @@ -1722,7 +1724,8 @@ class QuerySoaWrap: public QueryWrap { Integer::New(env()->isolate(), soa_out->expire)).Check(); soa_record->Set(context, env()->minttl_string(), - Integer::New(env()->isolate(), soa_out->minttl)).Check(); + Integer::NewFromUnsigned( + env()->isolate(), soa_out->minttl)).Check(); ares_free_data(soa_out); diff --git a/test/parallel/test-dns.js b/test/parallel/test-dns.js index 40e0e605cda36a..3f3eb0921749ae 100644 --- a/test/parallel/test-dns.js +++ b/test/parallel/test-dns.js @@ -21,10 +21,12 @@ 'use strict'; const common = require('../common'); +const dnstools = require('../common/dns'); const assert = require('assert'); const dns = require('dns'); const dnsPromises = dns.promises; +const dgram = require('dgram'); const existing = dns.getServers(); assert(existing.length > 0); @@ -326,3 +328,113 @@ common.expectsError(() => { assert.deepStrictEqual(err.message, 'queryMx ENOTFOUND foo.onion'); }); } + +{ + const cases = [ + { method: 'resolveAny', + answers: [ + { type: 'A', address: '1.2.3.4', ttl: 3333333333 }, + { type: 'AAAA', address: '::42', ttl: 3333333333 }, + { type: 'MX', priority: 42, exchange: 'foobar.com', ttl: 3333333333 }, + { type: 'NS', value: 'foobar.org', ttl: 3333333333 }, + { type: 'PTR', value: 'baz.org', ttl: 3333333333 }, + { + type: 'SOA', + nsname: 'ns1.example.com', + hostmaster: 'admin.example.com', + serial: 3210987654, + refresh: 900, + retry: 900, + expire: 1800, + minttl: 3333333333 + }, + ] + }, + + { method: 'resolve4', + options: { ttl: true }, + answers: [ { type: 'A', address: '1.2.3.4', ttl: 3333333333 } ] + }, + + { method: 'resolve6', + options: { ttl: true }, + answers: [ { type: 'AAAA', address: '::42', ttl: 3333333333 } ] + }, + + { method: 'resolveSoa', + answers: [ + { + type: 'SOA', + nsname: 'ns1.example.com', + hostmaster: 'admin.example.com', + serial: 3210987654, + refresh: 900, + retry: 900, + expire: 1800, + minttl: 3333333333 + } + ] + }, + ]; + + const server = dgram.createSocket('udp4'); + + server.on('message', common.mustCall((msg, { address, port }) => { + const parsed = dnstools.parseDNSPacket(msg); + const domain = parsed.questions[0].domain; + assert.strictEqual(domain, 'example.org'); + + server.send(dnstools.writeDNSPacket({ + id: parsed.id, + questions: parsed.questions, + answers: cases[0].answers.map( + (answer) => Object.assign({ domain }, answer) + ), + }), port, address); + }, cases.length * 2)); + + server.bind(0, common.mustCall(() => { + const address = server.address(); + dns.setServers([`127.0.0.1:${address.port}`]); + + function validateResults(res) { + if (!Array.isArray(res)) + res = [res]; + + assert.deepStrictEqual(res.map(tweakEntry), + cases[0].answers.map(tweakEntry)); + } + + function tweakEntry(r) { + const ret = { ...r }; + + const { method } = cases[0]; + + // TTL values are only provided for A and AAAA entries. + if (!['A', 'AAAA'].includes(ret.type) && !/^resolve(4|6)?$/.test(method)) + delete ret.ttl; + + if (method !== 'resolveAny') + delete ret.type; + + return ret; + } + + (async function nextCase() { + if (cases.length === 0) + return server.close(); + + const { method, options } = cases[0]; + + validateResults(await dnsPromises[method]('example.org', options)); + + dns[method]('example.org', options, common.mustCall((err, res) => { + assert.ifError(err); + validateResults(res); + cases.shift(); + nextCase(); + })); + })(); + + })); +} From 0481a7f3b883862cadf963314d23490adc6656a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 23 Jul 2019 10:29:14 +0200 Subject: [PATCH 162/162] 2019-07-23, Version 12.7.0 (Current) Notable changes: * deps: * Updated nghttp2 to 1.39.1. https://github.com/nodejs/node/pull/28448 * Updated npm to 6.10.0. https://github.com/nodejs/node/pull/28525 * esm: * Implemented experimental "pkg-exports" proposal. A new `"exports"` field can be added to a module's `package.json` file to provide custom subpath aliasing. See https://github.com/jkrems/proposal-pkg-exports/ for more information. https://github.com/nodejs/node/pull/28568 * http: * Added `response.writableFinished`. https://github.com/nodejs/node/pull/28681 * Exposed `headers`, `rawHeaders` and other fields on an `http.ClientRequest` `"information"` event. https://github.com/nodejs/node/pull/28459 * inspector: * Added `inspector.waitForDebugger()`. https://github.com/nodejs/node/pull/28453 * policy: * Added `--policy-integrity=sri` CLI option to mitigate policy tampering. If a policy integrity is specified and the policy does not have that integrity, Node.js will error prior to running any code. https://github.com/nodejs/node/pull/28734 * readline,tty: * Exposed stream API from various methods which write characters. https://github.com/nodejs/node/pull/28674 https://github.com/nodejs/node/pull/28721 * src: * Use cgroups to get memory limits. This improves the way we set the memory ceiling for a Node.js process. Previously we would use the physical memory size to estimate the necessary V8 heap sizes. The physical memory size is not necessarily the correct limit, e.g. if the process is running inside a docker container or is otherwise constrained. This change adds the ability to get a memory limit set by linux cgroups, which is used by docker containers to set resource constraints. https://docs.docker.com/config/containers/resource_constraints/ https://github.com/nodejs/node/pull/27508 PR-URL: https://github.com/nodejs/node/pull/28817 --- CHANGELOG.md | 3 +- doc/api/cli.md | 4 +- doc/api/http.md | 2 +- doc/api/inspector.md | 2 +- doc/api/readline.md | 8 +- doc/api/stream.md | 2 +- doc/api/tty.md | 8 +- doc/changelogs/CHANGELOG_V12.md | 199 ++++++++++++++++++++++++++++++++ src/node_version.h | 6 +- 9 files changed, 217 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index deb0b763f93ac8..17c36b8ef04eec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,8 @@ release. -12.6.0
    +12.7.0
    +12.6.0
    12.5.0
    12.4.0
    12.3.1
    diff --git a/doc/api/cli.md b/doc/api/cli.md index 5e60b509e310a0..1e765df93f8f3c 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -150,7 +150,7 @@ Please see [customizing esm specifier resolution][] for example usage. ### `--experimental-exports` Enable experimental resolution using the `exports` field in `package.json`. @@ -459,7 +459,7 @@ developers may leverage to detect deprecated API usage. ### `--policy-integrity=sri` > Stability: 1 - Experimental diff --git a/doc/api/http.md b/doc/api/http.md index 8df5ea2d6186d7..bcb6dda3053647 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1466,7 +1466,7 @@ buffer. Returns `false` if all or part of the data was queued in user memory. ### response.writableFinished * {boolean} diff --git a/doc/api/inspector.md b/doc/api/inspector.md index e2980a278d1ef1..f25d6209c12189 100644 --- a/doc/api/inspector.md +++ b/doc/api/inspector.md @@ -54,7 +54,7 @@ Return the URL of the active inspector, or `undefined` if there is none. ## inspector.waitForDebugger() Blocks until a client (existing or connected later) has sent diff --git a/doc/api/readline.md b/doc/api/readline.md index 4ff572f2e5f396..47dfad8dabb173 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -350,7 +350,7 @@ async function processLineByLine() { @@ -372,7 +372,7 @@ in a specified direction identified by `dir`. @@ -491,7 +491,7 @@ function completer(linePartial, callback) { @@ -537,7 +537,7 @@ if (process.stdin.isTTY) diff --git a/doc/api/stream.md b/doc/api/stream.md index 2cdd6ffde31b29..63c34aa666eb94 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1087,7 +1087,7 @@ Is `true` if it is safe to call [`readable.read()`][stream-read]. ##### readable.readableEncoding * {null|string} diff --git a/doc/api/tty.md b/doc/api/tty.md index e19e8160a0fed3..977576970c0ea8 100644 --- a/doc/api/tty.md +++ b/doc/api/tty.md @@ -103,7 +103,7 @@ process.stdout.on('resize', () => { @@ -124,7 +124,7 @@ direction identified by `dir`. @@ -149,7 +149,7 @@ is updated whenever the `'resize'` event is emitted. @@ -249,7 +249,7 @@ A `boolean` that is always `true`. diff --git a/doc/changelogs/CHANGELOG_V12.md b/doc/changelogs/CHANGELOG_V12.md index f0f53757bb8833..099b0cf90e82a8 100644 --- a/doc/changelogs/CHANGELOG_V12.md +++ b/doc/changelogs/CHANGELOG_V12.md @@ -9,6 +9,7 @@ +12.7.0
    12.6.0
    12.5.0
    12.4.0
    @@ -35,6 +36,204 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + +## 2019-07-23, Version 12.7.0 (Current), @targos + +### Notable changes + +* **deps**: + * Updated nghttp2 to 1.39.1 (gengjiawen) [#28448](https://github.com/nodejs/node/pull/28448). + * Updated npm to 6.10.0 (isaacs) [#28525](https://github.com/nodejs/node/pull/28525). +* **esm**: + * Implemented experimental "pkg-exports" proposal. A new `"exports"` field can + be added to a module's `package.json` file to provide custom subpath + aliasing. See [proposal-pkg-exports](https://github.com/jkrems/proposal-pkg-exports/) + for more information (Guy Bedford) [#28568](https://github.com/nodejs/node/pull/28568). +* **http**: + * Added `response.writableFinished` (Robert Nagy) [#28681](https://github.com/nodejs/node/pull/28681). + * Exposed `headers`, `rawHeaders` and other fields on an `http.ClientRequest` + `"information"` event (Austin Wright) [#28459](https://github.com/nodejs/node/pull/28459). +* **inspector**: + * Added `inspector.waitForDebugger()` (Aleksei Koziatinskii) [#28453](https://github.com/nodejs/node/pull/28453). +* **policy**: + * Added `--policy-integrity=sri` CLI option to mitigate policy tampering. If a + policy integrity is specified and the policy does not have that integrity, + Node.js will error prior to running any code (Bradley Farias) [#28734](https://github.com/nodejs/node/pull/28734). +* **readline,tty**: + * Exposed stream API from various methods which write characters (cjihrig) [#28674](https://github.com/nodejs/node/pull/28674), + [#28721](https://github.com/nodejs/node/pull/28721). +* **src**: + * Use cgroups to get memory limits. This improves the way we set the memory ceiling for a Node.js process. Previously + we would use the physical memory size to estimate the necessary V8 heap sizes. The physical memory size + is not necessarily the correct limit, e.g. if the process is running inside a docker container or is otherwise + constrained. This change adds the ability to get a memory limit set by linux cgroups, which is used by + [docker containers to set resource constraints](https://docs.docker.com/config/containers/resource_constraints/) + (Kelvin Jin) [#27508](https://github.com/nodejs/node/pull/27508). + +### Commits + +* [[`632d7d5839`](https://github.com/nodejs/node/commit/632d7d5839)] - **build**: skip test-ci doc targets if no crypto (Rod Vagg) [#28747](https://github.com/nodejs/node/pull/28747) +* [[`5d09c15c5b`](https://github.com/nodejs/node/commit/5d09c15c5b)] - **build**: update of the large page option error (David Carlier) [#28729](https://github.com/nodejs/node/pull/28729) +* [[`be32becb67`](https://github.com/nodejs/node/commit/be32becb67)] - **build**: fix building with d8 (Michaël Zasso) [#28733](https://github.com/nodejs/node/pull/28733) +* [[`72f92293c8`](https://github.com/nodejs/node/commit/72f92293c8)] - **build**: specify Python version once for all tests (cclauss) [#28694](https://github.com/nodejs/node/pull/28694) +* [[`b4aa7d3570`](https://github.com/nodejs/node/commit/b4aa7d3570)] - **build**: remove broken intel vtune support (Ben Noordhuis) [#28522](https://github.com/nodejs/node/pull/28522) +* [[`171c8f44b6`](https://github.com/nodejs/node/commit/171c8f44b6)] - **build**: do not always build the default V8 snapshot (Michaël Zasso) [#28467](https://github.com/nodejs/node/pull/28467) +* [[`608d6ed090`](https://github.com/nodejs/node/commit/608d6ed090)] - **build**: update Windows icon to Feb 2016 rebrand (Mike MacCana) [#28524](https://github.com/nodejs/node/pull/28524) +* [[`7d3ddfe6b8`](https://github.com/nodejs/node/commit/7d3ddfe6b8)] - **build**: remove --code-cache-path help option (Daniel Bevenius) [#28446](https://github.com/nodejs/node/pull/28446) +* [[`e4fae24b62`](https://github.com/nodejs/node/commit/e4fae24b62)] - **build**: change ASM compiler url to https (gengjiawen) [#28189](https://github.com/nodejs/node/pull/28189) +* [[`209b353ff4`](https://github.com/nodejs/node/commit/209b353ff4)] - **build,v8**: support IBM i (Xu Meng) [#28607](https://github.com/nodejs/node/pull/28607) +* [[`674d33cb8c`](https://github.com/nodejs/node/commit/674d33cb8c)] - **deps**: V8: backport b33af60 (Gus Caplan) [#28671](https://github.com/nodejs/node/pull/28671) +* [[`9f47242e19`](https://github.com/nodejs/node/commit/9f47242e19)] - **deps**: update nghttp2 to 1.39.1 (gengjiawen) [#28448](https://github.com/nodejs/node/pull/28448) +* [[`1ce2b5e828`](https://github.com/nodejs/node/commit/1ce2b5e828)] - **deps**: upgrade npm to 6.10.0 (isaacs) [#28525](https://github.com/nodejs/node/pull/28525) +* [[`312f94916c`](https://github.com/nodejs/node/commit/312f94916c)] - **deps**: V8: backport d2ccc59 (Joyee Cheung) [#28648](https://github.com/nodejs/node/pull/28648) +* [[`df0f42ab7f`](https://github.com/nodejs/node/commit/df0f42ab7f)] - **deps**: cherry-pick 91744bf from node-gyp upstream (Jon Kunkee) [#28604](https://github.com/nodejs/node/pull/28604) +* [[`7fa982ee89`](https://github.com/nodejs/node/commit/7fa982ee89)] - **deps**: cherry-pick 721dc7d from node-gyp upstream (Jon Kunkee) [#28604](https://github.com/nodejs/node/pull/28604) +* [[`9e9bfb65c7`](https://github.com/nodejs/node/commit/9e9bfb65c7)] - **deps**: cherry-pick 13a04aba from V8 upstream (Jon Kunkee) [#28602](https://github.com/nodejs/node/pull/28602) +* [[`c7cb70ce5e`](https://github.com/nodejs/node/commit/c7cb70ce5e)] - **deps**: update acorn to 6.2.0 (Michaël Zasso) [#28649](https://github.com/nodejs/node/pull/28649) +* [[`0ee1298056`](https://github.com/nodejs/node/commit/0ee1298056)] - **dns**: fix unsigned record values (Brian White) [#28792](https://github.com/nodejs/node/pull/28792) +* [[`8586294670`](https://github.com/nodejs/node/commit/8586294670)] - **doc**: claim NODE\_MODULE\_VERSION=75 for Electron 7 (Samuel Attard) [#28774](https://github.com/nodejs/node/pull/28774) +* [[`2a82d54d9d`](https://github.com/nodejs/node/commit/2a82d54d9d)] - **doc**: update env default on child\_process functions (h3knix) [#28776](https://github.com/nodejs/node/pull/28776) +* [[`cf811ecd47`](https://github.com/nodejs/node/commit/cf811ecd47)] - **doc**: add code example to subprocess.stdout (Juan José Arboleda) [#28402](https://github.com/nodejs/node/pull/28402) +* [[`06991cd902`](https://github.com/nodejs/node/commit/06991cd902)] - **doc**: add information for heap snapshot flag (Tanner Stirrat) [#28754](https://github.com/nodejs/node/pull/28754) +* [[`8fe9ca416d`](https://github.com/nodejs/node/commit/8fe9ca416d)] - **doc**: amplify warning for execute callback (Michael Dawson) [#28738](https://github.com/nodejs/node/pull/28738) +* [[`ca83b2736e`](https://github.com/nodejs/node/commit/ca83b2736e)] - **doc**: add example for beforeExit event (Vickodev) [#28430](https://github.com/nodejs/node/pull/28430) +* [[`44acec5386`](https://github.com/nodejs/node/commit/44acec5386)] - **doc**: add example for zlib.createGzip() (Alex Ramirez) [#28136](https://github.com/nodejs/node/pull/28136) +* [[`4a78fe5ab0`](https://github.com/nodejs/node/commit/4a78fe5ab0)] - **doc**: improve os.homedir() docs (Juan José Arboleda) [#28401](https://github.com/nodejs/node/pull/28401) +* [[`3f78a51b5e`](https://github.com/nodejs/node/commit/3f78a51b5e)] - **doc**: add examples at assert.strictEqual (himself65) [#28092](https://github.com/nodejs/node/pull/28092) +* [[`3a4a236b51`](https://github.com/nodejs/node/commit/3a4a236b51)] - **doc**: fix minor typo (Shajan Jacob) [#28148](https://github.com/nodejs/node/pull/28148) +* [[`4321cb2cf3`](https://github.com/nodejs/node/commit/4321cb2cf3)] - **doc**: update js-native-api example (Gabriel Schulhof) [#28657](https://github.com/nodejs/node/pull/28657) +* [[`8ddf86b3d4`](https://github.com/nodejs/node/commit/8ddf86b3d4)] - **doc**: add missing version metadata for Readable.from (Anna Henningsen) [#28695](https://github.com/nodejs/node/pull/28695) +* [[`638c8a394c`](https://github.com/nodejs/node/commit/638c8a394c)] - **doc**: small grammar correction (cjihrig) [#28669](https://github.com/nodejs/node/pull/28669) +* [[`5614e08f34`](https://github.com/nodejs/node/commit/5614e08f34)] - **doc**: add documentation for createDiffieHellmanGroup (Ojasvi Monga) [#28585](https://github.com/nodejs/node/pull/28585) +* [[`aee86940f9`](https://github.com/nodejs/node/commit/aee86940f9)] - **doc**: mark N-API thread-safe function stable (Gabriel Schulhof) [#28643](https://github.com/nodejs/node/pull/28643) +* [[`7a4062ab88`](https://github.com/nodejs/node/commit/7a4062ab88)] - **doc**: mark process.report as experimental (cjihrig) [#28653](https://github.com/nodejs/node/pull/28653) +* [[`3f65b91eb9`](https://github.com/nodejs/node/commit/3f65b91eb9)] - **doc**: remove superfluous MDN link in assert.md (Rich Trott) [#28246](https://github.com/nodejs/node/pull/28246) +* [[`f688122dff`](https://github.com/nodejs/node/commit/f688122dff)] - **doc**: drop 'for more details' in deprecations (cjihrig) [#28617](https://github.com/nodejs/node/pull/28617) +* [[`d7c7023503`](https://github.com/nodejs/node/commit/d7c7023503)] - **doc**: add example on how to create \_\_filename, \_\_dirname for esm (Walle Cyril) [#28282](https://github.com/nodejs/node/pull/28282) +* [[`ebc3876754`](https://github.com/nodejs/node/commit/ebc3876754)] - **doc**: add missing types (Luigi Pinca) [#28623](https://github.com/nodejs/node/pull/28623) +* [[`f7a13e5034`](https://github.com/nodejs/node/commit/f7a13e5034)] - **doc**: relax requirements for setAAD in CCM mode (Tobias Nießen) [#28624](https://github.com/nodejs/node/pull/28624) +* [[`bf2d5a75f8`](https://github.com/nodejs/node/commit/bf2d5a75f8)] - **doc**: add a link to the throw-deprecations flag (Lucas Holmquist) [#28625](https://github.com/nodejs/node/pull/28625) +* [[`871a60cd12`](https://github.com/nodejs/node/commit/871a60cd12)] - **doc**: fix nits in stream.md (Vse Mozhet Byt) [#28591](https://github.com/nodejs/node/pull/28591) +* [[`0380a558af`](https://github.com/nodejs/node/commit/0380a558af)] - **doc**: edit stream module introduction (Rich Trott) [#28595](https://github.com/nodejs/node/pull/28595) +* [[`729b232d11`](https://github.com/nodejs/node/commit/729b232d11)] - **doc**: change 'unix' to 'Unix' in ninja guide (Rich Trott) [#28619](https://github.com/nodejs/node/pull/28619) +* [[`74af944de1`](https://github.com/nodejs/node/commit/74af944de1)] - **doc**: add line for inspect host:port invocation (Tim Baverstock) [#28405](https://github.com/nodejs/node/pull/28405) +* [[`0aca527263`](https://github.com/nodejs/node/commit/0aca527263)] - **doc**: mention unit for event loop delay measurements (Jan Krems) [#28629](https://github.com/nodejs/node/pull/28629) +* [[`ac9908fe37`](https://github.com/nodejs/node/commit/ac9908fe37)] - **doc**: update stream.md "Organization of this Document" (Rich Trott) [#28601](https://github.com/nodejs/node/pull/28601) +* [[`9be1111179`](https://github.com/nodejs/node/commit/9be1111179)] - **doc**: move Usage and Example to same header level (Rich Trott) [#28570](https://github.com/nodejs/node/pull/28570) +* [[`70c3116783`](https://github.com/nodejs/node/commit/70c3116783)] - **doc**: mention markdown linting in BUILDING.md (Tariq Ramlall) [#28578](https://github.com/nodejs/node/pull/28578) +* [[`f0e4bf990e`](https://github.com/nodejs/node/commit/f0e4bf990e)] - **doc**: remove URLs from zlib docs (cjihrig) [#28580](https://github.com/nodejs/node/pull/28580) +* [[`a6d50a7562`](https://github.com/nodejs/node/commit/a6d50a7562)] - **doc**: make tls links more readable (cjihrig) [#28580](https://github.com/nodejs/node/pull/28580) +* [[`6f3ebb8787`](https://github.com/nodejs/node/commit/6f3ebb8787)] - **doc**: clarify http2 server.close() behavior (cjihrig) [#28581](https://github.com/nodejs/node/pull/28581) +* [[`2205818cca`](https://github.com/nodejs/node/commit/2205818cca)] - **doc**: format Unix consistently (cjihrig) [#28576](https://github.com/nodejs/node/pull/28576) +* [[`643d09961b`](https://github.com/nodejs/node/commit/643d09961b)] - **doc**: document family:0 behavior in socket.connect (cjihrig) [#28574](https://github.com/nodejs/node/pull/28574) +* [[`d2ba4547aa`](https://github.com/nodejs/node/commit/d2ba4547aa)] - **doc**: fix link in build instructions (Gautham B A) [#28572](https://github.com/nodejs/node/pull/28572) +* [[`24a77ae19a`](https://github.com/nodejs/node/commit/24a77ae19a)] - **doc**: add description for the listener argument (Luigi Pinca) [#28500](https://github.com/nodejs/node/pull/28500) +* [[`0777e090b4`](https://github.com/nodejs/node/commit/0777e090b4)] - **doc**: fix family default value in socket.connect (Kirill Fomichev) [#28521](https://github.com/nodejs/node/pull/28521) +* [[`29d2076ac7`](https://github.com/nodejs/node/commit/29d2076ac7)] - **doc**: simplify `process.resourceUsage()` section (Vse Mozhet Byt) [#28499](https://github.com/nodejs/node/pull/28499) +* [[`e83b256306`](https://github.com/nodejs/node/commit/e83b256306)] - **doc**: add example for chmod in fs.md (Juan Roa) [#28365](https://github.com/nodejs/node/pull/28365) +* [[`c177a68c7f`](https://github.com/nodejs/node/commit/c177a68c7f)] - **doc**: provide an example to fs.stat() (Felipe) [#28381](https://github.com/nodejs/node/pull/28381) +* [[`68ed32f71d`](https://github.com/nodejs/node/commit/68ed32f71d)] - **doc**: fix link from bootstrap README to BUILDING (Rod Vagg) [#28504](https://github.com/nodejs/node/pull/28504) +* [[`59aaee4295`](https://github.com/nodejs/node/commit/59aaee4295)] - **doc**: format try...catch consistently (cjihrig) [#28481](https://github.com/nodejs/node/pull/28481) +* [[`ec9ba4b803`](https://github.com/nodejs/node/commit/ec9ba4b803)] - **doc**: remove unnecessary stability specifiers (cjihrig) [#28485](https://github.com/nodejs/node/pull/28485) +* [[`0a0832fb52`](https://github.com/nodejs/node/commit/0a0832fb52)] - **doc**: address missing paren (cjihrig) [#28483](https://github.com/nodejs/node/pull/28483) +* [[`b379c0e8b6`](https://github.com/nodejs/node/commit/b379c0e8b6)] - **(SEMVER-MINOR)** **esm**: implement "pkg-exports" proposal (Guy Bedford) [#28568](https://github.com/nodejs/node/pull/28568) +* [[`d630cc0ec5`](https://github.com/nodejs/node/commit/d630cc0ec5)] - **gyp**: cherrypick more Python3 changes from node-gyp (cclauss) [#28563](https://github.com/nodejs/node/pull/28563) +* [[`b1db810d50`](https://github.com/nodejs/node/commit/b1db810d50)] - **gyp**: pull Python 3 changes from node/node-gyp (cclauss) [#28573](https://github.com/nodejs/node/pull/28573) +* [[`ed8504388e`](https://github.com/nodejs/node/commit/ed8504388e)] - **http**: avoid extra listener (Robert Nagy) [#28705](https://github.com/nodejs/node/pull/28705) +* [[`06d0abea0d`](https://github.com/nodejs/node/commit/06d0abea0d)] - **(SEMVER-MINOR)** **http**: add response.writableFinished (Robert Nagy) [#28681](https://github.com/nodejs/node/pull/28681) +* [[`2308c7412a`](https://github.com/nodejs/node/commit/2308c7412a)] - **(SEMVER-MINOR)** **http**: expose headers on an http.ClientRequest "information" event (Austin Wright) [#28459](https://github.com/nodejs/node/pull/28459) +* [[`38f8cd5ba1`](https://github.com/nodejs/node/commit/38f8cd5ba1)] - **http**: improve parser error messages (Anna Henningsen) [#28487](https://github.com/nodejs/node/pull/28487) +* [[`49e4d72b5a`](https://github.com/nodejs/node/commit/49e4d72b5a)] - **http2**: compat req.complete (Robert Nagy) [#28627](https://github.com/nodejs/node/pull/28627) +* [[`62f36828be`](https://github.com/nodejs/node/commit/62f36828be)] - **http2**: report memory allocated by nghttp2 to V8 (Anna Henningsen) [#28645](https://github.com/nodejs/node/pull/28645) +* [[`5b9c22710a`](https://github.com/nodejs/node/commit/5b9c22710a)] - **http2**: override authority with options (Luigi Pinca) [#28584](https://github.com/nodejs/node/pull/28584) +* [[`77bdbc5f0d`](https://github.com/nodejs/node/commit/77bdbc5f0d)] - **(SEMVER-MINOR)** **inspector**: add inspector.waitForDebugger() (Aleksei Koziatinskii) [#28453](https://github.com/nodejs/node/pull/28453) +* [[`7b0b06d735`](https://github.com/nodejs/node/commit/7b0b06d735)] - **inspector**: do not spin-wait while waiting for the initial connection (Eugene Ostroukhov) [#28756](https://github.com/nodejs/node/pull/28756) +* [[`aba0cf33ec`](https://github.com/nodejs/node/commit/aba0cf33ec)] - **inspector**: do not change async call stack depth if the worker is done (Eugene Ostroukhov) [#28613](https://github.com/nodejs/node/pull/28613) +* [[`66382abe29`](https://github.com/nodejs/node/commit/66382abe29)] - **inspector**: reduce InspectorIo API surface (Eugene Ostroukhov) [#28526](https://github.com/nodejs/node/pull/28526) +* [[`5c100075f0`](https://github.com/nodejs/node/commit/5c100075f0)] - **lib**: rename lib/internal/readline.js (cjihrig) [#28753](https://github.com/nodejs/node/pull/28753) +* [[`75c628130f`](https://github.com/nodejs/node/commit/75c628130f)] - **lib**: use `class ... extends` in perf\_hooks.js (Anna Henningsen) [#28495](https://github.com/nodejs/node/pull/28495) +* [[`1770bc870e`](https://github.com/nodejs/node/commit/1770bc870e)] - **module**: increase code coverage of cjs loader (Andrey Melikhov) [#27898](https://github.com/nodejs/node/pull/27898) +* [[`9c6791ee00`](https://github.com/nodejs/node/commit/9c6791ee00)] - **n-api**: correct bug in napi\_get\_last\_error (Octavian Soldea) [#28702](https://github.com/nodejs/node/pull/28702) +* [[`44de4317cf`](https://github.com/nodejs/node/commit/44de4317cf)] - **n-api**: make thread-safe-function calls properly (Gabriel Schulhof) [#28606](https://github.com/nodejs/node/pull/28606) +* [[`5b5c8196c3`](https://github.com/nodejs/node/commit/5b5c8196c3)] - **path**: move branch to the correct location (Ruben Bridgewater) [#28556](https://github.com/nodejs/node/pull/28556) +* [[`18c56df928`](https://github.com/nodejs/node/commit/18c56df928)] - **path**: using .relative() should not return a trailing slash (Ruben Bridgewater) [#28556](https://github.com/nodejs/node/pull/28556) +* [[`997531193b`](https://github.com/nodejs/node/commit/997531193b)] - **perf_hooks**: add HttpRequest statistics monitoring #28445 (vmarchaud) [#28486](https://github.com/nodejs/node/pull/28486) +* [[`2eeb44f3fa`](https://github.com/nodejs/node/commit/2eeb44f3fa)] - **(SEMVER-MINOR)** **policy**: add policy-integrity to mitigate policy tampering (Bradley Farias) [#28734](https://github.com/nodejs/node/pull/28734) +* [[`4cb0fc3ab1`](https://github.com/nodejs/node/commit/4cb0fc3ab1)] - **process**: refactor unhandledRejection logic (cjihrig) [#28540](https://github.com/nodejs/node/pull/28540) +* [[`caee9106ac`](https://github.com/nodejs/node/commit/caee9106ac)] - **(SEMVER-MINOR)** **readline**: expose stream API in cursorTo() (cjihrig) [#28674](https://github.com/nodejs/node/pull/28674) +* [[`4a7e20ff81`](https://github.com/nodejs/node/commit/4a7e20ff81)] - **(SEMVER-MINOR)** **readline**: expose stream API in moveCursor() (cjihrig) [#28674](https://github.com/nodejs/node/pull/28674) +* [[`0f5af44304`](https://github.com/nodejs/node/commit/0f5af44304)] - **(SEMVER-MINOR)** **readline**: expose stream API in clearLine() (cjihrig) [#28674](https://github.com/nodejs/node/pull/28674) +* [[`17df75f5c9`](https://github.com/nodejs/node/commit/17df75f5c9)] - **(SEMVER-MINOR)** **readline**: expose stream API in clearScreenDown() (cjihrig) [#28641](https://github.com/nodejs/node/pull/28641) +* [[`0383947ed7`](https://github.com/nodejs/node/commit/0383947ed7)] - **readline**: simplify isFullWidthCodePoint() (cjihrig) [#28640](https://github.com/nodejs/node/pull/28640) +* [[`dc734030fc`](https://github.com/nodejs/node/commit/dc734030fc)] - **readline**: remove IIFE in SIGCONT handler (cjihrig) [#28639](https://github.com/nodejs/node/pull/28639) +* [[`e0c5e7a939`](https://github.com/nodejs/node/commit/e0c5e7a939)] - **readline**: use named constant for surrogate checks (cjihrig) [#28638](https://github.com/nodejs/node/pull/28638) +* [[`e6e98afbf2`](https://github.com/nodejs/node/commit/e6e98afbf2)] - **readline**: fix position computation (Benoît Zugmeyer) [#28272](https://github.com/nodejs/node/pull/28272) +* [[`d611f5ad3e`](https://github.com/nodejs/node/commit/d611f5ad3e)] - **repl**: fix some repl context issues (Ruben Bridgewater) [#28561](https://github.com/nodejs/node/pull/28561) +* [[`cbd586aa99`](https://github.com/nodejs/node/commit/cbd586aa99)] - **repl**: fix autocomplete while using .load (Ruben Bridgewater) [#28608](https://github.com/nodejs/node/pull/28608) +* [[`35e3f1f449`](https://github.com/nodejs/node/commit/35e3f1f449)] - **report**: modify getReport() to return an Object (Christopher Hiller) [#28630](https://github.com/nodejs/node/pull/28630) +* [[`302865e8b9`](https://github.com/nodejs/node/commit/302865e8b9)] - **src**: do not include partial AsyncWrap instances in heap dump (Anna Henningsen) [#28789](https://github.com/nodejs/node/pull/28789) +* [[`c0f24be185`](https://github.com/nodejs/node/commit/c0f24be185)] - **src**: make `CompiledFnEntry` a `BaseObject` (Anna Henningsen) [#28782](https://github.com/nodejs/node/pull/28782) +* [[`7df54988e1`](https://github.com/nodejs/node/commit/7df54988e1)] - **src**: silence compiler warning (cjihrig) [#28764](https://github.com/nodejs/node/pull/28764) +* [[`2839298a1e`](https://github.com/nodejs/node/commit/2839298a1e)] - **src**: expose TraceEventHelper with NODE\_EXTERN (Samuel Attard) [#28724](https://github.com/nodejs/node/pull/28724) +* [[`74243da707`](https://github.com/nodejs/node/commit/74243da707)] - **src**: add public virtual destructor for KVStore (GauthamBanasandra) [#28737](https://github.com/nodejs/node/pull/28737) +* [[`0b7fecaf97`](https://github.com/nodejs/node/commit/0b7fecaf97)] - **src**: large pages option: FreeBSD support proposal (David Carlier) [#28331](https://github.com/nodejs/node/pull/28331) +* [[`1f0fd1bb78`](https://github.com/nodejs/node/commit/1f0fd1bb78)] - **src**: add missing option parser template for the DebugOptionsParser (Samuel Attard) [#28543](https://github.com/nodejs/node/pull/28543) +* [[`4b9d4193e1`](https://github.com/nodejs/node/commit/4b9d4193e1)] - **src**: lint #defines in src/node.h (Tariq Ramlall) [#28547](https://github.com/nodejs/node/pull/28547) +* [[`5c1d5958e0`](https://github.com/nodejs/node/commit/5c1d5958e0)] - **src**: add cleanup hook for ContextifyContext (Anna Henningsen) [#28631](https://github.com/nodejs/node/pull/28631) +* [[`29fda66ca6`](https://github.com/nodejs/node/commit/29fda66ca6)] - **src**: simplify --debug flags (cjihrig) [#28615](https://github.com/nodejs/node/pull/28615) +* [[`c50e235947`](https://github.com/nodejs/node/commit/c50e235947)] - **src**: replace already elevated Object, Local v8 namespace (Juan José Arboleda) [#28611](https://github.com/nodejs/node/pull/28611) +* [[`3c418d9629`](https://github.com/nodejs/node/commit/3c418d9629)] - **src**: manage MakeContext() pointer with unique\_ptr (cjihrig) [#28616](https://github.com/nodejs/node/pull/28616) +* [[`22daf952de`](https://github.com/nodejs/node/commit/22daf952de)] - **src**: clang build warning fix (David Carlier) [#28480](https://github.com/nodejs/node/pull/28480) +* [[`a8b094cf3b`](https://github.com/nodejs/node/commit/a8b094cf3b)] - **src**: implement special member functions for classes in env.h (GauthamBanasandra) [#28579](https://github.com/nodejs/node/pull/28579) +* [[`c432ab1391`](https://github.com/nodejs/node/commit/c432ab1391)] - **src**: simplify DEP0062 logic (cjihrig) [#28589](https://github.com/nodejs/node/pull/28589) +* [[`4f035e4d84`](https://github.com/nodejs/node/commit/4f035e4d84)] - **src**: implement runtime option --no-node-snapshot for debugging (Joyee Cheung) [#28567](https://github.com/nodejs/node/pull/28567) +* [[`a24ab56dc5`](https://github.com/nodejs/node/commit/a24ab56dc5)] - **src**: allow fatal exceptions to be enhanced (cjihrig) [#28562](https://github.com/nodejs/node/pull/28562) +* [[`d4113f96f5`](https://github.com/nodejs/node/commit/d4113f96f5)] - **src**: block SIGTTOU before calling tcsetattr() (Ben Noordhuis) [#28535](https://github.com/nodejs/node/pull/28535) +* [[`48c369b715`](https://github.com/nodejs/node/commit/48c369b715)] - **src**: correct json writer placement in process.report (himself65) [#28433](https://github.com/nodejs/node/pull/28433) +* [[`8d41b07c4c`](https://github.com/nodejs/node/commit/8d41b07c4c)] - **src**: remove unused using declarations in src/api (Daniel Bevenius) [#28506](https://github.com/nodejs/node/pull/28506) +* [[`6fbad8baa4`](https://github.com/nodejs/node/commit/6fbad8baa4)] - **src**: configure v8 isolate with uv\_get\_constrained\_memory (Kelvin Jin) [#27508](https://github.com/nodejs/node/pull/27508) +* [[`f3f51e4187`](https://github.com/nodejs/node/commit/f3f51e4187)] - **src**: use thread\_local to declare modpending (Gabriel Schulhof) [#28456](https://github.com/nodejs/node/pull/28456) +* [[`e610c45076`](https://github.com/nodejs/node/commit/e610c45076)] - **src**: remove redundant return (gengjiawen) [#28189](https://github.com/nodejs/node/pull/28189) +* [[`d34c2567c9`](https://github.com/nodejs/node/commit/d34c2567c9)] - **src, tools**: replace raw ptr with smart ptr (GauthamBanasandra) [#28577](https://github.com/nodejs/node/pull/28577) +* [[`0793398b4f`](https://github.com/nodejs/node/commit/0793398b4f)] - **stream**: add null push transform in async\_iterator (David Mark Clements) [#28566](https://github.com/nodejs/node/pull/28566) +* [[`00b2200e03`](https://github.com/nodejs/node/commit/00b2200e03)] - **(SEMVER-MINOR)** **stream**: use readableEncoding public api for child\_process (ZYSzys) [#28548](https://github.com/nodejs/node/pull/28548) +* [[`af6fe5f4c5`](https://github.com/nodejs/node/commit/af6fe5f4c5)] - **test**: fix assertion argument order in test-esm-namespace (Alex Ramirez) [#28474](https://github.com/nodejs/node/pull/28474) +* [[`7989d5c600`](https://github.com/nodejs/node/commit/7989d5c600)] - **test**: changed function to arrow function (Harshitha KP) [#28726](https://github.com/nodejs/node/pull/28726) +* [[`88809a49f6`](https://github.com/nodejs/node/commit/88809a49f6)] - **test**: propagate napi\_status to JS (Octavian Soldea) [#28505](https://github.com/nodejs/node/pull/28505) +* [[`61db987b01`](https://github.com/nodejs/node/commit/61db987b01)] - **test**: use consistent test naming (Rich Trott) [#28744](https://github.com/nodejs/node/pull/28744) +* [[`506b50a54a`](https://github.com/nodejs/node/commit/506b50a54a)] - **test**: make repl tests more resilient (Ruben Bridgewater) [#28608](https://github.com/nodejs/node/pull/28608) +* [[`af6608ca11`](https://github.com/nodejs/node/commit/af6608ca11)] - **test**: improve variable names in pty\_helper.py (Anna Henningsen) [#28688](https://github.com/nodejs/node/pull/28688) +* [[`9b2eee12eb`](https://github.com/nodejs/node/commit/9b2eee12eb)] - **test**: update hasFipsCrypto in test/common/README (Daniel Bevenius) [#28507](https://github.com/nodejs/node/pull/28507) +* [[`d3f51457af`](https://github.com/nodejs/node/commit/d3f51457af)] - **test**: use openssl\_is\_fips instead of hasFipsCrypto (Daniel Bevenius) [#28507](https://github.com/nodejs/node/pull/28507) +* [[`499969db9e`](https://github.com/nodejs/node/commit/499969db9e)] - **test**: increase limit for network space overhead test (Ben L. Titzer) [#28492](https://github.com/nodejs/node/pull/28492) +* [[`9f6600ac1c`](https://github.com/nodejs/node/commit/9f6600ac1c)] - **test**: fix pty test hangs on aix (Ben Noordhuis) [#28600](https://github.com/nodejs/node/pull/28600) +* [[`b4643dd9dc`](https://github.com/nodejs/node/commit/b4643dd9dc)] - **test**: add test-fs-writeFileSync-invalid-windows (Rich Trott) [#28569](https://github.com/nodejs/node/pull/28569) +* [[`e2adfb79b0`](https://github.com/nodejs/node/commit/e2adfb79b0)] - **test**: refactor test-fs-write-sync (Gabriela Niño) [#28371](https://github.com/nodejs/node/pull/28371) +* [[`4c333f4028`](https://github.com/nodejs/node/commit/4c333f4028)] - **test**: change the repeat Buffer.from('blerg'); statments (Miken) [#28372](https://github.com/nodejs/node/pull/28372) +* [[`598037346e`](https://github.com/nodejs/node/commit/598037346e)] - **test**: check getReport when error with one line stack (himself65) [#28433](https://github.com/nodejs/node/pull/28433) +* [[`793163e353`](https://github.com/nodejs/node/commit/793163e353)] - **test**: check writeReport when error with one line stack (himself65) [#28433](https://github.com/nodejs/node/pull/28433) +* [[`c3311c25ff`](https://github.com/nodejs/node/commit/c3311c25ff)] - **test**: generate des rsa\_cert.pfx (Caleb ツ Everett) [#28471](https://github.com/nodejs/node/pull/28471) +* [[`4941d47212`](https://github.com/nodejs/node/commit/4941d47212)] - **test**: don't use deprecated crypto.fips property (Ben Noordhuis) [#28509](https://github.com/nodejs/node/pull/28509) +* [[`e854bfa3b1`](https://github.com/nodejs/node/commit/e854bfa3b1)] - **test**: create home for test-npm-install (Daniel Bevenius) [#28510](https://github.com/nodejs/node/pull/28510) +* [[`13f139368f`](https://github.com/nodejs/node/commit/13f139368f)] - **test**: unmark test-gc-http-client-onerror flaky (Rich Trott) [#28429](https://github.com/nodejs/node/pull/28429) +* [[`b7731eb0e4`](https://github.com/nodejs/node/commit/b7731eb0e4)] - **test**: skip pseudo-tty tests on AIX (Sam Roberts) [#28541](https://github.com/nodejs/node/pull/28541) +* [[`33ab37fcdb`](https://github.com/nodejs/node/commit/33ab37fcdb)] - **test**: skip stringbytes-external-exceed-max on AIX (Sam Roberts) [#28516](https://github.com/nodejs/node/pull/28516) +* [[`f0c436ff50`](https://github.com/nodejs/node/commit/f0c436ff50)] - **test**: switch the argument order for the assertion (Ivan Villa) [#28356](https://github.com/nodejs/node/pull/28356) +* [[`49c533964f`](https://github.com/nodejs/node/commit/49c533964f)] - **test**: fix assertion argument order in test-https-agent.js (Julian Correa) [#28383](https://github.com/nodejs/node/pull/28383) +* [[`e4f1e909e1`](https://github.com/nodejs/node/commit/e4f1e909e1)] - **test**: increase test-resource-usage.js validation (cjihrig) [#28498](https://github.com/nodejs/node/pull/28498) +* [[`ff432c8ef6`](https://github.com/nodejs/node/commit/ff432c8ef6)] - **test,win**: cleanup exec-timeout processes (João Reis) [#28723](https://github.com/nodejs/node/pull/28723) +* [[`ed43880d6b`](https://github.com/nodejs/node/commit/ed43880d6b)] - **tools**: update ESLint to 6.1.0 (cjihrig) [#28793](https://github.com/nodejs/node/pull/28793) +* [[`5eb37cccc6`](https://github.com/nodejs/node/commit/5eb37cccc6)] - **tools**: remove unused pkgsrc directory (Michaël Zasso) [#28783](https://github.com/nodejs/node/pull/28783) +* [[`9ffa5fb6b8`](https://github.com/nodejs/node/commit/9ffa5fb6b8)] - **tools**: add coverage to ignored files (Lucas Holmquist) [#28626](https://github.com/nodejs/node/pull/28626) +* [[`ccb54f7a84`](https://github.com/nodejs/node/commit/ccb54f7a84)] - **tools**: add markdown lint rule for 'Unix' (Rich Trott) [#28619](https://github.com/nodejs/node/pull/28619) +* [[`487a417dd1`](https://github.com/nodejs/node/commit/487a417dd1)] - **(SEMVER-MINOR)** **tty**: expose stream API from readline methods (cjihrig) [#28721](https://github.com/nodejs/node/pull/28721) +* [[`7b4638cee0`](https://github.com/nodejs/node/commit/7b4638cee0)] - **vm**: fix gc bug with modules and compiled functions (Gus Caplan) [#28671](https://github.com/nodejs/node/pull/28671) +* [[`a0e8a25721`](https://github.com/nodejs/node/commit/a0e8a25721)] - **vm**: remove usage of public util module (Karen He) [#28460](https://github.com/nodejs/node/pull/28460) +* [[`0e2cbe6203`](https://github.com/nodejs/node/commit/0e2cbe6203)] - **worker**: fix passing multiple SharedArrayBuffers at once (Anna Henningsen) [#28582](https://github.com/nodejs/node/pull/28582) +* [[`cbf540136f`](https://github.com/nodejs/node/commit/cbf540136f)] - **worker**: assign missing deprecation code (James M Snell) [#28395](https://github.com/nodejs/node/pull/28395) +* [[`b8079f5c23`](https://github.com/nodejs/node/commit/b8079f5c23)] - **zlib**: remove usage of public util module (Karen He) [#28454](https://github.com/nodejs/node/pull/28454) +* [[`03de306281`](https://github.com/nodejs/node/commit/03de306281)] - **zlib**: do not coalesce multiple `.flush()` calls (Anna Henningsen) [#28520](https://github.com/nodejs/node/pull/28520) + ## 2019-07-03, Version 12.6.0 (Current), @targos diff --git a/src/node_version.h b/src/node_version.h index 9d37c02eb51a80..1bbe6aba05b132 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -23,13 +23,13 @@ #define SRC_NODE_VERSION_H_ #define NODE_MAJOR_VERSION 12 -#define NODE_MINOR_VERSION 6 -#define NODE_PATCH_VERSION 1 +#define NODE_MINOR_VERSION 7 +#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)